Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
25742177
Commit
25742177
authored
Apr 26, 2017
by
amandaghassaei
Browse files
two creases working
parent
15f67df1
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/model.js
View file @
25742177
...
...
@@ -12,6 +12,7 @@ function initModel(globals){
nodes
.
push
(
new
Node
(
new
THREE
.
Vector3
(
0
,
0
,
10
),
nodes
.
length
));
nodes
.
push
(
new
Node
(
new
THREE
.
Vector3
(
10
,
0
,
0
),
nodes
.
length
));
nodes
.
push
(
new
Node
(
new
THREE
.
Vector3
(
0
,
0
,
-
10
),
nodes
.
length
));
nodes
.
push
(
new
Node
(
new
THREE
.
Vector3
(
10
,
0
,
-
10
),
nodes
.
length
));
nodes
[
0
].
setFixed
(
true
);
nodes
[
1
].
setFixed
(
true
);
nodes
[
2
].
setFixed
(
true
);
...
...
@@ -22,13 +23,17 @@ function initModel(globals){
edges
.
push
(
new
Beam
([
nodes
[
2
],
nodes
[
0
]]));
edges
.
push
(
new
Beam
([
nodes
[
3
],
nodes
[
0
]]));
edges
.
push
(
new
Beam
([
nodes
[
3
],
nodes
[
2
]]));
edges
.
push
(
new
Beam
([
nodes
[
3
],
nodes
[
4
]]));
edges
.
push
(
new
Beam
([
nodes
[
2
],
nodes
[
4
]]));
var
faces
=
[];
faces
.
push
(
new
THREE
.
Face3
(
0
,
1
,
2
));
faces
.
push
(
new
THREE
.
Face3
(
0
,
2
,
3
));
faces
.
push
(
new
THREE
.
Face3
(
4
,
3
,
2
));
var
creases
=
[];
creases
.
push
(
new
Crease
(
edges
[
2
],
0
,
1
,
Math
.
PI
/
2
,
1
,
nodes
[
1
],
nodes
[
3
],
0
));
creases
.
push
(
new
Crease
(
edges
[
2
],
0
,
1
,
Math
.
PI
-
0.001
,
1
,
nodes
[
1
],
nodes
[
3
],
0
));
creases
.
push
(
new
Crease
(
edges
[
4
],
2
,
1
,
Math
.
PI
-
0.001
,
1
,
nodes
[
4
],
nodes
[
0
],
1
));
var
_allNodeObject3Ds
=
[];
_
.
each
(
nodes
,
function
(
node
){
...
...
Write
Preview
Supports
Markdown
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