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
7b8fd143
Commit
7b8fd143
authored
May 04, 2017
by
amandaghassaei
Browse files
max strain clip
parent
f35fd711
Changes
4
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
7b8fd143
...
@@ -493,6 +493,10 @@
...
@@ -493,6 +493,10 @@
<input
name=
"colorMode"
value=
"axialStrain"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
<input
name=
"colorMode"
value=
"axialStrain"
data-toggle=
"radio"
class=
"custom-radio"
type=
"radio"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Axial Strain Material
<a
class=
"about floatRight"
href=
"#"
id=
"aboutAxialStrain"
><span
class=
"fui-question-circle"
></span></a>
Axial Strain Material
<a
class=
"about floatRight"
href=
"#"
id=
"aboutAxialStrain"
><span
class=
"fui-question-circle"
></span></a>
</label>
</label>
<div
id=
"axialStrainMaterialOptions"
class=
"indent"
>
<label>
Max Strain:
</label>
<input
id=
"strainClip"
value=
""
placeholder=
""
class=
"float form-control"
type=
"text"
>
%
<br/>
</div>
</div>
</div>
</div><br/>
</div><br/>
Edges:
Edges:
...
...
js/controls.js
View file @
7b8fd143
...
@@ -347,10 +347,14 @@ function initControls(globals){
...
@@ -347,10 +347,14 @@ function initControls(globals){
if
(
globals
.
colorMode
==
"
color
"
)
$
(
"
#coloredMaterialOptions
"
).
show
();
if
(
globals
.
colorMode
==
"
color
"
)
$
(
"
#coloredMaterialOptions
"
).
show
();
else
$
(
"
#coloredMaterialOptions
"
).
hide
();
else
$
(
"
#coloredMaterialOptions
"
).
hide
();
if
(
globals
.
colorMode
==
"
axialStrain
"
)
$
(
"
#axialStrainMaterialOptions
"
).
show
();
else
$
(
"
#axialStrainMaterialOptions
"
).
hide
();
setRadio
(
"
colorMode
"
,
globals
.
colorMode
,
function
(
val
){
setRadio
(
"
colorMode
"
,
globals
.
colorMode
,
function
(
val
){
globals
.
colorMode
=
val
;
globals
.
colorMode
=
val
;
if
(
val
==
"
color
"
)
$
(
"
#coloredMaterialOptions
"
).
show
();
if
(
val
==
"
color
"
)
$
(
"
#coloredMaterialOptions
"
).
show
();
else
$
(
"
#coloredMaterialOptions
"
).
hide
();
else
$
(
"
#coloredMaterialOptions
"
).
hide
();
if
(
val
==
"
axialStrain
"
)
$
(
"
#axialStrainMaterialOptions
"
).
show
();
else
$
(
"
#axialStrainMaterialOptions
"
).
hide
();
globals
.
model
.
setMeshMaterial
();
globals
.
model
.
setMeshMaterial
();
});
});
...
@@ -409,6 +413,10 @@ function initControls(globals){
...
@@ -409,6 +413,10 @@ function initControls(globals){
$
(
"
#aboutAxialStrainModal
"
).
modal
(
"
show
"
);
$
(
"
#aboutAxialStrainModal
"
).
modal
(
"
show
"
);
});
});
setInput
(
"
#strainClip
"
,
globals
.
strainClip
,
function
(
val
){
globals
.
strainClip
=
val
;
},
0.0001
,
100
);
function
setButtonGroup
(
id
,
callback
){
function
setButtonGroup
(
id
,
callback
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
e
.
preventDefault
();
e
.
preventDefault
();
...
...
js/dynamic/dynamicSolver.js
View file @
7b8fd143
...
@@ -179,7 +179,7 @@ function initDynamicSolver(globals){
...
@@ -179,7 +179,7 @@ function initDynamicSolver(globals){
positions
[
3
*
i
+
1
]
=
nexPos
.
y
;
positions
[
3
*
i
+
1
]
=
nexPos
.
y
;
positions
[
3
*
i
+
2
]
=
nexPos
.
z
;
positions
[
3
*
i
+
2
]
=
nexPos
.
z
;
if
(
colors
){
if
(
colors
){
var
scaledVal
=
(
1
-
nodeError
/
globals
.
error
Clip
)
*
0.7
;
var
scaledVal
=
(
1
-
100
*
nodeError
/
globals
.
strain
Clip
)
*
0.7
;
var
color
=
new
THREE
.
Color
();
var
color
=
new
THREE
.
Color
();
color
.
setHSL
(
scaledVal
,
1
,
0.5
);
color
.
setHSL
(
scaledVal
,
1
,
0.5
);
colors
[
3
*
i
]
=
color
.
r
;
colors
[
3
*
i
]
=
color
.
r
;
...
...
js/globals.js
View file @
7b8fd143
...
@@ -44,7 +44,7 @@ function initGlobals(){
...
@@ -44,7 +44,7 @@ function initGlobals(){
percentDamping
:
1
,
percentDamping
:
1
,
density
:
1
,
density
:
1
,
error
Clip
:
0
.0
5
,
strain
Clip
:
5
.0
,
//import pattern settings
//import pattern settings
vertTol
:
3
,
//vertex merge tolerance
vertTol
:
3
,
//vertex merge tolerance
...
...
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