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
ba1a6fea
Commit
ba1a6fea
authored
May 05, 2017
by
amandaghassaei
Browse files
small changes
parent
790f6eb6
Changes
4
Hide whitespace changes
Inline
Side-by-side
css/main.css
View file @
ba1a6fea
...
...
@@ -319,3 +319,9 @@ svg{
#stepForward
{
margin-left
:
13px
;
}
#creasePercent
{
margin-bottom
:
0
;
margin-top
:
9px
;
color
:
white
;
}
index.html
View file @
ba1a6fea
...
...
@@ -414,6 +414,16 @@
<li><a
id=
"about"
class=
"menuHoverControls"
target=
"_blank"
href=
"#"
>
About
</a></li>
<li><a
id=
"tips"
class=
"menuHoverControls"
target=
"_blank"
href=
"#"
>
File Import Tips
</a></li>
</ul>
<!--<form class="navbar-form navbar-right" action="#" role="search">-->
<!--<div class="form-group">-->
<!--<div class="input-group">-->
<div
class=
"sliderInput floatRight"
id=
"creasePercent"
>
<span
class=
"label-slider"
>
Fold Angle (-1 to 1) :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
<input
value=
""
placeholder=
""
class=
"form-control"
type=
"text"
>
</div>
<!--</div>-->
<!--</div>-->
<!--</form>-->
</div>
<!-- /.navbar-collapse -->
<input
id=
"fileSelector"
type=
"file"
>
...
...
@@ -438,12 +448,6 @@
<input
id=
"userInteractionEnabled"
data-toggle=
"checkbox"
class=
"custom-checkbox layersSelector"
type=
"checkbox"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Allow User Interaction
</label><br/>
<b>
Fold Settings:
</b><br/><br/>
<div
class=
"sliderInput"
id=
"creasePercent"
>
<span
class=
"label-slider"
>
Angle (-1 to 1) :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
<input
value=
""
placeholder=
""
class=
"form-control"
type=
"text"
>
</div>
<br/><br/><br/>
<b>
Stiffness Settings:
</b><a
class=
"floatRight about"
href=
"#"
id=
"aboutStiffness"
><span
class=
"fui-question-circle"
></span></a><br/><br/>
<div
class=
"sliderInput"
id=
"axialStiffness"
>
<span
class=
"label-slider"
>
Axial Stiffness :
</span><div
class=
"flat-slider ui-slider ui-corner-all ui-slider-horizontal ui-widget ui-widget-content"
></div>
...
...
@@ -606,12 +610,14 @@
<span
aria-hidden=
"true"
>
×
</span>
</button>
<p><b>
Import FOLD
</b><br/><br/>
use angles as target thetas
<label
class=
"checkbox"
for=
"foldUseAngles"
>
<input
id=
"foldUseAngles"
data-toggle=
"checkbox"
class=
"custom-checkbox layersSelector"
type=
"checkbox"
><span
class=
"icons"
><span
class=
"icon-unchecked"
></span><span
class=
"icon-checked"
></span></span>
Use current angles as target fold angles
</label>
</p>
</div>
<div
class=
"modal-footer"
>
<button
id=
"doImportFold"
type=
"button"
class=
"btn btn-success"
>
Import
</button>
<button
type=
"button"
class=
"btn btn default"
data-dismiss=
"modal"
>
Cancel
</button>
<button
data-dismiss=
"modal"
type=
"button"
class=
"btn btn-success"
>
OK
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal-dialog -->
...
...
js/controls.js
View file @
ba1a6fea
...
...
@@ -174,7 +174,15 @@ function initControls(globals){
}
globals
.
filename
=
name
;
globals
.
extension
=
extension
;
parseFoldJSON
(
JSON
.
parse
(
reader
.
result
));
if
(
reader
.
result
&&
reader
.
result
.
edges_foldAngles
){
parseFoldJSON
(
JSON
.
parse
(
reader
.
result
));
return
;
}
$
(
"
#importFoldModal
"
).
modal
(
"
show
"
);
$
(
'
#importFoldModal
'
).
on
(
'
hidden.bs.modal
'
,
function
()
{
parseFoldJSON
(
JSON
.
parse
(
reader
.
result
));
});
}
}(
file
);
reader
.
readAsText
(
file
);
...
...
@@ -444,6 +452,10 @@ function initControls(globals){
if
(
!
val
)
globals
.
UI3D
.
hideHighlighters
();
});
setCheckbox
(
$
(
"
#foldUseAngles
"
),
globals
.
foldUseAngles
,
function
(
val
){
globals
.
foldUseAngles
=
val
;
});
function
setButtonGroup
(
id
,
callback
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
e
.
preventDefault
();
...
...
js/globals.js
View file @
ba1a6fea
...
...
@@ -48,6 +48,7 @@ function initGlobals(){
//import pattern settings
vertTol
:
3
,
//vertex merge tolerance
foldUseAngles
:
true
,
//save stl settings
filename
:
null
,
...
...
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