Commit afda9d67 authored by Amanda Ghassaei's avatar Amanda Ghassaei

dna lego parts

parent 0e7dc0a8
......@@ -30,13 +30,13 @@ define(['underscore', 'three', 'threeModel', 'lattice', 'appState', 'cubeCell'],
parts.push(new PartSubclass(self.index.x, self));
callback(parts);
});
} else if (lattice.get("partType") == "dnaLego") {
} else if (lattice.get("partType") == "lego") {
require(['legoPart'], function(PartSubclass){
parts.push(new PartSubclass(self.index.x, self));
callback(parts);
});
} else if (lattice.get("partType") == "lego") {
require(['legoPart'], function(PartSubclass){
} else if (lattice.get("partType") == "dnaLego") {
require(['dnaLegoPart'], function(PartSubclass){
parts.push(new PartSubclass(self.index.x, self));
callback(parts);
});
......
......@@ -15,7 +15,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
cellType: "cube",
connectionType: "gik",
latticeType: "willGik",
latticeType: "dnaBricks",
partType: null,
aspectRatio: null,
......
......@@ -109,6 +109,7 @@ require.config({
samTeqPart: 'parts/SamTeqPart',
legoPart: 'parts/LegoPart',
dnaStraightPart: 'parts/DNAStraightPart',
dnaLegoPart: 'parts/DNALegoPart',
//materials
materials: 'materials/DMAMaterials',
......@@ -214,7 +215,8 @@ require.config({
kennyTeqPartSTL: 'assets/stls/parts/KennyTeqPart.stl',
kennyTeqPartHighResSTL: 'assets/stls/parts/KennyTeqPartHighRes.stl',
samTeqPartSTL: 'assets/stls/parts/SamTeqPart.stl',
legoBrickSTL: 'assets/stls/parts/legoBrick1x1.stl'
legoBrickSTL: 'assets/stls/parts/legoBrick1x1.stl',
dnaLegoBrickSTL: 'assets/stls/parts/DNALegoBrick1x1.stl'
},
......
......@@ -36,7 +36,7 @@ define(['underscore', 'backbone', 'threeModel', 'three', 'plist', 'globals'], fu
cellsVisible: true,
superCellIndex: new THREE.Vector3(0,0,0),//offset of superCell adds
gikLength: 4,//this updates super cell range when using non-composite materials
gikLength: 2,//this updates super cell range when using non-composite materials
superCellRange: new THREE.Vector3(1,1,1),
realisticColorScheme: false,
......
/**
* Created by aghassaei on 9/14/15.
*/
define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_, THREE, GIKPart, stl){
var loader = new THREE.STLLoader();
var unitGeo = preProcessGeo(loader.parse(stl));
function preProcessGeo(geo){
geo.applyMatrix(new THREE.Matrix4().makeRotationX(Math.PI/2));
return geo;
}
function DNALegoPart(index, parent){
GIKPart.call(this, index, parent);
}
DNALegoPart.prototype = Object.create(GIKPart.prototype);
DNALegoPart.prototype._getGeometry = function(){
return unitGeo;
};
return DNALegoPart;
});
\ No newline at end of file
......@@ -12,7 +12,7 @@ define(['three'], function(THREE){
lattice:"Lattice",
//sketch:"Sketch",
material:"Materials",
import:"Import",
// import:"Import",
part:"Part"
//script:"Script"
}
......
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