cloneParams()
Deep clone so presets are never mutated by a caller.
function cloneParams(p: TreeParams): TreeParams;Defined in: tree/src/params.ts:152
Parameters
| Parameter | Type |
|---|---|
p | TreeParams |
Returns
buildRoles()
The tree's role table in voxel-value order, coloured from colors (usually skinFor); a role colors leaves out shows magenta.
generateTree()
Generate a tree: grow the skeleton, voxelise and bark the wood, hang and carve the foliage, shade it, apply the season, then drop anything not connected to the base, so the result is always one piece. Pure and deterministic: the same params and rng sequence give the same tree.