ChunkRequest
Messages the pool sends a chunk worker.
type ChunkRequest =
| {
init: unknown;
kind: "init";
}
| {
boxes: Int32Array;
id: number;
kind: "fill";
};Defined in: engine/src/worker/chunks.ts:24
Union Members
Type Literal
{
init: unknown;
kind: "init";
}Sent once, first: what the worker builds its fill from.
Type Literal
{
boxes: Int32Array;
id: number;
kind: "fill";
}Fill these boxes: six inclusive bounds per box (x0, y0, z0, x1, y1, z1).
ChunkFill
Fills one 8³ brick, the way an editMany fill callback does: cells holds the brick's 512 voxels (lx + ly8 + lz64), empty unless an earlier box of the same request already wrote to it, and (ox, oy, oz) is its world origin. Write the voxels and return true if anything changed.
ChunkResponse
Messages a chunk worker sends the pool.