GestureHandlers
import type { GestureHandlers } from 'pixi-silk/ui/gesture';
Callbacks of trackGesture. Every one is optional.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
onDown? | (p: GesturePoint) => void | Pointer went down (before the gesture is known). | ui/gesture.ts:28 |
onDrag? | (p: GesturePoint) => void | Every move after onDragStart, on or off the target. | ui/gesture.ts:41 |
onDragEnd? | (p: GesturePoint) => void | Drag ended (release, or the pointer was lost). | ui/gesture.ts:43 |
onDragStart? | (p: GesturePoint) => void | Movement passed the pointer’s slop. Cancels a pending hold. | ui/gesture.ts:39 |
onFlick? | (p: GesturePoint, angle: number, speed: number) => void | Fast release within 450 ms of the press. Fires after onDragEnd. angle is the direction in radians, speed is in local units per second. | ui/gesture.ts:37 |
onHold? | (p: GesturePoint) => void | Press held still for holdMs. A hold that then moves continues as a drag. | ui/gesture.ts:32 |
onTap? | (p: GesturePoint) => void | Press released within the pointer’s tapMs (at least 260 ms) that moved less than its slop, with no hold. | ui/gesture.ts:30 |
onUp? | (p: GesturePoint) => void | Pointer went up, whatever the gesture was. | ui/gesture.ts:45 |