1681-engine / pixel / registerMaterial
Function: registerMaterial() ​
ts
function registerMaterial(name, material): void;Defined in: src/pixel/ramp.ts:92
Adds a material, or changes a built-in one: how its shadows and lights drift (light) and the five factors its ramp is built from, darkest to brightest (factors, around 1: below darkens, above lifts). Register before painting with it; tones already worked out for that material are forgotten.
Parameters ​
| Parameter | Type |
|---|---|
name | string |
material | { factors: RampFactors; light: MaterialLight; } |
material.factors | RampFactors |
material.light | MaterialLight |
Returns ​
void