Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Amanda Ghassaei
OrigamiSimulator
Commits
cf4c5810
Commit
cf4c5810
authored
May 10, 2017
by
amandaghassaei
Browse files
vive
parent
ec428a05
Changes
3
Hide whitespace changes
Inline
Side-by-side
index.html
View file @
cf4c5810
...
...
@@ -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>
...
...
js/ViveInterface.js
View file @
cf4c5810
...
...
@@ -12,6 +12,8 @@ function initViveInterface(globals){
$
(
"
#VRoptions
"
).
hide
();
return
;
}
$status
.
html
(
"
No device connected.
"
);
$
(
"
#VRoptions
"
).
show
();
var
controls
,
controller1
,
controller2
,
effect
;
...
...
js/dynamic/dynamicSolver.js
View file @
cf4c5810
...
...
@@ -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");
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment