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

small changes

parent ef32fdcb
Branches
No related tags found
No related merge requests found
...@@ -26,28 +26,32 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'], ...@@ -26,28 +26,32 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'],
if (lattice.get("partType") == "willLego") { if (lattice.get("partType") == "willLego") {
require(['gikPart'], function(PartSubclass){ require(['gikPart'], function(PartSubclass){
if (!self.index) return;
parts.push(new PartSubclass(self.index.x, self)); parts.push(new PartSubclass(self.index.x, self));
callback(parts); callback(parts);
}); });
} else if (lattice.get("partType") == "willLegoLowPoly") { } else if (lattice.get("partType") == "willLegoLowPoly") {
require(['gikPartLowPoly'], function(PartSubclass){ require(['gikPartLowPoly'], function(PartSubclass){
if (!self.index) return;
parts.push(new PartSubclass(self.index.x, self)); parts.push(new PartSubclass(self.index.x, self));
callback(parts); callback(parts);
}); });
} else if (lattice.get("partType") == "lego") { } else if (lattice.get("partType") == "lego") {
require(['legoPart'], function(PartSubclass){ require(['legoPart'], function(PartSubclass){
if (!self.index) return;
parts.push(new PartSubclass(self.index.x, self)); parts.push(new PartSubclass(self.index.x, self));
callback(parts); callback(parts);
}); });
} else if (lattice.get("partType") == "dnaLego") { } else if (lattice.get("partType") == "dnaLego") {
require(['dnaLegoPart'], function(PartSubclass){ require(['dnaLegoPart'], function(PartSubclass){
if (!self.index) return;
parts.push(new PartSubclass(self.index.x, self)); parts.push(new PartSubclass(self.index.x, self));
callback(parts); callback(parts);
}); });
} else if (lattice.get("partType") == "dnaStraight") { } else if (lattice.get("partType") == "dnaStraight") {
require(['dnaStraightPart'], function(PartSubclass){ require(['dnaStraightPart'], function(PartSubclass){
if (!self.index) return;
var parent = lattice.getUItarget(); var parent = lattice.getUItarget();
parent._parseSparseCell();//todo this should get checked
var index = self.getLatticeIndex(); var index = self.getLatticeIndex();
if (parent.cells[index.x][index.y][index.z+1]) var topNeighbor = parent.cells[index.x][index.y][index.z+1]; if (parent.cells[index.x][index.y][index.z+1]) var topNeighbor = parent.cells[index.x][index.y][index.z+1];
if (parent.cells[index.x][index.y][index.z-1]) var bottomNeighbor = parent.cells[index.x][index.y][index.z-1]; if (parent.cells[index.x][index.y][index.z-1]) var bottomNeighbor = parent.cells[index.x][index.y][index.z-1];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment