refactor: hull not needed since patches

This commit is contained in:
cha0s 2019-04-16 13:41:29 -05:00
parent 570054c610
commit bbe6e48ab1

View File

@ -54,7 +54,6 @@ export class Layer extends decorate(Synchronized) {
return false;
}
const halfTileSize = Vector.scale(tileset.tileSize, 0.5);
const shapeList = new ShapeList()
this.tiles.forEachTile((tile, x, y, i) => {
const shape = this.tileset.geometry(tile);
if (!shape) {
@ -64,12 +63,11 @@ export class Layer extends decorate(Synchronized) {
halfTileSize,
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;
}