minVoxelsPerMetre()
The smallest world scale, in voxels per metre, at which atScale builds this creature at its real size (see realSizeAt): about 84 for the default rat (size 1.2), 88 for the fat rat (1.15). Scales from here up to about 250 vox/m are real size. The size snaps to a 0.05 grid, so this is where the...
function minVoxelsPerMetre(params: CreatureParams): number;Defined in: presets.ts:137
The smallest world scale, in voxels per metre, at which atScale builds this creature at its real size (see realSizeAt): about 84 for the default rat (size 1.2), 88 for the fat rat (1.15). Scales from here up to about 250 vox/m are real size. The size snaps to a 0.05 grid, so this is where the snapped size first reaches 0.7, a little under the unsnapped 87.5 for the default rat.
Parameters
| Parameter | Type | Description |
|---|---|---|
params | CreatureParams | Any creature params; not mutated. |
Returns
number
A scale v with realSizeAt(params, v) true and false for anything below it.
Example
const vpm = 100;
const rats = vpm >= minVoxelsPerMetre(PRESETS.rat); // true: 100 >= 84.375generateCreature()
Generate a rigged, animated creature: the rest-pose body built bone by bone, layered inside by depth (fur, fat, flesh, muscle) with bones and organs below the surface, painted, bound to a 26-bone rig, and given walk, turn, run, idle, sniff and death clips at 12 fps. The rig's cover table draws...
realSizeAt()
Whether atScale builds this creature at its real size in a world of voxelsPerMetre. Below minVoxelsPerMetre it cannot: atScale keeps shape.size at 0.7 so the legs stay two voxels thick, and the creature comes out larger than life (a rat is 0.86 m long at 50 vox/m, 2.15 m at 20). It is also false...