API reference

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

C

classGamepadMapping

@codexo/exojs / input / stable

Translation layer between the browser's raw Gamepad API indices and ExoJS-canonical input channels. The engine selects one when a gamepad connects (see `GamepadDefinition`) and uses it to route raw values to the correct channels every frame. Construct one from GamepadMappingData to describe a device the built-in definitions do not cover.

5
props
1
methods
0
events
Import
import { GamepadMapping } from '@codexo/exojs'

Translation layer between the browser's raw Gamepad API indices and ExoJS-canonical input channels.

The engine selects one when a gamepad connects (see `GamepadDefinition`) and uses it to route raw values to the correct channels every frame. Construct one from GamepadMappingData to describe a device the built-in definitions do not cover.

Constructors1
Methods1
Returns true when this mapping declares at least one button or axis control that writes to channel. Use to detect device-specific capabilities at runtime - e.g. before binding an input to a right-stick channel that may not exist on a single Joy-Con.
Properties5
Source