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

no loner cell inited from main

parent 991aa639
Branches
No related tags found
No related merge requests found
...@@ -37,6 +37,10 @@ DMASuperCell.prototype.setScale = function(scale){ ...@@ -37,6 +37,10 @@ DMASuperCell.prototype.setScale = function(scale){
this._setPosition(this.index); this._setPosition(this.index);
}; };
DMASuperCell.prototype.setVisibility = function(visible){
this.mesh.visible = visible;
};
DMASuperCell.prototype.destroy = function(){ DMASuperCell.prototype.destroy = function(){
if (this.destroyStarted) return;//prevents loop destroy from cells if (this.destroyStarted) return;//prevents loop destroy from cells
this.destroyStarted = true; this.destroyStarted = true;
......
...@@ -75,6 +75,7 @@ var cellMaterial = [new THREE.MeshNormalMaterial()]; ...@@ -75,6 +75,7 @@ var cellMaterial = [new THREE.MeshNormalMaterial()];
DMAGIKCell.prototype._setCellMeshVisibility = function(visible){ DMAGIKCell.prototype._setCellMeshVisibility = function(visible){
this.cellMesh.visible = false; this.cellMesh.visible = false;
if (this.superCell) this.superCell.setVisibility(visible);
}; };
DMAGIKCell.prototype.setSuperCell = function(superCell, index, length){ DMAGIKCell.prototype.setSuperCell = function(superCell, index, length){
......
...@@ -26,5 +26,5 @@ $(function(){ ...@@ -26,5 +26,5 @@ $(function(){
//threeJS View //threeJS View
new ThreeView({model:dmaGlobals.three, appState:dmaGlobals.appState}); new ThreeView({model:dmaGlobals.three, appState:dmaGlobals.appState});
dmaGlobals.lattice.addCellAtIndex({x:0,y:0,z:0});//add a cell if (dmaGlobals.lattice.get("connectionType") != "gik") dmaGlobals.lattice.addCellAtIndex({x:0,y:0,z:0});//add a cell
}); });
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment