API reference

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

C

classGamepadAxis

@codexo/exojs / input / stable

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.

6
props
1
methods
0
events
Import
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.

Constructors 1
new(index: number, channel: GamepadAxisChannel, options: GamepadAxisOptions): GamepadAxis
Methods 1
transformValue(value: number): number
Properties 6
bipolar: boolean
channel: GamepadAxisChannel
index: number
invert: boolean
normalize: boolean
threshold: number
Source