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
OrigamiSimulator
Commits
e8deb63d
Commit
e8deb63d
authored
May 30, 2017
by
amandaghassaei
Browse files
cleaning up
parent
49d09992
Changes
1
Hide whitespace changes
Inline
Side-by-side
js/dynamic/dynamicSolver.js
View file @
e8deb63d
...
...
@@ -203,10 +203,10 @@ function initDynamicSolver(globals){
var
nodeError
=
parsedPixels
[
rgbaIndex
+
3
]
*
100
;
globalError
+=
nodeError
;
var
nodePosition
=
new
THREE
.
Vector3
(
parsedPixels
[
rgbaIndex
],
parsedPixels
[
rgbaIndex
+
1
],
parsedPixels
[
rgbaIndex
+
2
]);
var
nexPos
=
nodes
[
i
].
render
(
node
Position
);
positions
[
3
*
i
]
=
n
exPos
.
x
;
positions
[
3
*
i
+
1
]
=
n
exPos
.
y
;
positions
[
3
*
i
+
2
]
=
n
exPos
.
z
;
nodePosition
.
add
(
nodes
[
i
].
_original
Position
);
positions
[
3
*
i
]
=
n
odePosition
.
x
;
positions
[
3
*
i
+
1
]
=
n
odePosition
.
y
;
positions
[
3
*
i
+
2
]
=
n
odePosition
.
z
;
if
(
shouldUpdateColors
){
if
(
nodeError
>
globals
.
strainClip
)
nodeError
=
globals
.
strainClip
;
var
scaledVal
=
(
1
-
nodeError
/
globals
.
strainClip
)
*
0.7
;
...
...
@@ -218,9 +218,6 @@ function initDynamicSolver(globals){
}
}
$errorOutput
.
html
((
globalError
/
nodes
.
length
).
toFixed
(
7
)
+
"
%
"
);
for
(
var
i
=
0
;
i
<
edges
.
length
;
i
++
){
edges
[
i
].
render
();
}
}
else
{
console
.
log
(
"
shouldn't be here
"
);
}
...
...
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