buildRoles()
The creature's role table in voxel-value order, coloured from colors (usually skinFor), with glossy material hints on the eyes, organs and blood. A role colors leaves out shows magenta.
function buildRoles(colors: ColorSet): Role[];Defined in: roles.ts:52
Parameters
| Parameter | Type |
|---|---|
colors | ColorSet |
Returns
Role[]
atScale()
The same creature, sized for a world of voxelsPerMetre (a rat at 100 vox/m comes out at size 0.8, about 50 voxels long). Presets keep their ratios to each other; sizes snap to the 0.05 grid of shape.size and never go below 0.7, where legs would thin to one voxel.
cloneParams()
Copy of the params, so presets are never mutated by a caller.