Skip to content
Snippets Groups Projects
Commit be5b76d2 authored by Amanda Ghassaei's avatar Amanda Ghassaei
Browse files

dma cell highlightable again

parent 10902a95
Branches
No related tags found
No related merge requests found
......@@ -285,7 +285,10 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals'],
DMACell.prototype.destroy = function(){
if (this.object3D) {
if (this.superCell) this.superCell.removeChildren(this.object3D);
else if (this.index) three.sceneRemove(this.object3D);
else if (this.index) {
three.sceneRemove(this.object3D);
if (!this.cells) three.removeCell(this.object3D.children[0]);//remove mesh as highlightable object
}
this.object3D.myParent = null;
// this.object3D.dispose();
// geometry.dispose();
......
......@@ -69,6 +69,10 @@ define(['underscore', 'three'], function(_, THREE){
cells.push(cell);
}
function removeCell(cell){
cells.splice(cells.indexOf(cell), 1);
}
function getCells(){
return cells;
}
......@@ -130,6 +134,7 @@ define(['underscore', 'three'], function(_, THREE){
camera: camera,
getCells: getCells,
addCell: addCell,
removeCell: removeCell,
getBasePlane: getBasePlane,
removeAllCells: removeAllCells
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment