Commit 434bd603 authored by amandaghassaei's avatar amandaghassaei

debugging

parent 6999b8b0
......@@ -255,8 +255,12 @@ function initDynamicSolver(globals){
globals.gpuMath.setUniformForProgram("thetaCalc", "u_dt", dt, "1f");
globals.gpuMath.setProgram("velocityCalc");
globals.gpuMath.setUniformForProgram("velocityCalc", "u_dt", dt, "1f");
globals.gpuMath.setProgram("positionCalcVerlet");
globals.gpuMath.setUniformForProgram("positionCalcVerlet", "u_dt", dt, "1f");
globals.gpuMath.setProgram("positionCalc");
globals.gpuMath.setUniformForProgram("positionCalc", "u_dt", dt, "1f");
globals.gpuMath.setProgram("velocityCalcVerlet");
globals.gpuMath.setUniformForProgram("velocityCalcVerlet", "u_dt", dt, "1f");
globals.controls.setDeltaT(dt);
}
......@@ -447,6 +451,8 @@ function initDynamicSolver(globals){
if (programsInited) {
globals.gpuMath.setProgram("velocityCalc");
globals.gpuMath.setUniformForProgram("velocityCalc", "u_axialStiffness", globals.axialStiffness, "1f");
globals.gpuMath.setProgram("positionCalcVerlet");
globals.gpuMath.setUniformForProgram("positionCalcVerlet", "u_axialStiffness", globals.axialStiffness, "1f");
setSolveParams();//recalc dt
}
}
......@@ -515,6 +521,8 @@ function initDynamicSolver(globals){
if (!programsInited) return;
globals.gpuMath.setProgram("velocityCalc");
globals.gpuMath.setUniformForProgram("velocityCalc", "u_creasePercent", percent, "1f");
globals.gpuMath.setProgram("positionCalcVerlet");
globals.gpuMath.setUniformForProgram("positionCalcVerlet", "u_creasePercent", percent, "1f");
}
function initTypedArrays(){
......
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