Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

voxels

voxels(options): VoxelsShape

A grid of cubes cellSize metres on a side, in the entity’s own axes, each the cube from [x, y, z] times cellSize to one cellSize past it. Filled at cells, cubes that never change; or one for each solid cell of a grid field, grid, which both ends build from the grid and change in place as editGrid changes it: a world of blocks. A fixed body takes it, which the body’s type holds.

Parameter Type
options VoxelCellsOptions

VoxelsShape

collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })

voxels(options): VoxelGridShape

A grid of cubes cellSize metres on a side, in the entity’s own axes, each the cube from [x, y, z] times cellSize to one cellSize past it. Filled at cells, cubes that never change; or one for each solid cell of a grid field, grid, which both ends build from the grid and change in place as editGrid changes it: a world of blocks. A fixed body takes it, which the body’s type holds.

Parameter Type
options VoxelGridOptions

VoxelGridShape

collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })

voxels(options): VoxelGridShape

A grid of cubes cellSize metres on a side, in the entity’s own axes, each the cube from [x, y, z] times cellSize to one cellSize past it. Filled at cells, cubes that never change; or one for each solid cell of a grid field, grid, which both ends build from the grid and change in place as editGrid changes it: a world of blocks. A fixed body takes it, which the body’s type holds.

Parameter Type
options VoxelColumnsOptions

VoxelGridShape

collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })