Skip to content
pixi-silk
GitHub repository
Interface

InputProfile

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#

PropertyTypeDescriptionDefined in
deadzonenumberRadius around the centre where nothing is picked (the cancel zone), screen pixels.ui/input.ts:13
falloffnumberHow far past the outer edge the pointer still steers the selection, screen pixels. Infinity never lets go.ui/input.ts:15
hysteresisnumberAngle (radians) the pointer must pass a boundary by before the selection switches. Kills flicker.ui/input.ts:25
leaveDelayMsnumberGrace time in milliseconds before a pointer that left the falloff area closes a widget (when it closes on leave).ui/input.ts:23
scalenumberSize multiplier for the widget’s targets. 1 keeps the designed size.ui/input.ts:17
slopnumberMovement allowed before a press stops being a tap, and the extra hit margin of buttons, screen pixels.ui/input.ts:21
tapMsnumberA press shorter than this many milliseconds, that moved less than slop, is a tap.ui/input.ts:19