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

    Catalog of cross-layer events. Each entry maps an event name to its payload type. Publishers and subscribers both type-check against this map, so adding an event in one place forces the consumer to adapt at the type level.

    interface LuxarEventMap {
        "frame-start": Record<string, never>;
        "frame-end": Record<string, never>;
        "loading-progress": {
            loaderId: string;
            loaded: number;
            total: number;
            activeQueries: number;
        };
        "geometry-committed": Record<string, never>;
        "panel-toggle": {
            panelId: "dimension-sliders" | "debug-console" | "data-monitor";
        };
        "panel-cycle": { panelId: "data-monitor" };
        "panel-hide": { panelId: "data-monitor" | "help-overlay" };
    }
    Index
    "frame-start": Record<string, never>

    Animation-loop frame-start hook. Fired right before per-frame work begins. Subscribers (e.g., stats.js-backed PerformanceMonitor) use this to drive their begin/end timing.

    "frame-end": Record<string, never>

    Animation-loop frame-end hook. Fired right after per-frame work — including post-processing render — completes. Pair with frame-start for timing.

    "loading-progress": {
        loaderId: string;
        loaded: number;
        total: number;
        activeQueries: number;
    }

    Aggregate loading progress from the data layer. Used by the loading-monitor UI to render the progress bar / spinner.

    "geometry-committed": Record<string, never>

    A node's geometry was committed (or re-committed) to the GPU — the same moment the pick buffer is invalidated. Consumers that derive something from WHAT IS RESIDENT (the scene-derived environment capture in rendering/environment/) mark themselves stale on it and rebuild once the loader settles, rather than polling the scene graph.

    "panel-toggle": {
        panelId: "dimension-sliders" | "debug-console" | "data-monitor";
    }

    Toggle the named UI panel. Panels are internal-state-aware: each subscriber decides whether to open or close based on its own visibility flag, so the publisher doesn't need to know the current state.

    "panel-cycle": { panelId: "data-monitor" }

    Cycle the named UI panel through its display states (e.g., hidden → mini → expanded → hidden). Distinct from panel-toggle because the data-monitor has more than two visibility states.

    "panel-hide": { panelId: "data-monitor" | "help-overlay" }

    Hide the named panel. Used by the panel-coordinator close-all flow.