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

    One run's residency accounting for sweep-registered progressive leaves, shared by all four geometry refinement phases. The map is seeded from every registered progressive loader, including completed loaders that the wrappers return from before admission, so a new view-triggered run cannot forget bytes already resident and ratchet the ceiling upward.

    Index
    perPath: Map<string, number> = ...
    declined: Set<string> = ...
    budgetBytes: number
    densityGate: RefinementDensityGate | null = null

    Optional projected-density gate. Consulted only for a rung the byte ceiling admits; its refusal shares this budget's declined set so the loop retires the loader for the run (non-sticky ACROSS runs — the gate is re-evaluated at every run start and re-kicked on zoom).

    • Build one sized from the device heap, matching the eager admission gate.

      initialResidencies is FIRST and REQUIRED, not an optional tail argument, because two separate guarantees rest on it and both fail silently when it is missing: resident bytes of already-complete loaders are forgotten (the ceiling ratchets upward, #2430), and — since the fair-share allowance divides headroom by the paths the budget currently knows — the first node admitted is handed the entire scene's headroom and can spend the whole ladder in one pass. Pass an empty iterable to opt out deliberately.

      Parameters

      Returns RefinementResidencyBudget

    • True once path has been refused this run. Callers MUST fold this into their anyHasMoreLODs / getLoaderProgress closures — see the module docstring; omitting it spins the refinement loop at frame rate.

      Parameters

      • path: string

      Returns boolean

    • Record path's current footprint and return whether it may refine plus its per-pass allowanceBytes. A refusal is sticky for the rest of the run: re-offering the same loader every pass would re-measure, re-refuse and re-log without making progress. An admission immediately reserves only its estimated next rung. runProgressiveRefinement awaits loaders serially, so the wrapper's measured record() replaces that estimate before the next loader is admitted and the gap to the larger allowance is never observed.

      Parameters

      Returns RefinementPassAdmission