Commit 005bdf4f authored by amandaghassaei's avatar amandaghassaei

panel damping

parent 1b89046d
...@@ -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;
......
...@@ -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();
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment