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

    Interface EvictableChild

    Minimal structural shape of a registry child this module reads/releases.

    interface EvictableChild {
        ready?: boolean;
        loading?: boolean;
        release?: () => void;
        lastVisibleTick?: number;
        object?: VisibilityNode;
    }
    Index
    ready?: boolean

    false ⇒ geometry not committed yet (never an eviction candidate).

    loading?: boolean

    true while a deferred (re)load is in flight — skip (see below).

    release?: () => void

    Release thunk; absent on eager fallback levels (never demoted).

    lastVisibleTick?: number

    LRU key; undefined ⇒ never shown ⇒ not an eviction candidate.

    The child's THREE node (structural — only visible and the parent chain are read). visible === true and no hidden ancestor ⇒ the level renders THIS frame: the displayed level or the cross-fade blend partner mid-dissolve. Never an eviction candidate — releasing an on-screen level blanks (or half-blanks) the group mid-frame. The displayedChildIndex guard alone misses the blend partner, which is on screen but not the entry's displayed index. The registry's visibility pass runs earlier in the same synchronous per-frame call, so the flag is current here.

    The ancestor walk matters because visible is a LOCAL flag: a layer authored visible=false (or toggled off in the layers panel) hides the LAYER object while the level underneath keeps visible === true. Without the walk such a level looked permanently on-screen and was exempt from eviction forever — hidden data that could not be drawn AND could not be reclaimed.

    Demoting a level also clears this flag (visible = false): the released geometry is no longer ready, so leaving it visible would let a same-frame re-show of a hidden ancestor briefly expose stale buffers.