Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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