A budgeted, demand-ordered geometry materialisation queue.

Usage: request(productLocalID, priority) as demand changes (higher priority = more wanted); pump() to materialise the most-wanted pending products until the queue drains or the byte budget forces eviction of lower-priority resident tiles. Re-requesting an evicted product re-fills it. A steady stream of request + pump keeps a bounded working set of the highest-priority products resident — the "full model navigable under a fixed budget" behaviour.

Constructors

Accessors

Methods

Constructors

  • Parameters

    • tiles: GeometryTiles

      The extract/release backend.

    • budgetBytes: number

      Maximum resident tile bytes before eviction kicks in.

    Returns DemandGeometryQueue

Accessors

Methods

  • Evict every resident tile (e.g. on model close), releasing all bytes.

    Returns void

  • Parameters

    • productLocalID: number

      The product to check.

    Returns boolean

    True if the product's tile is resident.

  • Materialise pending products in descending priority order, evicting the lowest-priority resident tiles whenever the budget is exceeded. A pending product whose priority is below every resident tile AND that can't fit is left pending (it will fill once demand raises it or resident tiles drop).

    Parameters

    • maxExtractions: number = Number.POSITIVE_INFINITY

      Optional cap on how many tiles to extract this pump (e.g. a per-frame budget); unbounded when omitted.

    Returns number

    The number of tiles extracted this pump.

  • Request a product be materialised at the given demand priority. Updates the priority if already pending (keeping the higher of the two) or already resident (so eviction ranks it correctly). Requesting a resident product does not re-extract it.

    Parameters

    • productLocalID: number

      The product to materialise.

    • priority: number

      The demand priority (higher = more wanted).

    Returns void