Skip to content

Documentation / @ripl/3d / resolveLightColor

Function: resolveLightColor() ​

resolveLightColor(color, intensity): ColorUnitRGB

Defined in: 3d/src/core/shading.ts:337

Resolves a light's colour and intensity into the premultiplied unit RGB the shading maths uses.

Parameters ​

ParameterTypeDescription
colorstringAny colour string @ripl/core can parse.
intensitynumberThe multiplier to premultiply the colour by.

Returns ​

ColorUnitRGB

The premultiplied colour.