Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miya0001/jquery-leapmotion
jQuery plugin for leap motion
https://github.com/miya0001/jquery-leapmotion
Last synced: 2 months ago
JSON representation
jQuery plugin for leap motion
- Host: GitHub
- URL: https://github.com/miya0001/jquery-leapmotion
- Owner: miya0001
- License: bsd-2-clause
- Created: 2013-08-12T17:30:46.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-03-01T07:45:21.000Z (almost 11 years ago)
- Last Synced: 2024-10-17T12:56:06.969Z (2 months ago)
- Language: JavaScript
- Size: 212 KB
- Stars: 15
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# jquery-leapmotion
jquery-leapmotion is a simple jQuery plugin that allows you to add custom event handler for the Leap Motion.
## Setup
Include the jQuery library (version 1.8.3 or newer), leapjs (version 0.2.0) and jquery-leapmotion plugin files in your webpage (preferably at the bottom of the page, before the closing BODY tag):
```html
```
## Events
This plugin add custom events to the window object.
If you want to use these events, please place the code like below.```html
$.leapmotion();
$(window).bind('swipe', function(e, gesture){
console.log(gesture);
});```
### Device Events
- connect
- deviceConnected
- deviceDisconnected
- focus
- blur```html
$.leapmotion();
$(window).bind('deviceConnected', function(e){
console.log("Leap Motion Connected");
});```
### Frame Events
- pointables
- pointablesout
- hands
- handsout
- fingers
- fingersout
- tools
- toolsout```html
$.leapmotion();
$(window).bind('pointables', function(e, frame){
console.log("Points are "+frame.pointables.length);
});```
### Gesture Events
- gesture
- circle
- circlestart
- circleupdate
- circlestop
- circleright
- circleleft
- swipe
- swipestart
- swipeupdate
- swipestop
- swipeleft
- swiperight
- swipetop
- swipebottom
- keytap
- keytapstart
- keytapupdate
- keytapstop
- screentap
- screentapstart
- screentapupdate
- screentapstop```html
$.leapmotion();
$(window).bind('swipestop', function(e, gesture){
jQuery("body:first").animate({scrollTop: 0}, 500);
});```
## Changelog
### Version 0.1.0
* First release