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

    Module scene/lod-eviction

    Resident-byte eviction policy for LOD-group levels.

    The VRAM-pressure half of lod-group-registry.ts, extracted as a pure policy function: given the registry's entries and the GPU buffer pool's live accounting (getResidentBytes — the single truth; the registry keeps no per-level byte estimate), demote cold hidden levels while the pool is over the shared budget ceiling. "Hidden" is EFFECTIVE (ancestor-aware) visibility — a level under a hidden layer is cold no matter what its own visible flag says. Ranking prioritises what is furthest from the visible: levels under a hidden layer (undrawable, so coldest of all) first, then off-screen groups, then descending camera distance, then coldest last-visible tick. Runs once per frame after all entries are evaluated; eviction is rare (only under genuine VRAM pressure), preserving the registry's no-churn retention property.

    Types are minimal structural shapes (the lod-freshness.ts pattern) so this module never imports the registry back.

    EvictableChild
    EvictableEntry
    enforceResidentByteBudget