Interface GamepadState
interface GamepadState {
axes: number[];
buttons: GamepadButtonState[];
id: string;
index: number;
mapping: GamepadMappingType;
timestamp: number;
}
axes: number[];
buttons: GamepadButtonState[];
id: string;
index: number;
mapping: GamepadMappingType;
timestamp: number;
}
Properties
axes
axes: number[]
Copied raw axis values; the application chooses dead zones.
buttons
Copied button values, pressed state and touch state.
id
id: string
Browser-provided device identifier.
index
index: number
Browser slot index.
mapping
mapping: GamepadMappingType
Only standard guarantees standard button/axis positions.
timestamp
timestamp: number
Browser-provided update timestamp.
Application-owned gamepad snapshot. Unknown mappings remain explicit.