Skip to content

Instantly share code, notes, and snippets.

@cdbkr
Last active January 2, 2016 11:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cdbkr/8300046 to your computer and use it in GitHub Desktop.
Save cdbkr/8300046 to your computer and use it in GitHub Desktop.
Initialize LeapMotion js
var controller = new Leap.Controller({enableGestures:true});
controller.on('connect', function() {
console.log("Successfully connected.");
});
controller.on('deviceConnected', function() {
console.log("A Leap device has been connected.");
});
controller.on('deviceDisconnected', function() {
console.log("A Leap device has been disconnected.");
});
controller.on('frame', function(frame){
//on frame callback
});
controller.connect();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment