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

    Interface AudioEngineDeps

    The pieces of the viewer the engine reads, as ports (see module docs).

    interface AudioEngineDeps {
        getCamera(): Object3D;
        onCameraReplaced(cb: () => void): Unsubscribe;
        getDims(): SimpleDims | null;
        onDimsChanged(cb: () => void): Unsubscribe;
        getSceneGraph(): SceneNode | null;
        getSceneScale(): number;
        container(): HTMLElement;
        emit(
            event: "sound-ended" | "sound-started",
            payload: { name: string },
        ): void;
        notifyUiChanged(): void;
        resolveNodeCenter?(name: string): Vector3 | null;
    }
    Index
    • Scene characteristic size — the distance defaults derive from it.

      Returns number

    • Parameters

      • event: "sound-ended" | "sound-started"
      • payload: { name: string }

      Returns void

    • World-space bounding-box centre of the scene node called name, or null when it is unknown or not loaded yet — what attach_to sources follow.

      Parameters

      • name: string

      Returns Vector3 | null