Commit cf4c5810 authored by amandaghassaei's avatar amandaghassaei

vive

parent ec428a05
......@@ -301,14 +301,15 @@
float theta = atan(y, x);
float diff = theta-lastTheta[0];
float origDiff = diff;
if (diff < -5.0) {
diff += TWO_PI;
theta = lastTheta[0] + diff;
} else if (diff > 5.0) {
diff -= TWO_PI;
theta = lastTheta[0] + diff;
}
gl_FragColor = vec4(theta, theta, lastTheta[2], lastTheta[3]);//[theta, w, normal1Index, normal2Index]
//if (abs(diff)>0.01) diff = 0.0;
theta = lastTheta[0] + diff;
gl_FragColor = vec4(theta, origDiff, lastTheta[2], lastTheta[3]);//[theta, w, normal1Index, normal2Index]
}
</script>
......
......@@ -12,6 +12,8 @@ function initViveInterface(globals){
$("#VRoptions").hide();
return;
}
$status.html("No device connected.");
$("#VRoptions").show();
var controls, controller1, controller2, effect;
......
......@@ -174,7 +174,7 @@ function initDynamicSolver(globals){
// globals.gpuMath.readPixels(0, 0, textureDimCreases * vectorLength, height, pixels);
// var parsedPixels = new Float32Array(pixels.buffer);
// for (var i=0;i<parsedPixels.length;i+=2){
// if (Math.abs(parsedPixels[i+1])>3.0) console.log(parsedPixels[i+1]);
// if (Math.abs(parsedPixels[i+1])>0.1) console.log(parsedPixels[i+1]);
// }
// } else {
// console.log("here");
......
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