API reference

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

C

classGamepadMapping

@codexo/exojs / input / stable

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.

3
props
2
methods
0
events
Import
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.

Constructors 1
new(buttons: readonly GamepadButton[], axes: readonly GamepadAxis[]): GamepadMapping
Methods 2
destroy(): void
hasChannel(channel: GamepadButtonChannel | GamepadAxisChannel): boolean
Properties 3
axes: readonly GamepadAxis[]
buttons: readonly GamepadButton[]
family: GamepadMappingFamily
Source