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

still working on gik parts

parent 46b6372a
No related branches found
No related tags found
No related merge requests found
......@@ -276,7 +276,7 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'globals'],
//subcomponents
DMACell.prototype._initParts = function(){
DMACell.prototype._initParts = function(callback){
return [];//override in subclasses
};
......
......@@ -31,16 +31,12 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'],
if (lattice.get("partType") == "lego") {
require(['gikPart'], function(GIKPart){
for (var i=0;i<length;i++){
parts.push(new GIKPart(i, self));
}
parts.push(new GIKPart(self.index.x, self));
callback(parts);
});
} else {
require(['gikPartLowPoly'], function(GIKPartLowPoly){
for (var i=0;i<length;i++){
parts.push(new GIKPartLowPoly(i, self));
}
parts.push(new GIKPartLowPoly(self.index.x, self));
callback(parts);
});
}
......
......@@ -32,8 +32,9 @@ define(['underscore', 'three'], function(_, THREE){
};
DMAPart.prototype.destroy = function(){
console.log("destroy");
if (this.mesh) {
this.mesh.parent.remove(this.mesh);
this.parentCell.removeChildren(this.mesh);
this.mesh = null;
}
this.parentCell = null;
......
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