|
FastLED 3.9.15
|
Individual particle with power-based lifecycle.
Power level (1.0 → 0.0) controls velocity, saturation, and brightness. Uses floating-point position for sub-pixel rendering smoothness.
Definition at line 102 of file particles.h.
Collaboration diagram for fl::Particles1d::Particle:Public Member Functions | |
| Particle () FL_NOEXCEPT | |
| void | draw (fl::span< CRGB > leds, u32 now, u16 numLeds) |
| Render particle with sub-pixel accuracy and power-modulated color. | |
| float | getPower (u32 now) const |
| void | spawn (float pos, float baseVel, CHSV baseColor, u32 lifetime) |
| Spawn with specific parameters. | |
| void | spawn (u16 numLeds) |
| Spawn with random position, velocity, color, and lifetime. | |
| void | update (u32 now, u16 numLeds, float speedMultiplier, bool cyclical) |
| Update position based on velocity × power. | |
Public Attributes | |
| bool | active |
| Active flag (false = available for reuse) | |
| CHSV | baseColor |
| Base color (HSV) - saturation increases with age. | |
| float | baseVel |
| Base velocity (actual velocity = baseVel × power) | |
| u32 | birthTime |
| Spawn timestamp (ms) | |
| u32 | lifetime |
| Lifespan in milliseconds. | |
| float | pos |
| Position (floating point for sub-pixel rendering) | |