fix explosion physics
This commit is contained in:
parent
bf8226481d
commit
8a8a9c8ae3
7 changed files with 54 additions and 24 deletions
|
@ -16,7 +16,7 @@ Renderer.prototype.renderAsteroid = (pallet, body) => {
|
|||
}
|
||||
context.closePath();
|
||||
context.strokeStyle = '#fff';
|
||||
context.fillStyle = '#090909';
|
||||
context.fillStyle = body.debug ? `rgb(${body.debug}, 9, 9)` : '#090909';
|
||||
context.fill();
|
||||
context.stroke();
|
||||
|
||||
|
|
|
@ -2,6 +2,11 @@ class Asteroid extends Body {
|
|||
constructor(data) {
|
||||
super(data)
|
||||
this.bodyType = 'asteroid';
|
||||
this.debug = 0;
|
||||
}
|
||||
|
||||
updateType(data) {
|
||||
this.debug = data[6];
|
||||
}
|
||||
|
||||
tick() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue