SlideShare a Scribd company logo
1 of 16
Download to read offline
COGS 121 | 05/14/2015
+
Overview
● Examples from Website
● Capabilities of LeapMotion
● Basic Coding Structure
● Demo
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
Positions
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
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
Capabilities: Fingers
Source: http://en.wikipedia.org/wiki/Phalanx_bone
Capabilities: Gestures
Gestures in LeapMotion:
● Circular finger movements
● Swipe
● Screen tap
● Key tap
System Architecture
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.
LeapMotion: Step 2
● Connect to LeapMotion device
● Leap.loop() function implicitly connects web app with
LeapMotion
● What is options?
● What is frame?
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
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.
Accessing Gesture
Using forEach Loop: Using on() function:
Putting it Together
HTML: script.js:
LeapMotion
Libraries
Live Demo

More Related Content

Similar to LeapMotion_CrashCourse

Nonintrusive semantic html5
Nonintrusive semantic html5Nonintrusive semantic html5
Nonintrusive semantic html5Muhamad Arief
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentDaniel Wildt
 
Responsive Design and Development "Gotchas"
Responsive Design and Development "Gotchas"Responsive Design and Development "Gotchas"
Responsive Design and Development "Gotchas"Andrew Malek
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices ArchitectureIzzet Mustafaiev
 
How to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsHow to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsDevOps.com
 
MobileCity: UI UX Design
MobileCity: UI UX DesignMobileCity: UI UX Design
MobileCity: UI UX DesignAllan Davis
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at FrosconKris Buytaert
 
Interactions in Responsive Web - BDConf Orlando 2014
Interactions in Responsive Web - BDConf Orlando 2014Interactions in Responsive Web - BDConf Orlando 2014
Interactions in Responsive Web - BDConf Orlando 2014Jenn Lukas
 
Levitum - Working With Us
Levitum - Working With UsLevitum - Working With Us
Levitum - Working With UsLevitum
 
Performance Management at Employment Hero
Performance Management at Employment Hero Performance Management at Employment Hero
Performance Management at Employment Hero Luong Vo
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Kris Buytaert
 
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015 Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015 lokeshpidawekar
 
Habits of Highly Effective Platform Teams: Unlocking the Value of PCF
Habits of Highly Effective Platform Teams: Unlocking the Value of PCFHabits of Highly Effective Platform Teams: Unlocking the Value of PCF
Habits of Highly Effective Platform Teams: Unlocking the Value of PCFVMware Tanzu
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabbleCraig Sullivan
 
Building a SOC - hackmiami 2018
Building a SOC -  hackmiami 2018Building a SOC -  hackmiami 2018
Building a SOC - hackmiami 2018Jose Hernandez
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsJoEllen Carter
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysDemi Ben-Ari
 

Similar to LeapMotion_CrashCourse (20)

Nonintrusive semantic html5
Nonintrusive semantic html5Nonintrusive semantic html5
Nonintrusive semantic html5
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 
Responsive Design and Development "Gotchas"
Responsive Design and Development "Gotchas"Responsive Design and Development "Gotchas"
Responsive Design and Development "Gotchas"
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
How to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot EnvironmentsHow to Manage the Risk of your Polyglot Environments
How to Manage the Risk of your Polyglot Environments
 
MobileCity: UI UX Design
MobileCity: UI UX DesignMobileCity: UI UX Design
MobileCity: UI UX Design
 
Devops Devops Devops, at Froscon
Devops Devops Devops, at FrosconDevops Devops Devops, at Froscon
Devops Devops Devops, at Froscon
 
Interactions in Responsive Web - BDConf Orlando 2014
Interactions in Responsive Web - BDConf Orlando 2014Interactions in Responsive Web - BDConf Orlando 2014
Interactions in Responsive Web - BDConf Orlando 2014
 
Levitum - Working With Us
Levitum - Working With UsLevitum - Working With Us
Levitum - Working With Us
 
Performance Management at Employment Hero
Performance Management at Employment Hero Performance Management at Employment Hero
Performance Management at Employment Hero
 
Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.Devops, the future is here, it's just not evenly distributed yet.
Devops, the future is here, it's just not evenly distributed yet.
 
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015 Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015
Hacker's Practice Ground - Wall of Sheep workshops - Defcon 2015
 
Habits of Highly Effective Platform Teams: Unlocking the Value of PCF
Habits of Highly Effective Platform Teams: Unlocking the Value of PCFHabits of Highly Effective Platform Teams: Unlocking the Value of PCF
Habits of Highly Effective Platform Teams: Unlocking the Value of PCF
 
Android testing
Android testingAndroid testing
Android testing
 
Measure camp tools of the cro rabble
Measure camp   tools of the cro rabbleMeasure camp   tools of the cro rabble
Measure camp tools of the cro rabble
 
Building a SOC - hackmiami 2018
Building a SOC -  hackmiami 2018Building a SOC -  hackmiami 2018
Building a SOC - hackmiami 2018
 
Agile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing FundamentalsAgile Testing Days 2018 USA - API Testing Fundamentals
Agile Testing Days 2018 USA - API Testing Fundamentals
 
Technology Trend 2018
Technology Trend 2018Technology Trend 2018
Technology Trend 2018
 
Mobile+API
Mobile+APIMobile+API
Mobile+API
 
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - PanoraysHacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
Hacking for fun & profit - The Kubernetes Way - Demi Ben-Ari - Panorays
 

LeapMotion_CrashCourse