VoxelChunk:read
methodVoxelChunk:read() -> BytesSnapshot the chunk's cells (run-length encoded).
handle2 methods, 2 fields
A loaded chunk of a streamed voxel world. chunk.voxel is the chunk's volume — edit it with the full Voxel surface; read/write snapshot and restore the cells for persistence.
datumhue.voxel.world (in its callback), VoxelWorld:chunk| Field | Type | Access | Description |
|---|---|---|---|
coords | Vec3 | read-only | The chunk's integer grid coordinates in the world, or nil once unloaded. |
voxel | Voxel | read-only | The chunk's voxel volume; edit it with the full Voxel surface. Collisions and physics queries name the chunk's body as this handle. |
VoxelChunk:read() -> BytesSnapshot the chunk's cells (run-length encoded).
VoxelChunk:write(data: Bytes)Restore cells from a read (or on_chunk_unload) snapshot taken at the same chunk size.