Permalink
Browse files

added to do with relevant js

  • Loading branch information...
Jonathan Cutrell
Jonathan Cutrell committed Apr 4, 2012
1 parent 9a4a775 commit 2fc4c7130b1765fb5265ad662fc9cf3f68ad4b66
Showing with 25 additions and 0 deletions.
  1. +25 −0 isaac/scripts/KinectListener_hitBoxes.js
@@ -259,6 +259,31 @@ function KinectListener(skeletonBoxId){
*/
+
+ /* TODO:
+ Implement this.
+ var x = 0, y= 0, prevx = 0, prevy = 0;
+ var pythagDist = 0;
+ var box = document.getElementById("hand);
+ $("#black").mousemove(function(e){
+ x = e.pageX;
+ y = e.pageY;
+ pythagDist = Math.sqrt(Math.pow(prevx - x,2) + Math.pow(prevy - y,2));
+ if (pythagDist > 20){
+ box.style.opacity = (function(){ return 0.2 + (0.8 * (pythagDist / 40))})()
+ }
+
+ box.style.top = e.pageY;
+ top : ,
+ left : e.pageX
+ }).stop().delay(700).animate({"opacity":"0.2"});
+ prevx = x;
+ prevy = y;
+ });
+
+ FROM:
+ http://jsfiddle.net/dBDAT/5/
+*/
//Hand Bubbles
if(j==7){ //left hand bubble
var handX = xRatio*600 + 600;

0 comments on commit 2fc4c71

Please sign in to comment.