Skip to content

Instantly share code, notes, and snippets.

@laurisvan
Created February 5, 2015 05:59
Show Gist options
  • Save laurisvan/0fa2b016abcc3bb2cdb9 to your computer and use it in GitHub Desktop.
Save laurisvan/0fa2b016abcc3bb2cdb9 to your computer and use it in GitHub Desktop.
LeapMotion index finger pointing test
/**
* Simple test of LeapMotion in node.js
*/
var Leap = require('leapjs');
var controller = new Leap.Controller({enableGestures: true})
.connect()
.on('frame', function(frame){
var hand = frame.hands[0];
if (hand) {
console.log(hand.indexFinger.tipPosition);
}
});
{
"name": "leap-motion-test",
"version": "0.0.1",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Lauri Svan <[email protected]> (https://github.com/laurisvan)",
"license": "MIT",
"dependencies": {
"leapjs": "^0.6.4"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment