API reference

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

C

classInputBinding

@codexo/exojs / input / stable

One subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself with whichever owner created it (typically an InputSystem, Gamepad, or scene-bound proxy). Construct via the owner's `onStart` / `onActive` / `onStop` / `onTrigger` factory methods rather than `new InputBinding(...)` directly - the returned binding is caller-owned from that point on. Lifecycle: a binding lives until unbind is called, the owner disposes it, or - for scene-bound bindings - the scene unloads.

4
props
2
methods
4
events
Import
import { InputBinding } from '@codexo/exojs'

One subscription to one or more input channels. Tracks active state, fires the onStart / onActive / onStop / onTrigger Signals each frame, and registers itself with whichever owner created it (typically an InputSystem, Gamepad, or scene-bound proxy).

Construct via the owner's `onStart` / `onActive` / `onStop` / `onTrigger` factory methods rather than `new InputBinding(...)` directly - the returned binding is caller-owned from that point on.

Lifecycle: a binding lives until unbind is called, the owner disposes it, or - for scene-bound bindings - the scene unloads.

Constructors1
new(channels: readonly number[], options: InputBindingOptionsConstruction options shared by every binding factory method., detacher: InternalChannelDetacher | null, watermark: number, constructionBaseline: Float32Array<ArrayBufferLike> | null): InputBinding
Methods2
[dispose](): void
Explicit Resource Management alias for unbind - enables using binding = input.onStart(...). Idempotent, same as unbind itself: disposing a binding that is already unbound (manually, or because a tracking owner like SceneInputs unbound it first on scene teardown) is a no-op, so mixing using with a manual unbind() call in either order is safe. Only caller-owned binding handles expose this protocol; engine-owned systems and nodes do not become caller-disposable. Runtime using support requires the environment to provide a real Symbol.dispose, or a Symbol.for('Symbol.dispose')-registry polyfill installed before this module is imported (see the disposeSymbol fallback above) - without either, this method is installed under a key using's lowering will never look up. Plain unbind() has no such requirement.
unbind(): void
Detach this binding from its owner and release its Signals. Idempotent.
Properties4
channels: readonly number[]
defaultTriggerThreshold: number
Default tap-window for onTrigger. Override per binding via the threshold option. Mutating this static affects only newly created bindings.
active: boolean
true when the last sampled value exceeded the channel's threshold.
value: number
Last value sampled this frame. 0 when inactive.
Events4
Source