Improve planet collision

This commit is contained in:
asraelite 2018-03-03 22:12:53 +00:00
parent 4959519f39
commit ba803b7ca9
7 changed files with 86 additions and 28 deletions

View file

@ -15,12 +15,12 @@ export default class Celestial extends Body {
this.image = imageArr[Math.random() * imageArr.length | 0];
}
tick() {
get com() {
return [this.x + this.radius, this.y + this.radius];
}
get center() {
return [this.x + this.radius / 2, this.y + this.radius / 2];
tick() {
}
get diameter() {