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
afda9d67
Commit
afda9d67
authored
Sep 14, 2015
by
Amanda Ghassaei
Browse files
dna lego parts
parent
0e7dc0a8
Changes
7
Hide whitespace changes
Inline
Side-by-side
assets/stls/parts/DNALegoBrick1x1.stl
0 → 100644
View file @
afda9d67
File added
js/cells/GIKCell.js
View file @
afda9d67
...
...
@@ -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
"
)
==
"
dnaL
ego
"
)
{
}
else
if
(
lattice
.
get
(
"
partType
"
)
==
"
l
ego
"
)
{
require
([
'
legoPart
'
],
function
(
PartSubclass
){
parts
.
push
(
new
PartSubclass
(
self
.
index
.
x
,
self
));
callback
(
parts
);
});
}
else
if
(
lattice
.
get
(
"
partType
"
)
==
"
l
ego
"
)
{
require
([
'
l
egoPart
'
],
function
(
PartSubclass
){
}
else
if
(
lattice
.
get
(
"
partType
"
)
==
"
dnaL
ego
"
)
{
require
([
'
dnaL
egoPart
'
],
function
(
PartSubclass
){
parts
.
push
(
new
PartSubclass
(
self
.
index
.
x
,
self
));
callback
(
parts
);
});
...
...
js/lattice/Lattice.js
View file @
afda9d67
...
...
@@ -15,7 +15,7 @@ define(['underscore', 'backbone', 'appState', 'globals', 'plist', 'three', 'thre
cellType
:
"
cube
"
,
connectionType
:
"
gik
"
,
latticeType
:
"
willGik
"
,
latticeType
:
"
dnaBricks
"
,
partType
:
null
,
aspectRatio
:
null
,
...
...
js/main.js
View file @
afda9d67
...
...
@@ -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
'
},
...
...
js/models/AppState.js
View file @
afda9d67
...
...
@@ -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
,
...
...
js/parts/DNALegoPart.js
0 → 100644
View file @
afda9d67
/**
* 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
js/plists/PList.js
View file @
afda9d67
...
...
@@ -12,7 +12,7 @@ define(['three'], function(THREE){
lattice
:
"
Lattice
"
,
//sketch:"Sketch",
material
:
"
Materials
"
,
import
:
"
Import
"
,
//
import:"Import",
part
:
"
Part
"
//script:"Script"
}
...
...
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