Skip to content

chrisjburch/leapjs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Leap JS

This is the js framework for working with the Leap.

Installation

Either grab the js file in the root of the project. There is a minified version there too.

If you're using npm, you can use npm install leapjs.

Usage

Using the javascript event loop

Leap.loop(function(frame) {
  // ... your code here
})

Do-it-yourself loop

To use the leap motion api do the following...

var controller = new Leap.Controller();
controller.onFrame(function() {
  console.log("hello")
  console.log(controller.frame().id)
  console.log(controller.frame().fingers.length)
  console.log(controller.frame().finger(0))
})
controller.connect()

About

Leap Javascript library

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • JavaScript 98.5%
  • HTML 1.2%
  • Ruby 0.3%