API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classGamepadMapping
Abstract translation layer between the browser's raw Gamepad API indices and ExoJS-canonical channel buffers. Each concrete subclass encodes one device family's button/axis layout as ordered arrays of GamepadButton / GamepadAxis instances. The engine selects the appropriate mapping when a gamepad connects and uses it to route raw values to the correct input channels every frame.
import { GamepadMapping } from '@codexo/exojs' Abstract translation layer between the browser's raw Gamepad API indices and ExoJS-canonical channel buffers.
Each concrete subclass encodes one device family's button/axis layout as ordered arrays of GamepadButton / GamepadAxis instances. The engine selects the appropriate mapping when a gamepad connects and uses it to route raw values to the correct input channels every frame.
new(buttons: readonly GamepadButton[], axes: readonly GamepadAxis[]): GamepadMapping destroy(): void hasChannel(channel: GamepadButtonChannel | GamepadAxisChannel): boolean axes: readonly GamepadAxis[] buttons: readonly GamepadButton[] family: GamepadMappingFamily