1681-engine / index / AimGesture
Class: AimGesture ​
Defined in: src/input/AimGesture.ts:53
Constructors ​
Constructor ​
new AimGesture(options): AimGesture;Defined in: src/input/AimGesture.ts:68
Parameters ​
| Parameter | Type |
|---|---|
options | AimGestureOptions |
Returns ​
AimGesture
Properties ​
knob ​
knob: Point;Defined in: src/input/AimGesture.ts:57
Where the knob is drawn, clamped to the circle, relative to the button's centre.
share ​
share: Point;Defined in: src/input/AimGesture.ts:59
The knob as a vector of length ≤ 1: what the world reads.
Accessors ​
aiming ​
Get Signature ​
get aiming(): boolean;Defined in: src/input/AimGesture.ts:94
A drag has begun: show the aim from now on.
Returns ​
boolean
cancelling ​
Get Signature ​
get cancelling(): boolean;Defined in: src/input/AimGesture.ts:103
Letting go now would cast nothing (draw the cancel zone lit).
Returns ​
boolean
Methods ​
move() ​
move(
rawX,
rawY,
overCancel?,
ms?
): void;Defined in: src/input/AimGesture.ts:82
The thumb at rawX, rawY from the button's centre, overCancel when it is over the cancel zone, ms since it went down (Infinity skips the landing slop). Once a drag, always a drag for this press.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
rawX | number | undefined |
rawY | number | undefined |
overCancel | boolean | false |
ms | number | Infinity |
Returns ​
void
up() ​
up(): AimEnd;Defined in: src/input/AimGesture.ts:107