Skip to content
GitLab
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
d2587d80
Commit
d2587d80
authored
May 05, 2017
by
amandaghassaei
Browse files
toggle user interaction
parent
e7400a4d
Changes
5
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
d2587d80
...
...
@@ -434,6 +434,10 @@
Compliant Static Simulation (not finished yet)
<a
class=
"about floatRight"
href=
"#"
id=
"aboutStaticSim"
><span
class=
"fui-question-circle"
></span></a>
</label>
</div><br/>
<label
class=
"checkbox"
for=
"userInteractionEnabled"
>
<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>
...
...
js/3dUI.js
View file @
d2587d80
...
...
@@ -38,6 +38,8 @@ function init3DUI(globals) {
isDragging
=
true
;
}
if
(
!
globals
.
userInteractionEnabled
)
return
;
e
.
preventDefault
();
mouse
.
x
=
(
e
.
clientX
/
window
.
innerWidth
)
*
2
-
1
;
mouse
.
y
=
-
(
e
.
clientY
/
window
.
innerHeight
)
*
2
+
1
;
...
...
js/controls.js
View file @
d2587d80
...
...
@@ -439,6 +439,10 @@ function initControls(globals){
globals
.
strainClip
=
val
;
},
0.0001
,
100
);
setCheckbox
(
$
(
"
#userInteractionEnabled
"
),
globals
.
userInteractionEnabled
,
function
(
val
){
globals
.
userInteractionEnabled
=
val
;
});
function
setButtonGroup
(
id
,
callback
){
$
(
id
+
"
a
"
).
click
(
function
(
e
){
e
.
preventDefault
();
...
...
js/globals.js
View file @
d2587d80
...
...
@@ -53,7 +53,9 @@ function initGlobals(){
filename
:
null
,
extension
:
null
,
doublesidedSTL
:
false
,
scale
:
1
scale
:
1
,
userInteractionEnabled
:
false
};
...
...
js/node.js
View file @
d2587d80
...
...
@@ -135,6 +135,7 @@ Node.prototype.highlight = function(){
};
Node
.
prototype
.
unhighlight
=
function
(){
if
(
!
this
.
object3D
)
return
;
if
(
this
.
fixed
)
{
this
.
object3D
.
material
=
nodeMaterialFixed
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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