Skip to content
Work in progress. These docs describe Spawnite at launch, and some parts are still being built.

TopLayerOptions

How a top layer looks and where it gathers.

Property Type Description
blendRadians? number The width of the layer’s edge, in radians either side of maxSlopeRadians: 0.02 a crisp line, 0.3 a soft fade. Left out, 0.12.
breakup? number Metres across the patches by which the edge wanders, so it does not follow the model’s contour; 0 for an edge that does. Left out, 0.3.
color ColorRepresentation The layer’s colour, such as moss’s #cdae5a.
maxSlopeRadians? number How far from up a face may turn and still gather the layer, in radians: π / 4 tops and gentle slopes, π / 2 every face turned up at all. Left out, π / 4.
roughness? number The layer’s roughness, 0 a mirror to 1 matte. Left out, 0.9.
showThrough? number How much of the surface’s own light and dark shows through the layer, 0 to 1, so the layer takes the stone’s grain. Left out, 0.3.
up? readonly [number, number, number] The world direction the layer gathers on, such as [0, 0, -1] for moss on a north face. Left out, up: [0, 1, 0].