GamepadSnapshot
Defined in: platform/types.ts:67
A per-frame snapshot of one gamepad. With mapping === 'standard' the button
and axis indices follow the W3C “standard gamepad” layout (see GamepadButton /
GamepadAxis in input.ts). buttons[i] is analog in [0,1] (1 = fully pressed);
axes[i] is signed in [-1,1]. Gamepads are POLLED (no DOM events), so the
platform produces these each frame rather than via InputEventCallbacks.
Properties
Section titled “Properties”axes:
number[]
Defined in: platform/types.ts:71
buttons
Section titled “buttons”buttons:
number[]
Defined in: platform/types.ts:70
connected
Section titled “connected”connected:
boolean
Defined in: platform/types.ts:69
index:
number
Defined in: platform/types.ts:68
mapping
Section titled “mapping”mapping:
string
Defined in: platform/types.ts:72