Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...

    Class SoundNode

    One sound scene node's voices, edges and fades (see the module docs).

    Index
    name: string
    path: string
    buffer: AudioBuffer | null = null
    voices: Voice[] = []
    mask: Uint8Array
    gateOpen: boolean = false
    globalMuted: boolean = false

    Engine-wide mute (the rail).

    nodeMuted: boolean = false

    This node's own Layers-panel eye.

    mutingAncestors: Set<string> = ...

    Layers-panel eyes on ancestor groups.

    disposed: boolean = false
    gain: number

    Live per-node linear gain (the Layers-panel slider); starts at the authored value.

    foaDecoder: FoaDecoder | null = null

    The FOA rotate-and-decode graph of an ambisonic node (one voice).

    lastBase: ViewState | null = null

    Last derived per-row audibility, kept so a deferred start can replay it.

    lastSceneGraph: SceneNode | null = null
    pendingBeforeVoices: Uint8Array<ArrayBufferLike> | null | undefined

    A waypoint trigger that arrived before the clip decoded (no voices yet).

    • get isAudibleNow(): boolean

      True when the current slice makes this node audible (before or after its buffer arrived). The engine decodes audible nodes first, so the opening story's bed and narration are not queued behind ten silent clips.

      Returns boolean

    • get isWaypointTriggered(): boolean

      True for the two triggers the waypoint driver drives (not the slab).

      Returns boolean

    • Hand the decoded clip over. Voices are created here (lazily, once) so a node whose clip never arrives costs nothing but a placeholder. Pending rising edges recorded before the buffer arrived are replayed.

      Parameters

      • buffer: AudioBuffer

      Returns void

    • One voice's three Audio: a FOA field, a positional source, or a plain clip.

      Parameters

      • spatial: boolean

      Returns Audio<GainNode> | PositionalAudio

    • Place each spatial voice: at the attach_to node's centre when it resolves, else at its row's displayed x/y/z.

      Returns void

    • True when an attach_to centre resolved and every voice now sits there.

      Returns boolean

    • Re-place the voices (an attach_to target may have loaded or moved).

      Returns void

    • Per-row audibility for the last view state (null = live everywhere).

      Returns Uint8Array<ArrayBufferLike> | null

    • Compare the current audibility against each voice's recorded state and act on the edges. replayRising treats every audible voice as a rising edge (used when the gate opens or the buffer arrives), so deferred starts fire.

      Parameters

      • replayRising: boolean

      Returns void

    • continuous / once: the slab's rising edge starts, its falling edge stops.

      Parameters

      • v: Voice
      • audible: boolean
      • was: boolean
      • replayRising: boolean

      Returns void

    • on_depart / on_arrive: the waypoint driver owns the start (a deferred trigger replays here); the slab only ends an on_arrive clip once its story is left (see the module docs).

      Staleness is NOT decided here. Audibility is unknown until a view state arrives, and a waypoint may address one row of a spatial node explicitly while the slab reports that row silent, so both look identical to a clip whose story has been left. The engine expires deferred triggers instead, on the next waypoint event, where the tour having moved on is a fact rather than an inference.

      Parameters

      • v: Voice
      • audible: boolean
      • was: boolean
      • replayRising: boolean

      Returns void

    • Forget any deferred waypoint trigger, without touching what is playing.

      The engine calls this on every new waypoint event of this node's trigger kind, so at most ONE deferred trigger — the most recent — is ever waiting. Navigating N stops while the autoplay gate is shut otherwise leaves N clips armed, and opening the gate starts all N together.

      Returns void

    • The waypoint driver's event for a waypoint this node belongs to. rows marks the belonging rows (null = every voice). Returns true when the node takes the event — its trigger is the matching on_* kind.

      Parameters

      • kind: "depart" | "arrive"
      • rows: Uint8Array<ArrayBufferLike> | null

      Returns boolean

    • Autoplay gate: while closed nothing starts; opening replays pending edges.

      Parameters

      • open: boolean

      Returns void

    • Engine-wide mute: stops the voices with a fade; unmute replays the audible ones.

      Parameters

      • muted: boolean

      Returns void

    • The node's own Layers-panel eye.

      Parameters

      • muted: boolean

      Returns void

    • An ancestor group's Layers-panel eye.

      Parameters

      • path: string
      • muted: boolean

      Returns void

    • Live per-node gain: playing voices ramp to it (anti-click), later starts use it.

      Parameters

      • gain: number

      Returns void