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

cell mode bug

parent 704c8590
No related branches found
No related tags found
No related merge requests found
...@@ -14,8 +14,8 @@ function DMACell(indices, scale, lattice, inverse) { ...@@ -14,8 +14,8 @@ function DMACell(indices, scale, lattice, inverse) {
this.cellMesh = this._buildCellMesh(indices.z); this.cellMesh = this._buildCellMesh(indices.z);
this.parts = this._initParts(indices.z); this.parts = this._initParts(indices.z);
var cellMode = dmaGlobals.appState.get("cellMode"); var cellMode = dmaGlobals.lattice.get("cellMode");
var inverseMode = dmaGlobals.appState.get("inverseMode"); var inverseMode = dmaGlobals.lattice.get("inverseMode");
this.drawForMode(scale, cellMode, inverseMode); this.drawForMode(scale, cellMode, inverseMode);
} }
...@@ -52,10 +52,9 @@ DMACell.prototype._setCellMeshVisibility = function(visibility){ ...@@ -52,10 +52,9 @@ DMACell.prototype._setCellMeshVisibility = function(visibility){
DMACell.prototype.updateForScale = function(scale, cellMode){ DMACell.prototype.updateForScale = function(scale, cellMode){
//only update visible object to scale //only update visible object to scale
var position = this.getPosition(); var position = this.getPosition();
if (cellMode == "cell"){ this.cellMesh.scale.set(scale, scale, scale);
this.cellMesh.scale.set(scale, scale, scale); this._setMeshPosition(this.cellMesh, position);
this._setMeshPosition(this.cellMesh, position); if (cellMode == "part"){
} else if (cellMode == "part"){
_.each(this.parts, function(part){ _.each(this.parts, function(part){
if (part) part.updateForScale(scale, position); if (part) part.updateForScale(scale, position);
}); });
...@@ -270,6 +269,10 @@ DMACell.prototype.destroy = function(){ ...@@ -270,6 +269,10 @@ DMACell.prototype.destroy = function(){
self.DMAVertexOctaCell = DMAVertexOctaCell; self.DMAVertexOctaCell = DMAVertexOctaCell;
/////////////////////////////////////////TRUNCATED CUBE////////////////////////////////////
})(); })();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment