Host typegenerated
Gesture
What the player did with the mouse or a finger: a tap, a hold, a drag or a pinch. Works the same for both.
11 members · engine 0.1.0
Gesture.drag_x: numberHow far the drag moved sideways this frame. Add it to a camera's position to pan.Gesture.drag_y: numberHow far the drag moved up or down this frame.Gesture.dragging: boolWhether the player is dragging.Gesture.held: boolWhether the player has pressed and held still long enough to count as a long press.Gesture.hold_x: numberWhere the long press is, sideways.Gesture.hold_y: numberWhere the long press is, up or down.Gesture.pinch: numberHow much two fingers pinched this frame: above 1 when spreading apart, below 1 when closing, and 1 when not pinching. Multiply a zoom by it.Gesture.pinching: boolWhether two fingers are pinching.Gesture.tap_x: numberWhere the tap was, sideways.Gesture.tap_y: numberWhere the tap was, up or down.Gesture.tapped: boolWhether the player tapped (a quick press without moving) this frame. Check this before readingtap_xandtap_y.
- Source
- docs/generated/decay-api.json
- Schema
- v1
- Engine version
- 0.1.0
- Source commit
909aca81368b