scale rendering

This commit is contained in:
Asraelite 2016-03-22 15:41:11 +00:00
parent 80bd84230d
commit 0ceea5f4af
7 changed files with 70 additions and 17 deletions

View file

@ -17,12 +17,15 @@ class Ship extends Body {
move(data) {
let b = this.b2body;
//console.log(b.GetLocalCenter());
for(var i in b) {
//if(typeof b[i] == 'function') console.log(i);
}
if (data.forward) {
let power = 0.05;
let power = 0.002;
let x = Math.cos(this.b2body.GetAngleRadians()) * power;
let y = Math.sin(this.b2body.GetAngleRadians()) * power;
this.applyForce(x, y);

View file

@ -2,9 +2,9 @@
"01": [
[
[1, 28],
[30, 28],
[30, 19],
[18, 2],
[31, 28],
[31, 19],
[19, 2],
[13, 2],
[1, 19]
]