PrivateshadowsPrivatecontrollerAbort controller for the in-flight prefetch batch (null when idle).
PrivateinNumber of shadow passes still running in the current batch. A new
prefetch() call is a no-op while this is > 0: a cold LOD level outlives
one playback frame, so letting the in-flight batch finish (each pass
deepens its node's ladder by ~1 level per pass and stores it) — instead of
aborting + restarting every tick — is what lets cached quality climb
across loops. The next free tick re-targets at the current predicted view.
A stall guard (MAX_BATCH_STALL_MS) supersedes a batch that never
settles, so a hung task can't pin this > 0 for the whole session.
Privatebatchperformance.now() when the in-flight batch started (for the stall guard).
PrivatedisposedPrivate ReadonlyctxFire one background prefetch batch for viewState (the PREDICTED next
view) — one shadow pass per registered node. Fire-and-forget; never await
this from a foreground path.
Persistent across ticks: if the previous batch is still running this is a
no-op (see inFlight). Each shadow pass deepens its node's cached
ladder by ~1 cold level per pass (the budgetMs deadline stops it after
the level it was on, which is stored incrementally) and returns; the next
free tick re-targets at the then-current predicted view. Over successive
playback loops this fills the SliceCache toward full ladders so revisits
hit the fast single-concat path — while the foreground stays responsive.
Full predicted view state (t+1 slice position).
Per-pass LOD time budget. Bounds how far a single pass deepens (≈1 cold level); progressive loaders store each level as it lands, so an abort (playback end / dataset switch) keeps the depth already reached.
OptionalladderDepth: number | "auto"Abort the in-flight shadow batch. Called on playback end / dataset switch
/ dispose (NOT on every foreground tick — the batch is meant to persist so
background deepening completes; see the note in SceneLoader.updateView).
Abort + dispose all shadow loaders (frees their accumulators). Called when playback ends; shadows are rebuilt lazily on the next play.
PrivatequeuePrivateprefetchDerive the per-node state and run one shadow load. Returns a promise that settles when the pass finishes (or is skipped/aborted) so the batch can reopen the inFlight gate; it never rejects (errors are logged).
OptionalladderDepth?: number | "auto"Pinned playback ladder depth, forwarded so the t+1 entry carries the pinned prefix.
PrivategetGet or lazily build the shadow loader for a node.
PrivatedropForget and dispose one shadow whose path is no longer load-eligible.
Lazily-built shadow loaders, keyed by node path (async: progressive factories open zarr subgroups). A failed build is dropped so the next prefetch retries instead of caching the rejection forever.