Skip to content

API Function evaluateGradient

github-actions[bot] edited this page Nov 24, 2026 · 2 revisions

Function: evaluateGradient()

function evaluateGradient(
   g, 
   t, 
   out?
): number[] | Float32Array<ArrayBufferLike>;

Defined in: src/engine/core/gradient.ts:55

The gradient's colour and alpha at t as 0–1 sRGB components and alpha, written into out (a new array when none is given). Allocation-free with out, for code that evaluates it per vertex.

Parameters

g

Gradient

t

number

out?

number[] | Float32Array<ArrayBufferLike> = ...

Returns

number[] | Float32Array<ArrayBufferLike>

Clone this wiki locally