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

able to add cells in part mode

parent f5355be7
Branches
No related tags found
No related merge requests found
......@@ -39,6 +39,9 @@
this.indices = indices;
this.position = this._calcPositionForScale(scale);
this.cellMesh = this._buildCellMesh(this.position);
window.three.sceneAdd(this.cellMesh);
this.parts = this._initParts(this.position);
this.drawForMode(mode);
}
......@@ -84,11 +87,7 @@
DMACell.prototype.drawForMode = function(mode){
console.log(mode);
if (mode == "cell"){
if (this.cellMesh) this._setCellMeshVisibility(true);
else {
this.cellMesh = this._buildCellMesh(this.position);
window.three.sceneAdd(this.cellMesh);
}
this._setCellMeshVisibility(true);
_.each(this.parts, function(part){
part.hide();
});
......
......@@ -35,7 +35,7 @@
DMAPart.prototype._draw = function(){
this.mesh = this._makeMeshForType(this.type);
window.three.sceneAdd(this.mesh);
window.three.sceneAdd(this.mesh, false);
};
DMAPart.prototype._makeMeshForType = function(type){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment