Skip to content

Instantly share code, notes, and snippets.

@andrewserff
Created May 6, 2015 23:15
Show Gist options
  • Save andrewserff/6c4c618531f94b564b58 to your computer and use it in GitHub Desktop.
Save andrewserff/6c4c618531f94b564b58 to your computer and use it in GitHub Desktop.
Snippet of the ACESInteractiveParticleWall : https://github.com/acesinc/ACESInteractiveParticleWall
Leap.loop({
hand: function (hand) {
var pos = hand.screenPosition();
if (pJS) {
pJS.interactivity.mouse.pos_x = pos[0] + 100;
pJS.interactivity.mouse.pos_y = pos[1] + 350;
if (pJS.retina) {
pJS.interactivity.mouse.pos_x *= pJS.canvas.pxratio;
pJS.interactivity.mouse.pos_y *= pJS.canvas.pxratio;
}
pJS.interactivity.status = 'mousemove';
}
}
}).use('screenPosition', {scale: 0.70});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment