Class: ScreenTapGesture

Leap. ScreenTapGesture

The ScreenTapGesture class represents a tapping gesture by a finger or tool.

A screen tap gesture is recognized when the tip of a finger pokes forward and then springs back to approximately the original postion, as if tapping a vertical screen. The tapping finger must pause briefly before beginning the tap.

ScreenTap

ScreenTap gestures are discrete. The ScreenTapGesture object representing a tap always has the state, STATE_STOP. Only one ScreenTapGesture object is created for each screen tap gesture recognized.

new ScreenTapGesture()

Constructs a new ScreenTapGesture object.

An uninitialized ScreenTapGesture object is considered invalid. Get valid instances of the ScreenTapGesture class from a Frame object.

Source:
  • gesture.js, line 303

Extends

Members

direction :Leap.Vector

The direction of finger tip motion.

Type:
Source:
  • gesture.js, line 334

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
Inherited From:
Source:
  • gesture.js, line 107

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
Inherited From:
Source:
  • gesture.js, line 87

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
Inherited From:
Source:
  • gesture.js, line 75

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
Inherited From:
Source:
  • gesture.js, line 97

position :Leap.Vector

The position where the screen tap is registered.

Type:
Source:
  • gesture.js, line 326

progress :Number

The progess value is always 1.0 for a screen tap gesture.

Type:
  • Number
Source:
  • gesture.js, line 342

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
Inherited From:
Source:
  • gesture.js, line 121

type :String

The gesture type.

Possible values for the type field are:

  • circle
  • swipe
  • screenTap
  • keyTap
Type:
  • String
Inherited From:
Source:
  • gesture.js, line 139