Skip to main content
ControllerState = object
Defined in: modules/input/src/controller/controller.types.ts:16 Snapshot of a connected controller for the current frame.

Remarks

Returned by ControllerLibrary.getControllers and ControllerLibrary.getController. axes are the raw values reported by the browser, without deadzone.

Properties

axes

axes: number[]
Defined in: modules/input/src/controller/controller.types.ts:26 Raw axis values between -1 and 1, indexed like Gamepad.axes.

buttons

buttons: ControllerButtonState[]
Defined in: modules/input/src/controller/controller.types.ts:24 Button states, indexed like Gamepad.buttons.

id

id: string
Defined in: modules/input/src/controller/controller.types.ts:20 Browser-provided identifier of the device.

index

index: number
Defined in: modules/input/src/controller/controller.types.ts:18 Slot of the controller, as given by Gamepad.index.

mapping

mapping: GamepadMappingType
Defined in: modules/input/src/controller/controller.types.ts:22 "standard" when ControllerButton/ControllerAxis apply, "" otherwise.