API reference

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

C

classAxisAction

@codexo/exojs / input / stable

A named signed axis in -1..1, fed by a stick, by two opposing button groups, or by several such bindings at once. Alternative bindings are never summed. Each is evaluated on its own and the one with the largest absolute deflection wins; on an exact tie the binding listed first wins, so the outcome does not depend on device iteration order.

6
props
1
methods
0
events
Import
import { AxisAction } from '@codexo/exojs'

A named signed axis in -1..1, fed by a stick, by two opposing button groups, or by several such bindings at once.

Alternative bindings are never summed. Each is evaluated on its own and the one with the largest absolute deflection wins; on an exact tie the binding listed first wins, so the outcome does not depend on device iteration order.

Constructors1
Methods1
Properties6
kind: "axis"
Which action kind this is - the discriminant a serialized binding is validated against.
active: boolean
true while the axis magnitude exceeds the action's threshold.
binding: Binding
The binding currently in effect: the default, or whatever last replaced it.
channels: readonly number[]
Absolute channel indices this action reads right now. Reflects the effective binding and the owning map's gamepad slot, and is what an InputScope claims on this action's behalf. The array is replaced, not mutated, on every rebind - do not retain it across one.
defaultBinding: Binding
The binding this action was constructed with - what a null rebind restores.
value: number
Current axis value, clamped to -1..1.
Source