The runtime

Large worlds

36 symbols, imported from @driftengine/core.

Explained in Coordinates and units.

Classes

HlodSet

Interfaces

CellGrid
The grid a query walks: its cell, and the most cells one query may walk.
CellStore
What a stream needs of whatever holds a cell's contents.
CellStream
CellStreamOptions
FreezableWorld
What freezing needs of a world.
FrozenCell
One cell's frozen contents. Entities in ascending order, so the packing is deterministic.
FrozenCells
HlodDraws
What select hands back: one entry per draw, a crossfading region taking two.
HlodOptions

Functions

cameraPositionFrom
Where the camera is, out of a view matrix, into out.
cellBounds
Minimum corner and size, in world units.
cellCoord
The grid coordinate a world coordinate falls in.
cellCoordInRange
Whether these grid coordinates fit the packing. See AXIS_BITS for the range.
cellCoordsOf
cellIdFor
cellIdFrom
Pack grid coordinates into one identifier.
cellPredictor
The stream as a Predictor<number> over cell identifiers.
cellsInFrustum
Every cell the view looks into, into out, in coordinate order. Returns how many.
cellsInRadius
Every cell within radius of a point, appended to out.
createCellGrid
createCellStream
createFrozenCells
createHlodDraws
Room for every region of a set of this capacity, each crossfading at once.
freezeCell
Stop a cell simulating and capture exactly what it held. false if it was already frozen.
frozenEntities
The entities a cell froze, ascending. Empty for a cell that is not frozen.
frozenFingerprintContribution
What a frozen cell contributes to the world's fingerprint. Zero for a cell nothing froze.
isCellFrozen
projectionScaleOf
Pixels a metre spans at one metre's distance: the screen's half of the switch distance.
pumpCellStream
Mark what is in range now, then drop what has gone unwanted long enough. Returns how many went.
renderOrigin
The render origin for a camera at this position: its cell's minimum corner.
setCellStreamOrigin
Move the origin the predicted views are relative to.
thawCell
Put a cell back exactly as it was frozen and let it simulate again. false if it was not frozen.
toRenderSpace
A world position in render space, as single precision.
toWorldSpace
Back to absolute, in double precision. Exact for anything toRenderSpace produced.

Constants

HLOD_NONE
The level of a region drawn at none of its own: past farDistance, or not arrived yet.