From da6febfa1cb5644576d35b21544a1683e684e302 Mon Sep 17 00:00:00 2001 From: amandaghassaei <amandaghassaei@gmail.com> Date: Mon, 23 Mar 2015 00:57:31 -0400 Subject: [PATCH] temp fix for parts loading bug --- js/models/Lattice.js | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/js/models/Lattice.js b/js/models/Lattice.js index 3ead407e..f6074323 100644 --- a/js/models/Lattice.js +++ b/js/models/Lattice.js @@ -420,8 +420,8 @@ Lattice = Backbone.Model.extend({ if (!cell) return; var index = _.clone(cell.indices); - var parts = null; - if (loadingFromFile) parts = _.clone(cell.parts); + //var parts = null; + //if (loadingFromFile) parts = _.clone(cell.parts); if (cell.parentOrientation) var parentOrientation = new THREE.Quaternion(cell.parentOrientation._x, cell.parentOrientation._y, cell.parentOrientation._z, cell.parentOrientation._w); if (cell.parentPosition) var parentPos = cell.parentPosition; if (cell.direction) var direction = new THREE.Vector3(cell.direction.x, cell.direction.y, cell.direction.z); @@ -431,16 +431,16 @@ Lattice = Backbone.Model.extend({ if (cell.destroy) cell.destroy(); var newCell = self.makeCellForLatticeType(index, scale, parentPos, parentOrientation, direction, parentType, type); - if (parts) { - //todo make this better - newCell.parts = newCell._initParts(); - for (var i=0;i<newCell.parts.length;i++){ - if (!parts[i]) { - newCell.parts[i].destroy(); - newCell.parts[i] = null; - } - } - } + //if (parts) { + // //todo make this better + // newCell.parts = newCell._initParts(); + // for (var i=0;i<newCell.parts.length;i++){ + // if (!parts[i]) { + // newCell.parts[i].destroy(); + // newCell.parts[i] = null; + // } + // } + //} cells[x][y][z] = newCell; }); dmaGlobals.three.render(); -- GitLab