API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
classGamepadAxis
Single mappable analog axis on a physical gamepad. Holds the raw browser `Gamepad.axes[]` index, the canonical channel the value is written to, and the transform pipeline applied each frame by transformValue. Direction-split axis channels (e.g. `LeftStickLeft`, `LeftStickRight`) live in the 0..1 range - set `invert: true` on the negative half so it reads positive when pushed in its direction. Aggregate channels (e.g. `LeftStickX`, `LeftStickY`) live in the full -1..1 range - set `bipolar: true` to preserve sign through the pipeline. The static namespace exports (`GamepadAxis.LeftStickLeft`, `.LeftStickX`, ...) carry the canonical channel offsets used to address each axis. `channel` can also target a GamepadButtonChannel - some devices report an inherently analog, button-shaped control (a trigger) through the raw `axes[]` array rather than `buttons[]`; routing such an axis at the canonical trigger channel keeps app code that binds `GamepadButton.LeftTrigger`/`RightTrigger` portable across devices regardless of which raw array the hardware happens to report through.
import { GamepadAxis } from '@codexo/exojs'Single mappable analog axis on a physical gamepad. Holds the raw browser `Gamepad.axes[]` index, the canonical channel the value is written to, and the transform pipeline applied each frame by transformValue.
Direction-split axis channels (e.g. `LeftStickLeft`, `LeftStickRight`) live in the 0..1 range - set `invert: true` on the negative half so it reads positive when pushed in its direction.
Aggregate channels (e.g. `LeftStickX`, `LeftStickY`) live in the full -1..1 range - set `bipolar: true` to preserve sign through the pipeline.
The static namespace exports (`GamepadAxis.LeftStickLeft`, `.LeftStickX`, ...) carry the canonical channel offsets used to address each axis. `channel` can also target a GamepadButtonChannel - some devices report an inherently analog, button-shaped control (a trigger) through the raw `axes[]` array rather than `buttons[]`; routing such an axis at the canonical trigger channel keeps app code that binds `GamepadButton.LeftTrigger`/`RightTrigger` portable across devices regardless of which raw array the hardware happens to report through.
new(index: number, channel: GamepadAxisChannelBranded literal-union type identifying a canonical analog axis-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array… | GamepadButtonChannelBranded literal-union type identifying a canonical button-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array input…, options: GamepadAxisOptionsConstruction options for a GamepadAxis.): GamepadAxistransformValue(value: number, pairValue: number): numberbipolar: booleanchannel: GamepadAxisChannelBranded literal-union type identifying a canonical analog axis-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array… | GamepadButtonChannelBranded literal-union type identifying a canonical button-style gamepad input channel. Members are absolute offsets into the engine's shared Float32Array input…index: numberinvert: booleannormalize: booleanpair: null | numberthreshold: number