fix updating hole geometry

This commit is contained in:
casperlamboo 2017-11-22 12:45:51 +01:00
parent 602a334514
commit 5e27d0429d

4
src/d3/ShapeMesh.js vendored
View File

@ -74,12 +74,12 @@ class ShapeMesh extends THREE.Object3D {
} }
updateHoleGeometry(holes) { updateHoleGeometry(holes) {
if (!this._solid || !this._fill) return false;
if (holes === this._holes && !this._changedGeometry) return false; if (holes === this._holes && !this._changedGeometry) return false;
if (!this._solid) return false;
this._holeMesh.geometry.dispose(); this._holeMesh.geometry.dispose();
if (holes === null) { if (holes === null || !this._fill) {
this._holeMesh.geometry = new THREE.Geometry().fromBufferGeometry(this._mesh.geometry); this._holeMesh.geometry = new THREE.Geometry().fromBufferGeometry(this._mesh.geometry);
return true; return true;
} }