Luxar Viewer API Documentation - v2026.9.22
    Preparing search index...
    • Pure selector for byte-budget eviction.

      Given an array of pooled-buffer refs and a target budget, returns the subset that should be evicted to bring total bytes ≤ maxBytes. Strategy: sort largest-first and walk until the running total drops under budget. JS sort is stable in modern engines (V8, JSC, SpiderMonkey since 2019) so equal-size buffers retain their input order — important for deterministic test output.

      Type Parameters

      Parameters

      • refs: R[]
      • maxBytes: number
      • OptionalprecomputedTotal: number

      Returns R[]