Skip to content

Function: buildMetallicPalette()

ts
function buildMetallicPalette(bands?): TerrainLevel[];

Build a metallic-body TerrainLevel palette from four caller-supplied bands. The lib stays agnostic about the body composition — the caller computes the four bands from its own catalogue and passes the result in. When bands is omitted, an internal neutral grey ladder is used.

Thresholds and slot count are fixed (four bands — crater floor, plains, highlands, peaks). Per-band metalness / roughness / height are optional on every input entry; omitted fields fall back to the neutral ladder so a colour-only override still produces a coherent material schedule. emissive / emissiveIntensity propagate as-is — useful for self-lit peaks.

Parameters

ParameterTypeDescription
bands?readonly [MetallicBand, MetallicBand, MetallicBand, MetallicBand]Optional four-band spec ordered deep → plain → high → peak.

Returns

TerrainLevel[]

Distribué sous la licence indiquée dans le dépôt.