GPU Particles

self:set_color_ramp

Client

Fades the particle color over its lifetime

Syntax

local status = self:set_color_ramp(
    from,
    to
)

Parameters

TypeNameDescription
colorfromColor at the start of the particle lifetime as {r, g, b, a}
colortoColor at the end of the particle lifetime as {r, g, b, a}

Returns

TypeNameDescription
boolstatustrue on successful execution, false otherwise

Examples

Fade from yellow to transparent red
local entity = particle.gpu.create()

entity:set_color_ramp({1, 0.9, 0.3, 1}, {1, 0.2, 0, 0})

On this page