GestureHandlers
Callbacks for recogniseGestures; supply only the ones you need. A pointer that becomes a drag, a long-press or part of a pinch never also fires tap.
Defined in: engine/src/input/gestures.ts:89
Methods
doubleTap()?
optional doubleTap(e: TapEvent): void;Defined in: engine/src/input/gestures.ts:93
A second tap within doubleTapMs and doubleTapDistance of the first; tap fires too.
Parameters
| Parameter | Type |
|---|---|
e | TapEvent |
Returns
void
drag()?
optional drag(e: DragEvent): void;Defined in: engine/src/input/gestures.ts:98
Parameters
| Parameter | Type |
|---|---|
e | DragEvent |
Returns
void
dragEnd()?
optional dragEnd(e: DragEvent, cancelled: boolean): void;Defined in: engine/src/input/gestures.ts:100
cancelled when a second finger turned the drag into a pinch, or the pointer was cancelled.
Parameters
| Parameter | Type |
|---|---|
e | DragEvent |
cancelled | boolean |
Returns
void
dragStart()?
optional dragStart(e: DragEvent): boolean | void;Defined in: engine/src/input/gestures.ts:97
Return true to claim the pointer; lower-priority recognisers then ignore it.
Parameters
| Parameter | Type |
|---|---|
e | DragEvent |
Returns
boolean | void
longPress()?
optional longPress(e: TapEvent): void;Defined in: engine/src/input/gestures.ts:95
Held for longPressMs without moving past the slop. The release is then not a tap.
Parameters
| Parameter | Type |
|---|---|
e | TapEvent |
Returns
void
pinch()?
optional pinch(e: PinchEvent): void;Defined in: engine/src/input/gestures.ts:104
Touch pinches arrive between pinchStart and pinchEnd; wheel pinches arrive alone.
Parameters
| Parameter | Type |
|---|---|
e | PinchEvent |
Returns
void
pinchEnd()?
optional pinchEnd(): void;Defined in: engine/src/input/gestures.ts:105
Returns
void
pinchStart()?
optional pinchStart(): void;Defined in: engine/src/input/gestures.ts:102
A second touch went down; any drag has already ended as cancelled.
Returns
void
press()?
optional press(e: TapEvent): boolean | void;Defined in: engine/src/input/gestures.ts:111
A pointer went down (before it is known what it is). Return true to claim it immediately, e.g. for a slingshot that aims from the first touch.
Parameters
| Parameter | Type |
|---|---|
e | TapEvent |
Returns
boolean | void
tap()?
optional tap(e: TapEvent): void;Defined in: engine/src/input/gestures.ts:91
Released within the slop, not cancelled, not after a long-press or pinch.
Parameters
| Parameter | Type |
|---|---|
e | TapEvent |
Returns
void
wheel()?
optional wheel(e: WheelGesture): void;Defined in: engine/src/input/gestures.ts:106
Parameters
| Parameter | Type |
|---|---|
e | WheelGesture |
Returns
void