Commit ca972d08 authored by amandaghassaei's avatar amandaghassaei

switching integration types supported

parent bca57784
......@@ -391,6 +391,7 @@ function initControls(globals){
});
setRadio("integrationType", globals.integrationType, function(val){
globals.dynamicSolver.reset();
globals.integrationType = val;
});
......@@ -459,10 +460,6 @@ function initControls(globals){
$("#deltaT").html(val.toFixed(4));
}
setLink("#resetDynamicSim", function(){
globals.shouldResetDynamicSim = true;
});
setLink(".loadFile", function(e){
$("#fileSelector").click();
$(e.target).blur();
......
......@@ -63,7 +63,7 @@ function initDynamicSolver(globals){
function reset(){
globals.gpuMath.step("zeroTexture", [], "u_position");
globals.gpuMath.step("zeroTexture", [], "u_lastPosition");
if (globals.integrationType == "verlet") globals.gpuMath.step("zeroTexture", [], "u_lastLastPosition");
globals.gpuMath.step("zeroTexture", [], "u_lastLastPosition");
globals.gpuMath.step("zeroTexture", [], "u_velocity");
globals.gpuMath.step("zeroTexture", [], "u_lastVelocity");
globals.gpuMath.step("zeroThetaTexture", ["u_lastTheta"], "u_theta");
......
......@@ -29,7 +29,7 @@ function initGlobals(){
forceHasChanged: false,
materialHasChanged: false,
creaseMaterialHasChanged: false,
shouldResetDynamicSim: false,
shouldResetDynamicSim: false,//not used
shouldChangeCreasePercent: false,
nodePositionHasChanged: false,
shouldZeroDynamicVelocity: false,
......
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