Skip to content

textmode.js / input / gamepad / TextmodeGamepadSnapshot

Interface: TextmodeGamepadSnapshot

Immutable frame snapshot for a connected gamepad.

Properties

PropertyTypeDescription
axesreadonly number[]Raw axis values in browser order.
buttonsreadonly TextmodeGamepadButtonSnapshot[]Raw button states in browser order.
connectedbooleanWhether the controller is currently connected.
idstringBrowser-reported identifier string.
indexnumberBrowser-assigned gamepad slot index.
mapping"" | "standard"Recognized browser mapping type used by textmode.js.
standard?TextmodeStandardGamepadSnapshotOptional semantic helpers for standard-mapped controllers.
timestampnumberBrowser-provided timestamp for the current state sample.