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
_cellTypeChanged: function(){
var cellType = this.get("cellType");
var connectionType = _.keys(plist.allLattices[cellType].connection)[0];
this.set("connectionType", connectionType, {silent:true});
if (plist.allLattices[cellType].connection[this.get("connectionType")] === undefined){
var connectionType = _.keys(plist.allLattices[cellType].connection)[0];
this.set("connectionType", connectionType, {silent:true});
}
this._connectionTypeChanged();
},
_connectionTypeChanged: function(){
var cellType = this.get("cellType");
var connectionType = this.get("connectionType");
var latticeType = _.keys(plist.allLattices[cellType].connection[connectionType].type)[0];
this.set("latticeType", latticeType, {silent:true});
if (plist.allLattices[cellType].connection[connectionType].type[this.get("latticeType")] === undefined){
var latticeType = _.keys(plist.allLattices[cellType].connection[connectionType].type)[0];
this.set("latticeType", latticeType, {silent:true});
}
this._latticeTypeChanged();
},
......
......@@ -9,7 +9,8 @@ define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_
var unitGeo = preProcessGeo(loader.parse(stl));
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;
}
......
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