Luxar Viewer API Documentation - v2026.10.22
    Preparing search index...
    Index
    roomTarget: { texture: Texture; dispose(): void } | null = null
    captureTarget: CubeTargetLike | null = null
    bakedTexture: CubeTexture<unknown> | null = null
    hdri: { url: string; texture: Texture<unknown, TextureEventMap> | null } | null = null

    The one HDRI request for the configured URL — loading (texture null), loaded, or failed (null forever). Keyed by URL so a new URL starts over, and compared by identity so a superseded load can neither adopt its texture nor clear this one.

    config: EnvironmentConfig = DEFAULT_ENVIRONMENT_CONFIG
    baked: BakedEnvironment | null = null
    runtime: CaptureRuntime | null = null
    captureProbeSpec: string | null = null
    wanted: boolean = false

    Set by the first ensure() — a physical material exists, so the scene needs light.

    active: EnvironmentKind = 'none'
    staleSince: number | null = null
    captureCount: number = 0

    How many live captures have run (a diagnostic the tests and the bake read).

    • Point the environment at a NEW renderer (a WebGPU renderer rebuilt after device loss) and rebuild whatever was already built against the old one. The PMREM generator and cube target are renderer resources, so their factories travel with the renderer.

      Parameters

      Returns void

    • Clear dataset-owned state while preserving runtime wiring and the reusable room PMREM. The config goes back to the default too: the next scene's physical materials ask for light while it loads, before its own config is applied.

      Returns void

    • A physical material now exists: make sure the scene is lit.

      Idempotent — every call after the first that changes nothing returns false. Synchronous for the room and a live capture, so a physical mesh created this frame is lit on its first draw.

      Returns boolean

      true when this call built or replaced the environment.

    • Something the capture depends on changed (a commit, a slice, an appearance edit). Only meaningful while lit by a live scene capture; the next tick after the debounce, with the loader settled, re-captures.

      Returns void

    • Per-frame hook (the init pipeline registers it). Captures the first settled scene after any pool startup finishes, or re-captures a stale live environment after the debounce. Returns whether a capture ran.

      Parameters

      • now: number = ...

      Returns boolean