scale rendering
This commit is contained in:
parent
80bd84230d
commit
0ceea5f4af
7 changed files with 70 additions and 17 deletions
|
@ -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);
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
"01": [
|
||||
[
|
||||
[1, 28],
|
||||
[30, 28],
|
||||
[30, 19],
|
||||
[18, 2],
|
||||
[31, 28],
|
||||
[31, 19],
|
||||
[19, 2],
|
||||
[13, 2],
|
||||
[1, 19]
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue