API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

C

classGamepadButton

@codexo/exojs / input / stable

Single mappable button on a physical gamepad. Holds the raw browser `Gamepad.buttons[]` index, the canonical channel the value is written to, and the deadzone/inversion transform applied each frame by transformValue. Used by concrete GamepadMapping subclasses to declare a device's button layout. User code typically constructs these via `new GamepadButton(rawIndex, GamepadButton.South)` only when authoring a custom mapping. The static namespace exports (`GamepadButton.South`, `.East`, ...) carry the canonical channel offsets used to address each button.

4
props
1
methods
0
events
Import
import { GamepadButton } from '@codexo/exojs'

Single mappable button on a physical gamepad. Holds the raw browser `Gamepad.buttons[]` index, the canonical channel the value is written to, and the deadzone/inversion transform applied each frame by transformValue.

Used by concrete GamepadMapping subclasses to declare a device's button layout. User code typically constructs these via `new GamepadButton(rawIndex, GamepadButton.South)` only when authoring a custom mapping.

The static namespace exports (`GamepadButton.South`, `.East`, ...) carry the canonical channel offsets used to address each button.

Constructors 1
new(index: number, channel: GamepadButtonChannel, options: GamepadButtonOptions): GamepadButton
Methods 1
transformValue(value: number): number
Properties 4
channel: GamepadButtonChannel
index: number
invert: boolean
threshold: number
Source