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
005bdf4f
Commit
005bdf4f
authored
Feb 25, 2017
by
amandaghassaei
Browse files
panel damping
parent
1b89046d
Changes
2
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
005bdf4f
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
vec2
scaledNormalsIndex
=
normalsIndex
/
u_textureDimFaces
;
vec2
scaledNormalsIndex
=
normalsIndex
/
u_textureDimFaces
;
vec3
normal
=
texture2D
(
u_normals
,
scaledNormalsIndex
).
xyz
;
vec3
normal
=
texture2D
(
u_normals
,
scaledNormalsIndex
).
xyz
;
float
angForce
=
creaseMeta
[
0
]
*
(
creaseMeta
[
2
]
-
thetas
[
0
]);
float
angForce
=
creaseMeta
[
0
]
*
(
creaseMeta
[
2
]
-
thetas
[
0
])
+
creaseMeta
[
1
]
*
thetas
[
1
];
;
float
momentArm
=
creaseMeta2
[
1
];
float
momentArm
=
creaseMeta2
[
1
];
vec3
_force
=
angForce
/
momentArm
*
normal
;
vec3
_force
=
angForce
/
momentArm
*
normal
;
...
...
js/controls.js
View file @
005bdf4f
...
@@ -51,12 +51,12 @@ function initControls(globals){
...
@@ -51,12 +51,12 @@ function initControls(globals){
globals
.
dynamicModel
.
updateMaterials
();
globals
.
dynamicModel
.
updateMaterials
();
});
});
setSliderInput
(
"
#creaseStiffness
"
,
globals
.
creaseStiffness
,
1
,
1000
,
1
,
function
(
val
){
setSliderInput
(
"
#creaseStiffness
"
,
globals
.
creaseStiffness
,
0
,
1000
,
1
,
function
(
val
){
globals
.
creaseStiffness
=
val
;
globals
.
creaseStiffness
=
val
;
globals
.
dynamicModel
.
updateCreasesMeta
();
globals
.
dynamicModel
.
updateCreasesMeta
();
});
});
setSliderInput
(
"
#panelStiffness
"
,
globals
.
panelStiffness
,
1
,
1000
,
1
,
function
(
val
){
setSliderInput
(
"
#panelStiffness
"
,
globals
.
panelStiffness
,
0
,
1000
,
1
,
function
(
val
){
globals
.
panelStiffness
=
val
;
globals
.
panelStiffness
=
val
;
globals
.
dynamicModel
.
updateCreasesMeta
();
globals
.
dynamicModel
.
updateCreasesMeta
();
});
});
...
...
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