Optionalcolor: [Color3Like, number][]
The colour keys: an RGB colour ({r, g, b}, such as a Babylon Color3) at a
position in [0, 1]. Opaque white from 0 to 1 by default. The colours are copied.
Optionalalpha: [number, number][]
The alpha keys: an alpha at a position in [0, 1]. 1 from 0 to 1 by default.
The alpha keys: alpha at positions in [0, 1], interpolated linearly.
The colour keys: linear RGB at positions in [0, 1], interpolated linearly.
'function': the colour depends on t.
Static ReadonlyTABLE_Sample count of the tables built by refreshTable.
Drops the sampled table, so later reads go back to evaluating the keys.
A copy with the same settings.
The colour at t (0 to 1) from the keys, as Unity's Gradient.Evaluate: for tools and UI
that show a gradient. Returned as a new {r, g, b, a}.
The colour at t (0 to 1) written into target, such as a Babylon Color4, and returned.
Writes the colour at t into color.
color.
Evaluates the gradient keys themselves, ignoring any sampled table.
Rebuilds the sampled table when the gradient changed, otherwise does nothing. See PiecewiseBezier.refreshTable — same reasoning, and the same signature check so a gradient edited in an editor is picked up.
The sampled table genColor currently reads from, or null while none has been built. Lets a compiled behavior pass interpolate the table inline instead of calling in here once per particle.
Rolls whatever the generator picks at random into memory, before the first FunctionColorGenerator.genColor.
The generator's JSON.
Staticfrom
A colour that changes over time
tin [0, 1] (a particle's life fraction, or the system's cycle): a gradient, or a random blend of two.