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

    Function childFreshAndCount

    • Freshness + committed element count of a child, resolving a GROUP-typed LOD child (a deferred kind=partition / nested lod subtree — the overview recipe) through subtreeDisplayProgress rather than the leaf-only stamps. A bare THREE.Group carries no leaf nodeType, so isFresh would report it unconditionally fresh and visibleElementCount would return null — hiding a stale re-slice and defeating the empty guard. Mirrors the never-downgrade gate's sideProgress so both paths agree on what "fresh" means for a group. Leaf children (a direct count stamp) keep the exact pre-existing behaviour.

      fresh implies ready for every child shape: the leaf branch's isFresh is ready-gated, and a NOT-ready group child (a deferred placeholder whose subtree never committed, or a released level awaiting reload) reports fresh: false regardless of any stamps its subtree may retain — it cannot draw, so no display path (slice-aware fallback, empty-guard redirect, blend pairing) may ever elect it. A READY group with no stamped leaf (nested group with no slice-dependent geometry) carries no per-slice staleness signal and reports fresh: true, count: null.

      subtreeLadderComplete is the third answer, folded from the same walk (SubtreeDisplayProgress.complete): false when any visible stamped leaf under the subtree has committed only a prefix of its additive ladder. A tracked LEAF has no subtree to fold, so it answers with its OWN committedLadderComplete stamp.

      That stamp rather than the child's hasMoreLODs() thunk, because the thunk does not exist on every leaf: load-lod-group-node attaches it only on the DEFERRED path, so the eagerly-loaded default level — whose ladder is advanced by the sweep-driven background refinement loop — has none, and reporting an unconditional true here declared a still- streaming coarse level complete. The stamp is also the safer of the two where both exist (see lod-display-gate's "committed state only" note: a live getter flips when the last fetch resolves, frames before the commit lands). Callers still read hasMoreLODs() directly on top of this, since it is what re-fires ensureLoaded to advance a lazy ladder. Only isCaptureQuiescent (capture-quiescence.ts) consults this field; the display paths ignore it.

      version === null means no view-version tracking is wired: the per-slice staleness test is skipped and every READY child reads fresh — which is exactly what the version != null guards at the display call sites already assume, so those are unaffected.

      Parameters

      Returns { fresh: boolean; count: number | null; subtreeLadderComplete: boolean }