prevent double matrix updates

This commit is contained in:
Stewart Allen 2022-01-10 23:11:15 -05:00
commit 42d3e60ac1

View file

@ -152,12 +152,14 @@ mesh.object = class MeshObject {
);
let helper = this._boundsBox = new THREE.Box3Helper(b3, 0x555555);
world.add(helper);
return true;
}
}
matrixChanged() {
this.object.updateMatrix();
this.updateBoundsBox();
if (!this.updateBoundsBox()) {
this.object.updateMatrix();
}
space.update();
publish.matrix({ id: this.id, matrix: this.object.matrix });
return this;