voxolith
API reference@voxolith/gen-terrainFunctions

fineTerrainInit()

Describe a fine terrain as data for a worker. top (default: the fine terrain's options.top) is evaluated on every coarse column once, so a closure over app state (a settlement's paths and yards) becomes a Uint8Array. Heights are copied as they are now: level before calling.

function fineTerrainInit(fine: FineTerrain, top?: TopOverride | undefined): FineTerrainInit;

Defined in: init.ts:35

Parameters

ParameterTypeDefault valueDescription
fineFineTerrainundefinedThe fine terrain, from refineTerrain.
top?TopOverride | undefinedfine.options.topThe override its bricks are filled with, when the app passes it per call instead of in the options.

Returns

FineTerrainInit

Structured-clonable data; fineTerrainFrom rebuilds a fine terrain whose fillBrick (with no top argument) writes the same cells.

On this page