import type { InputProfile } from 'pixi-silk/ui';
How forgiving a widget is for one kind of pointer. Fingers are fat and shaky, mice are precise:
the same menu gets a bigger dead zone, a longer falloff and larger targets under a finger.
Distances are in screen pixels.
Properties#
| Property | Type | Description | Defined in |
|---|
deadzone | number | Radius around the centre where nothing is picked (the cancel zone), screen pixels. | ui/input.ts:13 |
falloff | number | How far past the outer edge the pointer still steers the selection, screen pixels. Infinity never lets go. | ui/input.ts:15 |
hysteresis | number | Angle (radians) the pointer must pass a boundary by before the selection switches. Kills flicker. | ui/input.ts:25 |
leaveDelayMs | number | Grace time in milliseconds before a pointer that left the falloff area closes a widget (when it closes on leave). | ui/input.ts:23 |
scale | number | Size multiplier for the widget’s targets. 1 keeps the designed size. | ui/input.ts:17 |
slop | number | Movement allowed before a press stops being a tap, and the extra hit margin of buttons, screen pixels. | ui/input.ts:21 |
tapMs | number | A press shorter than this many milliseconds, that moved less than slop, is a tap. | ui/input.ts:19 |