fix: not immutable

This commit is contained in:
cha0s 2019-03-26 17:21:56 -05:00
parent 906997eeee
commit 42c9221c49

View File

@ -30,7 +30,7 @@ export class World extends AbstractWorld {
const aabb = body.aabb; const aabb = body.aabb;
const points = Rectangle.toPoints(aabb); const points = Rectangle.toPoints(aabb);
const nodes = points.map((point) => [...point, body]); const nodes = points.map((point) => [...point, body]);
this.quadTreeNodes = this.quadTreeNodes.set(body, nodes); this.quadTreeNodes.set(body, nodes);
for (const node of nodes) { for (const node of nodes) {
this.quadTree.add(node); this.quadTree.add(node);
} }