refactor: hull not needed since patches
This commit is contained in:
parent
570054c610
commit
bbe6e48ab1
|
@ -54,7 +54,6 @@ export class Layer extends decorate(Synchronized) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const halfTileSize = Vector.scale(tileset.tileSize, 0.5);
|
const halfTileSize = Vector.scale(tileset.tileSize, 0.5);
|
||||||
const shapeList = new ShapeList()
|
|
||||||
this.tiles.forEachTile((tile, x, y, i) => {
|
this.tiles.forEachTile((tile, x, y, i) => {
|
||||||
const shape = this.tileset.geometry(tile);
|
const shape = this.tileset.geometry(tile);
|
||||||
if (!shape) {
|
if (!shape) {
|
||||||
|
@ -64,12 +63,11 @@ export class Layer extends decorate(Synchronized) {
|
||||||
halfTileSize,
|
halfTileSize,
|
||||||
Vector.mul([x, y], tileset.tileSize),
|
Vector.mul([x, y], tileset.tileSize),
|
||||||
);
|
);
|
||||||
shapeList.addShape(shape);
|
const body = world.createBody(shape);
|
||||||
|
body.static = true;
|
||||||
|
world.addBody(body);
|
||||||
|
this.tileGeometry.push(body);
|
||||||
});
|
});
|
||||||
const body = world.createBody(shapeList);
|
|
||||||
body.static = true;
|
|
||||||
world.addBody(body);
|
|
||||||
this.tileGeometry.push(body);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user