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

    Interface LuxarLayerOptions

    interface LuxarLayerOptions {
        renderer: Renderer;
        getCamera: () => Camera;
        getViewportSize: () => ViewportSize;
        scene: Scene;
        requestRender?: () => void;
        loaderConfig?: LoaderConfig;
        gpuPoolMaxBytes?: number | null;
        wasmPath?: string;
        workerPath?: string;
        lodFade?: boolean;
        lodEnergyComp?: boolean;
        lodFinest?: boolean;
        lodBias?: number;
        depthSort?: boolean;
        renderOrder?: number;
    }
    Index
    renderer: Renderer

    Host-owned renderer. The layer never constructs, resizes, clears, or disposes it — it only reads capabilities and the drawing-buffer size.

    getCamera: () => Camera

    Live camera accessor. A getter rather than a value because a host may swap camera objects (a perspective/ortho toggle), and a captured reference would keep projecting from the abandoned one.

    getViewportSize: () => ViewportSize

    Live viewport accessor, in CSS pixels. Read on resize and per LOD evaluation.

    scene: Scene

    Host scene. The layer adds its root group on LuxarLayer.load and removes it on LuxarLayer.dispose.

    requestRender?: () => void

    Called when new geometry commits outside the host's own interaction — progressive refinement, lazy LOD loads, retries. Hosts with an on-demand render loop must wire this or late commits will not repaint. Hosts that render continuously can omit it.

    loaderConfig?: LoaderConfig

    Cache and prefetch flags forwarded to the data loader.

    gpuPoolMaxBytes?: number | null

    Session-wide GPU geometry budget in bytes. null auto-sizes from device memory, measured heap, and device class; 0 disables byte-budget eviction, and a positive value pins the budget. Defaults to config.dataLoading.performance.gpuPoolMaxBytes.

    wasmPath?: string

    Override for bundlers that can't resolve import.meta.url asset URLs.

    workerPath?: string

    Same, for the data worker.

    lodFade?: boolean

    Cross-fade adjacent replacement LOD levels. Default true.

    lodEnergyComp?: boolean

    Compensate incomplete stream ladders by committed energy. Default true.

    lodFinest?: boolean

    Force the finest replacement LOD regardless of coverage. Default false.

    lodBias?: number

    Replacement-LOD bias in screen-area units. Non-finite or non-positive values are treated as the neutral 1. Default 1.

    depthSort?: boolean

    Worker-based back-to-front sorting for order-dependent geometry. Default true.

    renderOrder?: number

    renderOrder stamped onto every Group in the layer subtree. Three.js uses the nearest Group's value as the primary transparent-sort key, so nested scene / LOD / partition groups must agree. Default 10.