Skip to main content

@novorender/api / RenderStateColorGradient

Interface: RenderStateColorGradient<T>

Defined in: @novorender/src/core3d/state/index.ts:375

A color gradient curve.

Remarks​

This curve is used to visualize some scalar value as a color gradient, e.g. terrain evelvation or point cloud devience.

Type Parameters​

Type Parameter
T extends RGB | RGBA

Properties​

knots​

readonly knots: readonly RenderStateColorGradientKnot<T>[];

Defined in: @novorender/src/core3d/state/index.ts:384

A set of knots defining a non-uniform linear spline curve.

Remarks​

Nodes must be sorted in ascending order of position! At least two nodes are required for any sort of gradient. Nodes do not have to be uniformly distributed position-wise. To create a discontinuity in the gradient, two adjacent nodes with identical position, but different colors may be used. Any position outside the min/max range defined by this list will be clamped to the color of the nearest node (min or max), i.e., no extrapolation will occur.