diff --git a/js/fea/dmaCell.js b/js/fea/dmaCell.js index f38bcb3017c71963f923fbba58425a2d76d3f065..9690ce5fff3eef6646649bc9890e7b87565fb221 100644 --- a/js/fea/dmaCell.js +++ b/js/fea/dmaCell.js @@ -147,7 +147,7 @@ DMACell.prototype.destroy = function(){ if (this.cellMesh) { - window.three.sceneRemove(this.cellMesh); + window.three.sceneRemove(this.cellMesh, "cell"); this.cellMesh.myCell = null; // this.cellMesh.dispose(); // geometry.dispose(); diff --git a/js/fea/dmaPart.js b/js/fea/dmaPart.js index 0ece174553f8ade4bd5213894e021f134afbb71d..833117b373784b20a87eb2db8a0bd4f855c50ea9 100644 --- a/js/fea/dmaPart.js +++ b/js/fea/dmaPart.js @@ -93,7 +93,7 @@ DMAPart.prototype.destroy = function(){ if (this.mesh) { - window.three.sceneRemove(this.mesh); + window.three.sceneRemove(this.mesh, "part"); // this.mesh.dispose(); // geometry.dispose(); // material.dispose(); diff --git a/js/models/fillGeometry.js b/js/models/fillGeometry.js index 4c487024e7746f4f2d00c7a3504c99781b81a424..8980a1a3835f3e0cce376ebbf1735e3792bc7cb9 100644 --- a/js/models/fillGeometry.js +++ b/js/models/fillGeometry.js @@ -60,7 +60,7 @@ FillGeometry = Backbone.Model.extend({ remove: function(){ if (!this.get("mesh")) return; - window.three.sceneRemove(this.get("mesh")); + window.three.sceneRemove(this.get("mesh"), null); this.set("mesh", null); window.three.render(); }, diff --git a/js/threeViews/threeView.js b/js/threeViews/threeView.js index 7b33d5a44d490da3728369905c7d2340bd5a6a36..141369acef63cf39edf16f6c0339907b545de792 100644 --- a/js/threeViews/threeView.js +++ b/js/threeViews/threeView.js @@ -172,7 +172,7 @@ ThreeView = Backbone.View.extend({ _drawBasePlane: function(){ - if (this.basePlane) window.three.sceneRemove(this.basePlane); + if (this.basePlane) window.three.sceneRemove(this.basePlane, "basePlane"); var type = this.lattice.get("cellType"); var connectionType = this.lattice.get("connectionType");