ChunkFillSource
Where a chunked world gets its chunks filled off the main thread: makeChunkFillPool from @voxolith/engine/worker implements it. Anything that fills boxes of bricks asynchronously can stand in (a test, another transport).
Defined in: engine/src/chunks.ts:75
Extended by
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
capacity | readonly | number | How many requests are worth having out at once (a pool: its workers times the requests each keeps queued). The world hands out no more than this, so the rest of its queue stays in its own nearest-first order and follows the focus. | engine/src/chunks.ts:88 |
Methods
fill()
fill(boxes: readonly Box[], opts?: object): Promise<FilledBricks>;Defined in: engine/src/chunks.ts:82
Fill every brick overlapping boxes, each starting from empty (a brick two boxes share is
filled once per box, the second seeing what the first wrote, as editMany does), and resolve
with the bricks that were written. signal cancels: the promise then rejects and its result,
if the work had started, is dropped.
Parameters
| Parameter | Type |
|---|---|
boxes | readonly Box[] |
opts? | { signal?: AbortSignal; } |
opts.signal? | AbortSignal |
Returns
Promise<FilledBricks>