Commit 341019d4 authored by amandaghassaei's avatar amandaghassaei
Browse files

small changes

parent 5f39910a
......@@ -17,23 +17,7 @@ function initControls(globals){
setLink("#about", function(){
$('#aboutModal').modal('show');
});
var dynamicSimVisCallback = function(val){
if (val) {
$(".dynamicSim").show();
if (globals.dynamicModel) {
globals.dynamicModel.resume();
globals.dynamicModel.setVisibility(true);
}
}
else {
$(".dynamicSim").hide();
if (globals.dynamicModel) {
globals.dynamicModel.pause();
globals.dynamicModel.setVisibility(false);
}
}
};
setCheckbox("#dynamic", globals.simType == "dynamic", function(val){
globals.simType = val;
});
......
......@@ -104,11 +104,6 @@ function initDynamicModel(globals){
render();
}
function setVisibility(state){
object3D.visible = state;
globals.threeView.render();
}
function solveStep(){
var gpuMath = globals.gpuMath;
......@@ -475,7 +470,6 @@ function initDynamicModel(globals){
return {
syncNodesAndEdges: syncNodesAndEdges,
setVisibility: setVisibility,
updateFixed: updateFixed,
solve: solve
}
......
......@@ -200,7 +200,6 @@ function initStaticSolver(){
F_rxn[3*i+2] -= edgeVector0.z*rxnForceScale;
}
}
// console.log(F_rxn);
for (var j=0;j<numFreeCreases;j++){
var crease = creases[freeCreasesMapping[j]];
......@@ -223,7 +222,6 @@ function initStaticSolver(){
if (!crease.node1.fixed){
var i = indicesMapping.indexOf(crease.node1.getIndex());
var dist = crease.getLengthToNode1();
// dist = 1.0;
C[j+numFreeEdges][3*i] = -normal1.x/dist;
C[j+numFreeEdges][3*i+1] = -normal1.y/dist;
C[j+numFreeEdges][3*i+2] = -normal1.z/dist;
......@@ -234,9 +232,7 @@ function initStaticSolver(){
}
if (!crease.node2.fixed){
var i = indicesMapping.indexOf(crease.node2.getIndex());
// console.log(normal);
var dist = crease.getLengthToNode2();
// dist = 1.0;
C[j+numFreeEdges][3*i] = -normal2.x/dist;
C[j+numFreeEdges][3*i+1] = -normal2.y/dist;
C[j+numFreeEdges][3*i+2] = -normal2.z/dist;
......@@ -245,9 +241,6 @@ function initStaticSolver(){
F_rxn[3*i+1] += normal2.y*rxnForceScale;
F_rxn[3*i+2] += normal2.z*rxnForceScale;
}
// var invCreaseDirection = normal1.clone().add(normal2).normalize();
// if (!crease.edge.nodes[0].fixed){
// }
}
}
......
Supports Markdown
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