API reference

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

C

classActionBase

@codexo/exojs / input / stable

Shared contract of every action kind. An action owns a BINDING DESCRIPTOR (what the developer declared, or what a player later rebound it to) and, separately, the absolute channel indices that descriptor currently resolves to. The two are kept apart because the descriptor is stable and serializable while the channels depend on runtime context: which gamepad slot the owning ActionMap was given. An action never resolves a gamepad slot on its own. The owning map drives _rebind, which is also how a rebind or a profile application reaches an action - so the map can apply a whole set of changes and re-arm every action's baseline in one transaction rather than leaving intermediate states visible.

4
props
1
methods
0
events
Import
import { ActionBase } from '@codexo/exojs'

Shared contract of every action kind.

An action owns a BINDING DESCRIPTOR (what the developer declared, or what a player later rebound it to) and, separately, the absolute channel indices that descriptor currently resolves to. The two are kept apart because the descriptor is stable and serializable while the channels depend on runtime context: which gamepad slot the owning ActionMap was given.

An action never resolves a gamepad slot on its own. The owning map drives _rebind, which is also how a rebind or a profile application reaches an action - so the map can apply a whole set of changes and re-arm every action's baseline in one transaction rather than leaving intermediate states visible.

Constructors1
new(binding: Binding): ActionBase<Binding>
Methods1
Properties4
Which action kind this is - the discriminant a serialized binding is validated against.
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.
Source