API

Interface GamepadButtonState

One copied gamepad button; independent of the browser's live object.

interface GamepadButtonState {
    pressed: boolean;
    touched: boolean;
    value: number;
}
Index
pressed: boolean

Whether the device considers the button pressed.

touched: boolean

Whether the device reports touch contact.

value: number

Analog value in the browser's zero-to-one range.