new SwipeGesture()
Constructs a new SwipeGesture object.
An uninitialized SwipeGesture object is considered invalid. Get valid instances of the SwipeGesture class from a Frame object.
- Source:
- gesture.js, line 235
Members
-
direction :Vector
-
The unit direction vector parallel to the swipe motion.
You can compare the components of the vector to classify the swipe as appropriate for your application. For example, if you are using swipes for two dimensional scrolling, you can compare the x and y values to determine if the swipe is primarily horizontal or vertical.
Type:
- Vector
- Source:
- gesture.js, line 271
-
position :Vector
-
The current swipe position within the Leap frame of reference, in mm.
Type:
- Vector
- Source:
- gesture.js, line 263
-
speed :Number
-
The speed of the finger performing the swipe gesture in millimeters per second.
Type:
- Number
- Source:
- gesture.js, line 283
-
startPosition :Vector
-
The starting position within the Leap frame of reference, in mm.
Type:
- Vector
- Source:
- gesture.js, line 255