Commit a169ee0e authored by Amanda Ghassaei's avatar Amanda Ghassaei

small bug fixes

parent 7dca3d67
This diff is collapsed.
This diff is collapsed.
......@@ -726,7 +726,7 @@
}
</script>
<script type="text/javascript" src="dependencies/jquery-3.1.1.min.js"></script>
<script type="text/javascript" src="dependencies/jquery-3.2.1.min.js"></script>
<script type="text/javascript" src="dependencies/jquery-ui.min.js"></script>
<script type="text/javascript" src="dependencies/flat-ui.min.js"></script>
<script type="text/javascript" src="dependencies/three.js"></script><!--todo .min-->
......
......@@ -45,7 +45,7 @@ function init3DUI(globals) {
if (!globals.userInteractionEnabled) return;
e.preventDefault();
// e.preventDefault();
mouse.x = (e.clientX/window.innerWidth)*2-1;
mouse.y = - (e.clientY/window.innerHeight)*2+1;
raycaster.setFromCamera(mouse, globals.threeView.camera);
......
......@@ -51,11 +51,11 @@ function initViveInterface(globals){
scene.add( gui );
gui.visible = false;
// gui.add(variables, "foldPercent").min(-100).max(100).step(1).name("Fold Percent").onChange(function(val){
// globals.creasePercent = val/100;
// globals.shouldChangeCreasePercent = true;
// globals.controls.updateCreasePercent();//update other gui
// });
gui.add(variables, "foldPercent").min(-100).max(100).step(1).name("Fold Percent").onChange(function(val){
globals.creasePercent = val/100;
globals.shouldChangeCreasePercent = true;
globals.controls.updateCreasePercent();//update other gui
});
gui.add(variables, "strainMap").name("Show Strain").onChange( function(val) {
var mode = "color";
if (val) mode = "axialStrain";
......@@ -175,6 +175,7 @@ function initViveInterface(globals){
e.preventDefault();
globals.vrEnabled = !display.isPresenting;
renderer.vr.enabled = globals.vrEnabled;
if (globals.vrEnabled) {
globals.threeView.modelWrapper.scale.set(variables.scale, variables.scale, variables.scale);
globals.threeView.modelWrapper.position.copy(variables.position);
......@@ -190,6 +191,8 @@ function initViveInterface(globals){
globals.threeView.setBackgroundColor();
globals.threeView.modelWrapper.scale.set(1, 1, 1);
globals.threeView.modelWrapper.position.set(0,0,0);
// renderer.setPixelRatio( window.devicePixelRatio );
// renderer.setSize(window.innerWidth, window.innerHeight);
}
_.each(controllers, function(controller){
_.each(controller.children, function(child){
......
......@@ -67,6 +67,7 @@ function initControls(globals){
}
globals.menusVisible = !globals.menusVisible;
});
$("#controls").fadeIn();
setLink("#about", function(){
$('#aboutModal').modal('show');
......@@ -475,6 +476,7 @@ function initControls(globals){
$('#currentFoldPercent').val(val);
$('#creasePercent>input').val(val);
}
// updateCreasePercent();
function setDeltaT(val){
$("#deltaT").html(val.toFixed(4));
......
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