This repository has been archived by the owner on May 15, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Home
deckar01 edited this page Apr 22, 2013
·
23 revisions
LeapJS is a Javascript library that provides the functionality and object structure of the Leap API to assist developers who are working with the Leap Motion in a browser environment.
Leap
- string APIVersion
- string serverVersion
-
Calibrate
- Calibrate( Controller controller )
- virtual void onComplete( Screen screen )
-
Controller
- Controller( string connection )
- Bool isConnected()
- Frame frame()
- Frame frame( Int index )
- void addListener( Listener listener )
- void removeListener( Listener listener )
- void enableGesture( string type, Bool enable )
- Bool isGestureEnabled( string type )
- ScreenList locatedScreens()
-
Listener
- Listener()
- void onConnect( Controller controller )
- void onDisconnect( Controller controller )
- void onExit( Controller controller )
- void onFrame( Controller controller )
- void onInit( Controller controller )
-
Frame
- Frame()
- string id()
- string timestamp()
- FingerList fingers()
- ToolList tools()
- PointableList pointables()
- HandList hands()
- Finger finger( string id )
- Hand hand( string id )
- Pointable pointable( string id )
- Tool tool( string id )
- GestureList gestures()
- float rotationAngle( Frame sinceFrame )
- Vector rotationAxis( Frame sinceFrame )
- Matrix rotationMatrix( Frame sinceFrame )
- float scaleFactor( Frame sinceFrame )
- Vector translation( Frame sinceFrame )
- string tostring()
- Bool compare( Frame other )
- Bool isValid()
- static Frame invalid()
-
Gesture
- string id()
- Frame frame()
- string state()
- string type()
- string toString()
-
CircleGesture : Gesture
- Type "circle"
- Vector normal()
- Pointable pointable()
- float progress()
- float radius()
-
KeyTapGesture : Gesture
- Type "keyTap"
- Vector direction()
- Pointable pointable()
- Vector position()
- float progress()
-
ScreenTapGesture : Gesture
- Type "screenTap"
- Vector direction()
- Pointable pointable()
- Vector position()
- float progress()
-
SwipeGesture : Gesture
- Type "swipe"
- Vector direction()
- Pointable pointable()
- Vector position()
- float speed()
- Vector startPosition()
-
Hand
- Hand()
- Frame frame()
- string id()
- FingerList fingers()
- ToolList tools()
- PointableList pointables()
- Vector direction()
- Vector palmNormal()
- Vector palmPosition()
- Vector palmVelocity()
- Vector sphereCenter()
- float sphereRadius()
- Finger finger( string id )
- Pointable pointable( string id )
- Tool tool( string id )
- float rotationAngle( Frame sinceFrame )
- Vector rotationAxis( Frame sinceFrame )
- Matrix rotationMatrix( Frame sinceFrame )
- float scaleFactor( Frame sinceFrame )
- Vector translation( Frame sinceFrame )
- string tostring()
- Bool isValid()
- static Hand invalid()
-
HandList
- HandList()
- Hand operator[]
- void append( HandList other )
- int count()
- Bool isEmpty()
-
Finger : Pointable
- Finger()
- static Finger invalid()
-
FingerList
- FingerList()
- Finger operator[]
- void append( FingerList other )
- int count()
- Bool isEmpty()
-
Tool : Pointable
- Tool()
- static Tool invalid()
-
ToolList
- ToolList()
- Tool operator[]
- void append( ToolList other )
- int count()
- Bool isEmpty()
-
Pointable
- Pointable()
- Frame frame()
- Hand hand()
- string id()
- Vector direction()
- Vector tipPosition()
- Vector tipVelocity()
- float length()
- float width()
- Bool isFinger()
- Bool isTool()
- string tostring()
- Bool compare( Pointable other )
- Bool isValid()
- static Pointable invalid()
-
PointableList
- PointableList()
- PointableList( PointableList other )
- Pointable operator[]
- void append( PointableList other )
- void append( FingerList other )
- void append( ToolList other )
- int count()
- Bool isEmpty()
-
Screen
- Screen()
- float distanceToPoint( Vector point )
- { position : Vector, distance : float } intersect( Pointable pointable, Bool normalize )
- { position : Vector, distance : float } intersect( Vector position, Vector direction, Bool normalize )
- { position : Vector, distance : float } project( Pointable pointable, Bool normalize )
- { position : Vector, distance : float } project( Vector position, Bool normalize )
- Vector normal()
- void offset()
- Bool isValid()
- static Screen invalid()
-
ScreenList
- ScreenList()
- Screen operator[]
- int count()
- Screen closestScreenHit( Pointable pointable )
- Bool isEmpty()
-
Vector
- Vector()
- Vector( Vector other )
- Vector( [ float x, float y, float z ] )
- float x
- float y
- float z
- float angleTo( Vector other )
- Vector cross( Vector other )
- float distanceTo( Vector other )
- float dot( Vector other )
- Vector plus( Vector other )
- Vector minus( Vector other )
- Vector multiply( float scalar )
- Vector dividedBy( float scalar )
- float magnitude()
- float magnitudeSquared()
- Vector normalized()
- float pitch()
- float roll()
- float yaw()
- string tostring()
- Bool compare( Vector other )
- Bool isValid()
- static Vector backward()
- static Vector down()
- static Vector forward()
- static Vector left()
- static Vector right()
- static Vector up()
- static Vector xAxis()
- static Vector yAxis()
- static Vector zAxis()
- static Vector zero()
-
Matrix
- Matrix()
- Matrix( Matrix other )
- Matrix( [ Vector xBasis, Vector yBasis, Vector zBasis ] )
- Matrix( [ Vector xBasis, Vector yBasis, Vector zBasis, Vector origin ] )
- Vector xBasis
- Vector yBasis
- Vector zBasis
- Vector origin
- Matrix rigidInverse()
- void setRotation( Vector axis, float angle )
- void transformPoint( Vector data )
- void transformDirection( Vector data )
- Matrix times( Matrix other )
- float[] toArray3x3()
- void toArray3x3( float[] output )
- float[] toArray4x4()
- void toArray4x4( float[] output )
- string tostring()
- Bool compare( Matrix other )
- static Matrix identity()