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

    The warm-up service itself — one instance per session (the module keeps the default one; the constructor's three injection points exist for tests).

    Lifecycle: configure once per renderer, warmScene once the dataset is fully set up, scheduleObject for every node that gains or changes compile-time state afterwards, clear on scene replacement, context loss and disposal.

    Index
    enabled: boolean = false
    armed: boolean = false
    tearingDown: boolean = false
    renderer: WebGLRenderer | null = null
    camera: Camera | null = null
    targetScene: Scene<Object3DEventMap> | null = null
    generation: number = 0
    activationToken: number = 0
    queue: WarmupTask[] = []
    objectStates: WeakMap<Object3D<Object3DEventMap>, TrackedObjectState> = ...
    sourceStates: Map<Material<MaterialEventMap>, SourceWarmupState> = ...
    warmCompletions: Set<WarmCompletion> = ...
    drainPromise: Promise<void> | null = null
    variantUsers: Map<string, Set<Material<MaterialEventMap>>> = ...
    variantOwner: Map<string, Material<MaterialEventMap>> = ...
    stats: BlendWarmupStats = ...
    waitForWarmupTurn: WaitForWarmupTurn = defaultWaitForWarmupTurn
    compileOne: CompileOne = defaultCompileOne
    deferActivation: DeferActivation = defaultDeferActivation
    • Arm the manager and warm every reachable variant under root.

      Resolves when the queue drains, or when the readiness budget (WARMUP_READINESS_BUDGET_MS) elapses — whichever comes first. The budget expiring is not a failure: the drain carries on afterwards, it just stops holding the caller.

      Parameters

      • root: Object3D

      Returns Promise<void>

    • Enumerate the blend-mode variants of sourceMaterial and queue a keeper compile for each variant no live keeper pins yet. Two dedupe levels: modes of THIS source that land on the same program (e.g. additive/luminous differing only in blend state) collapse to one keeper, and a variant an identical material on ANOTHER node already owns is shared, not re-queued.

      Parameters

      Returns void

    • Parameters

      • variantFingerprint: string
      • sourceMaterial: Material

      Returns void

    • The owner of a shared variant went away while other nodes still use it: hand the keeper to one of them (a fresh clone from that node's material, queued for compile) so the program stays pinned for the survivors.

      Parameters

      Returns void