Switch to Howler for audio
This commit is contained in:
parent
3eb74e44aa
commit
194c0bf846
13 changed files with 78 additions and 19 deletions
|
@ -114,9 +114,10 @@ export default class Body {
|
|||
this.gravity = true;
|
||||
let speed = Math.sqrt(G * cel.mass / (altitude + cel.radius));
|
||||
let [cx, cy] = cel.com;
|
||||
let [comX, comY] = this.localCom;
|
||||
let [dx, dy] = this.rotateVector(0, -(altitude + cel.radius), angle);
|
||||
[this.xvel, this.yvel] = this.rotateVector(speed, 0, angle);
|
||||
this.x = cx + dx;
|
||||
this.y = cy + dy;
|
||||
this.x = cx + dx - comX;
|
||||
this.y = cy + dy - comY;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue