API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classGamepadButton
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.
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.
new(index: number, channel: GamepadButtonChannel, options: GamepadButtonOptions): GamepadButton transformValue(value: number): number channel: GamepadButtonChannel index: number invert: boolean threshold: number