Commit fdf6e1cb authored by Amanda Ghassaei's avatar Amanda Ghassaei

1x1 dna lego brick is nicer

parent 296ee53c
......@@ -218,7 +218,8 @@ require.config({
kennyTeqPartHighResSTL: 'assets/stls/parts/KennyTeqPartHighRes.stl',
samTeqPartSTL: 'assets/stls/parts/SamTeqPart.stl',
legoBrickSTL: 'assets/stls/parts/legoBrick1x1.stl',
dnaLegoBrickSTL: 'assets/stls/parts/DNALegoBrick1x1.stl'
dnaLegoBrickSTL: 'assets/stls/parts/DNALegoBrick1x2.stl',
dnaLegoBrick1x1STL: 'assets/stls/parts/DNALegoBrick1x1.stl'
},
......
......@@ -3,10 +3,11 @@
*/
define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_, THREE, GIKPart, stl){
define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL', 'bin!dnaLegoBrick1x1STL'], function(_, THREE, GIKPart, stl, stl1by1){
var loader = new THREE.STLLoader();
var unitGeo = preProcessGeo(loader.parse(stl));
var unitGeo1by1 = preProcessGeo(loader.parse(stl1by1));
function preProcessGeo(geo){
geo.applyMatrix(new THREE.Matrix4().makeRotationZ(-Math.PI/2));
......@@ -20,6 +21,7 @@ define(['underscore', 'stlLoader', 'gikPart', 'bin!dnaLegoBrickSTL'], function(_
DNALegoPart.prototype = Object.create(GIKPart.prototype);
DNALegoPart.prototype._getGeometry = function(){
if (this.parentCell.getLength() == 1) return unitGeo1by1;
return unitGeo;
};
......
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