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

1x1 dna lego brick is nicer

parent 296ee53c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
File added
......@@ -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;
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment