new Gesture()
Constructs a new Gesture object.
An uninitialized Gesture object is considered invalid. Get valid instances of the Gesture class, which will be one of the Gesture subclasses, from a Frame object.
- Source:
- gesture.js, line 3
Members
-
duration :Number
-
The elapsed duration of the recognized movement up to the frame containing this Gesture object, in microseconds.
The duration reported for the first Gesture in the sequence (with the start state) will typically be a small positive number since the movement must progress far enough for the Leap to recognize it as an intentional gesture.
Type:
- Number
- Source:
- gesture.js, line 102
-
handIds :Array
-
The list of hands associated with this Gesture, if any.
If no hands are related to this gesture, the list is empty.
Type:
- Array
- Source:
- gesture.js, line 84
-
id :Number
-
The gesture ID.
All Gesture objects belonging to the same recognized movement share the same ID value. Use the ID value with the Frame::gesture() method to find updates related to this Gesture object in subsequent frames.
Type:
- Number
- Source:
- gesture.js, line 73
-
pointableIds :Array
-
The list of fingers and tools associated with this Gesture, if any.
If no Pointable objects are related to this gesture, the list is empty.
Type:
- Array
- Source:
- gesture.js, line 93
-
state :String
-
The gesture ID.
Recognized movements occur over time and have a beginning, a middle, and an end. The 'state()' attribute reports where in that sequence this Gesture object falls.
Possible values for the state field are:
- start
- update
- stop
Type:
- String
- Source:
- gesture.js, line 115
-
type :String
-
The gesture type.
Possible values for the type field are:
- circle
- swipe
- screentap
- keyTap
Type:
- String
- Source:
- gesture.js, line 132