GPU Particles
self:set_color_ramp
ClientFades the particle color over its lifetime
Syntax
local status = self:set_color_ramp(
from,
to
)Parameters
| Type | Name | Description |
|---|---|---|
color | from | Color at the start of the particle lifetime as {r, g, b, a} |
color | to | Color at the end of the particle lifetime as {r, g, b, a} |
Returns
| Type | Name | Description |
|---|---|---|
bool | status | true on successful execution, false otherwise |
Examples
local entity = particle.gpu.create()
entity:set_color_ramp({1, 0.9, 0.3, 1}, {1, 0.2, 0, 0})