DriftTexture · interface

PrefetchQueue

What to fetch next, ordered by how soon it will be needed.

Explained in DriftTexture.

interface PrefetchQueue
import type { PrefetchQueue } from '@driftengine/texture';

In depth

That ordering is not available to a reactive system at all. Everything a feedback buffer reports is already needed; there is nothing to rank. Prediction produces a horizon, so a tile wanted in one frame can outrank one wanted in eight — which is the difference between spending a limited byte budget well and spending it arbitrarily.

A full queue drops its worst entry rather than refusing the best one. Refusing on arrival would discard exactly the tiles a late prediction found most urgent.

Properties

NameTypeDescription
priorityMap<string, number>Priority per hash. Lower is sooner, so it sorts naturally.
capacitynumber