3. Examples
1. Connect your LeapMotion to your computer
2. Make sure your computer is tracking LeapMotion
3. Try an example from below:
https://developer.leapmotion.com/gallery/category/javascript
5. Capabilities: Hand
LeapMotion can detect:
● which hand is being used (left or right)
● position of your palm
● speed of your palm movement
● direction of where your palm is pointing
● strength of grab and pinch
● scale, rotation, and translation factors
6. Capabilities: Fingers
LeapMotion can detect:
• Type of Finger Bones
metacarpal, proximal, intermediate, and distal
• Position of Finger Bones
• If a finger is extended or not
• Type of Fingers
thumb, index, middle, ring, pinky
10. LeapMotion: Step 1
● Download SDK from: (sign up may be required)
https://developer.leapmotion.com
● Include all JavaScript Libraries
https://developer.leapmotion.com/downloads/javascript
● You do not need to npm install.
11. LeapMotion: Step 2
● Connect to LeapMotion device
● Leap.loop() function implicitly connects web app with
LeapMotion
● What is options?
● What is frame?
12. Options
● Settings for your LeapMotion connection
● Represented as JSON (or Object)
● Commonly used to enable Gesture
o var options = {enableGestures: true};
● Other options:
o host, port, background,optimizeHMD,frameEventName,
useAllPlugins,and loopWhileDisconnected
13. Frame
● Similar to a parent of all LeapMotion objects
● For example, frame.hands will return an array of
Hands object.
● You may also use frame.gestures to get the
array of Gestures that LeapMotion can offer.