fix previous commit

This commit is contained in:
casperlamboo 2017-12-12 22:29:19 +01:00
parent 2b9eac38c7
commit 12653a16de

3
src/d3/ShapeMesh.js vendored
View File

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