BB.LeapMotion
A module implementing LeapMotion Sensor.
Note: The constructor makes throws an Error if the LeapMotion library is not already loaded. If the LeapMotion library is not imported "missing LeapMotion library " should appear in the console, check LeapMotion docs or LiBB examples to see how to import library from html. Method enables the LeapMotion module to start obtaining the X,Y values from the sensor, these values must be called if needed. Method also allows to detect if a gesture has occured.
Index
Constructor
BB.LeapMotion
(
-
canvas
-
getXY
-
getGestures
)
-
canvas
-
getXY
-
getGestures
Parameters:
-
canvas
CanvasThe created canvas that must be given to the LeapMotion module if canX and canvasY variable want to be used.
-
getXY
BooleanBoolean value to enable/disable access to the X,Y values from LeapMotion Sensor .
-
getGestures
BooleanBoolean value to enable/disable access to the getGestures from LeapMotion Sensor.
Properties
circle
Gesture
default:false
Boolean value corresponding to the circle gesture detected by the LeapMotion sensor.
circleradius
Number
default:0
Double especifies the radius of the circle gesture in mm.
clockwise
Gesture
default:false
Boolean value corresponding to the clockwise detected by the LeapMotion.
deviceStreaming
Connection indicator
default:false
Boolean value indicating if the LeapMotion device is streaming data.
grab
Gesture
default:false
Boolean value corresponding to the grab gesture detected by the LeapMotion sensor.
keytap
Gesture
default:false
Boolean value corresponding to the keytap gesture detected by the LeapMotion sensor.
lastFrame
Object
default:null
Objetc containing the values of the last frame registered by the leapmotion sensor.
minX
Number
default:0
pinch
Gesture
default:false
Boolean value corresponding to the pinch gesture detected by the LeapMotion sensor.
screenTap
Gesture
default:false
Boolean value corresponding to the screenTap gesture detected by the LeapMotion sensor.
swipe
Gesture
default:false
Boolean value corresponding to the swipe gesture detected by the LeapMotion sensor.
y
Number
default:0
The pointers X position as given by the LeapMotion Sensor
y
Number
default:0
The pointers Y position as given by the LeapMotion Sensor
z
Number
default:0
The pointers Z position as given by the LeapMotion Sensor