Commit 58f26ac8 authored by Amanda Ghassaei's avatar Amanda Ghassaei

separation between dna legos

parent 3d4e2109
...@@ -73,16 +73,20 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre ...@@ -73,16 +73,20 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
_cellTypeChanged: function(){ _cellTypeChanged: function(){
var cellType = this.get("cellType"); var cellType = this.get("cellType");
var connectionType = _.keys(plist.allLattices[cellType].connection)[0]; if (plist.allLattices[cellType].connection[this.get("connectionType")] === undefined){
this.set("connectionType", connectionType, {silent:true}); var connectionType = _.keys(plist.allLattices[cellType].connection)[0];
this.set("connectionType", connectionType, {silent:true});
}
this._connectionTypeChanged(); this._connectionTypeChanged();
}, },
_connectionTypeChanged: function(){ _connectionTypeChanged: function(){
var cellType = this.get("cellType"); var cellType = this.get("cellType");
var connectionType = this.get("connectionType"); var connectionType = this.get("connectionType");
var latticeType = _.keys(plist.allLattices[cellType].connection[connectionType].type)[0]; if (plist.allLattices[cellType].connection[connectionType].type[this.get("latticeType")] === undefined){
this.set("latticeType", latticeType, {silent:true}); var latticeType = _.keys(plist.allLattices[cellType].connection[connectionType].type)[0];
this.set("latticeType", latticeType, {silent:true});
}
this._latticeTypeChanged(); this._latticeTypeChanged();
}, },
......
...@@ -9,7 +9,8 @@ define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_ ...@@ -9,7 +9,8 @@ define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_
var unitGeo = preProcessGeo(loader.parse(stl)); var unitGeo = preProcessGeo(loader.parse(stl));
function preProcessGeo(geo){ function preProcessGeo(geo){
geo.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2)); geo.applyMatrix(new THREE.Matrix4().makeRotationZ(Math.PI/2));
geo.applyMatrix(new THREE.Matrix4().makeTranslation(0,0,-0.54));
return geo; return geo;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment