Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
DMDesign
Commits
fdf6e1cb
Commit
fdf6e1cb
authored
Sep 15, 2015
by
Amanda Ghassaei
Browse files
1x1 dna lego brick is nicer
parent
296ee53c
Changes
4
Hide whitespace changes
Inline
Side-by-side
assets/stls/parts/DNALegoBrick1x1.stl
View file @
fdf6e1cb
No preview for this file type
assets/stls/parts/DNALegoBrick1x2.stl
0 → 100644
View file @
fdf6e1cb
File added
js/main.js
View file @
fdf6e1cb
...
...
@@ -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
'
},
...
...
js/parts/DNALegoPart.js
View file @
fdf6e1cb
...
...
@@ -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
;
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment