voxels
Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
VoxelCellsOptions |
Returns
Section titled “Returns”Example
Section titled “Example”collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
VoxelGridOptions |
Returns
Section titled “Returns”Example
Section titled “Example”collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })Call Signature
Section titled “Call Signature”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.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
options |
VoxelColumnsOptions |
Returns
Section titled “Returns”Example
Section titled “Example”collider: voxels({ cellSize: 1, grid: ChunkTrait.fields.blocks, empty: [Block.Air] })