Large worlds · function
pumpCellStream
Mark what is in range now, then drop what has gone unwanted long enough. Returns how many went.
Explained in Coordinates and units.
function pumpCellStream(stream: CellStream, x: number, y: number, z: number): numberimport { pumpCellStream } from '@driftengine/core';Parameters
| Parameter | Type | Description |
|---|---|---|
stream | CellStream | |
x | number | |
y | number | |
z | number |
In depth
The pump marks as well as drops, and the first draft only dropped. Prediction marks what is coming; without the pump marking what is here, a camera standing still wants nothing — its predicted path never leaves the cell it is in, the horizon moves past every cell it already occupies, and the streamer unloads the ground somebody is standing on. That is not a case to guard against separately: it is the same question as "what does this camera want", asked about the present instead of the future.
So there is no special case for the camera's own cell. cellsInRadius includes it at any
radius, including zero, which means the guarantee follows from the marking rather than from a
check somebody could delete without a test failing.