Skip to main content

Interface: GamepadButtonLike

Defined in: src/interaction/GamepadInput.ts:52

The subset of a GamepadButton the controller reads. A real GamepadButton satisfies this, and a test stub implements only these two fields.

Properties​

pressed​

readonly pressed: boolean

Defined in: src/interaction/GamepadInput.ts:54

Whether the button is pressed.


value​

readonly value: number

Defined in: src/interaction/GamepadInput.ts:56

The analog value in [0, 1] (triggers), or 0 / 1 for a plain button.