Fx1d(u16 numLeds) FL_NO_EXCEPT
Particles1d(u16 num_leds, u8 max_particles=10, u8 fade_rate=2) FL_NO_EXCEPT
void setSpeed(float speed) FL_NO_EXCEPT
Set speed multiplier (1.0 = normal, >1.0 = faster, <1.0 = slower)
fl::vector< Particle > mParticles
Particle pool (oldest particle reused when full)
u8 mFadeRate
Fade amount per frame (0-255, higher = shorter trails)
fl::string fxName() const FL_NO_EXCEPT override
~Particles1d() FL_NO_EXCEPT
void setLifetime(u16 lifetime_ms) FL_NO_EXCEPT
Set average particle lifetime in milliseconds.
void spawnRandomParticle() FL_NO_EXCEPT
Spawn a particle with random position, velocity, color, and lifetime.
void setCyclical(bool cyclical) FL_NO_EXCEPT
Set cyclical mode (true = wrap around, false = stop at edges)
u8 mOverdrawCount
Number of update/draw cycles per frame (higher = smoother trails, more CPU)
u16 mLifetimeMs
Average particle lifetime in milliseconds.
float mSpeedMultiplier
Global speed multiplier (1.0 = normal, >1.0 = faster, <1.0 = slower)
bool mCyclical
Wrap mode: true = wrap around, false = stop at edges.
void draw(DrawContext context) FL_NO_EXCEPT override
Update and render all particles with overdraw technique.
void setFadeRate(u8 fade_rate) FL_NO_EXCEPT
Set fade rate for trails (0-255, higher = shorter trails)
void setOverdrawCount(u8 count) FL_NO_EXCEPT
Set overdraw count (higher = smoother trails, more CPU)
Power-based particle system for 1D LED strips creating organic light effects.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)
CHSV baseColor
Base color (HSV) - saturation increases with age.
bool active
Active flag (false = available for reuse)
float pos
Position (floating point for sub-pixel rendering)
float baseVel
Base velocity (actual velocity = baseVel × power)
void draw(fl::span< CRGB > leds, u32 now, u16 numLeds) FL_NO_EXCEPT
Render particle with sub-pixel accuracy and power-modulated color.
void update(u32 now, u16 numLeds, float speedMultiplier, bool cyclical) FL_NO_EXCEPT
Update position based on velocity × power.
u32 lifetime
Lifespan in milliseconds.
u32 birthTime
Spawn timestamp (ms)
void spawn(u16 numLeds) FL_NO_EXCEPT
Spawn with random position, velocity, color, and lifetime.
float getPower(u32 now) const FL_NO_EXCEPT
Individual particle with power-based lifecycle.