Chunk
A persisted 16x16x16-voxel chunk (4096 voxels) of an app's voxel world. Holds the packed voxel-type grid (voxels), sparse per-voxel state overrides (voxelStates), an optional opaque chunk-level state blob (chunkState), and level-of-detail meshes (lods). Returned by getChunk/getChunksByDistance and written by updateChunk/updateChunkState/updateChunkLods.
type Chunk {
chunkId: ID!
appId: ID!
coordinates: ChunkCoordinates!
voxels: String
voxelStates: [VoxelState!]!
owner: ID
createdAt: DateTime!
updatedAt: DateTime!
chunkState: String
cdnUploadedAt: DateTime
lods: [LodData!]
}
Fields
Chunk.chunkId ● ID! non-null scalar
Server-assigned unique chunk id (decimal string).
Chunk.appId ● ID! non-null scalar
Id of the app that owns this chunk (decimal string).
Chunk.coordinates ● ChunkCoordinates! non-null object
This chunk's address in the app's world grid.
Chunk.voxels ● String scalar
BASE64-encoded binary blob of the dense voxel-type grid. When present, the DECODED buffer is exactly 4096 bytes: one unsigned byte (voxel type 0-255) per voxel, indexed as x + y*16 + z*256 with x,y,z in 0-15. Null when the chunk has no voxel grid yet. Decode from base64 before reading.
Chunk.voxelStates ● [VoxelState!]! non-null object
Sparse list of per-voxel state overrides (e.g. rotation, atlas, flags) for voxels that need more than a plain type byte. Empty when no voxel carries extra state.
Chunk.owner ● ID scalar
User id (decimal string) of the last writer of this chunk, or null if unknown.
Chunk.createdAt ● DateTime! non-null scalar
Timestamp when this chunk row was first created.
Chunk.updatedAt ● DateTime! non-null scalar
Timestamp of the most recent write to this chunk.
Chunk.chunkState ● String scalar
BASE64-encoded opaque binary blob holding chunk-LEVEL state (distinct from per-voxel state). Decode from base64; null when unset. Written only via updateChunkState and preserved by updateChunk/updateChunkLods.
Chunk.cdnUploadedAt ● DateTime scalar
Timestamp the chunk's binary (d2.bin) was last synced to the CDN/S3, or null if it has never been uploaded.
Chunk.lods ● [LodData!] list object
Level-of-detail (LOD) entries for this chunk (coarser sampled representations), or null if none. Each entry is keyed by integer level (0 = finest) and carries a base64-encoded binary blob.
Returned By
getChunk query ● updateChunk mutation ● updateChunkLods mutation ● updateChunkState mutation
Member Of
ChunksByDistanceResponse object