18#ifndef FASTLED_FX_ENGINE_MAX_FX
19#define FASTLED_FX_ENGINE_MAX_FX 64
40 FxEngine(uint16_t numLeds,
bool interpolate =
true);
53 int addFx(FxPtr effect);
79 FxPtr
getFx(
int index);
88 bool draw(fl::u32 now,
CRGB *outputBuffer);
95 bool nextFx(uint16_t transition_ms = 500);
103 bool setNextFx(
int index, uint16_t duration);
int addFx(FxPtr effect)
Adds a new effect to the engine.
void setSpeed(float scale)
Sets the speed of the fx engine, which will impact the speed of all effects.
~FxEngine()
Destructor for FxEngine.
fl::FixedMap< int, FxPtr, FASTLED_FX_ENGINE_MAX_FX > IntFxMap
bool nextFx(uint16_t transition_ms=500)
Transitions to the next effect in the sequence.
bool mDurationSet
Flag indicating if a new transition has been set.
FxCompositor mCompositor
Handles effect transitions and rendering.
int getCurrentFxId() const
int mCurrId
Id of the current effect.
bool setNextFx(int index, uint16_t duration)
Sets the next effect to transition to.
FxEngine(uint16_t numLeds, bool interpolate=true)
Constructs an FxEngine with the specified number of LEDs.
IntFxMap mEffects
Collection of effects.
uint16_t mDuration
Duration of the current transition.
FxPtr removeFx(int index)
Requests removal of an effect from the engine, which might not happen immediately (for example the Fx...
FxPtr getFx(int index)
Retrieves an effect from the engine without removing it.
int addFx(Fx &effect)
Adds a new effect to the engine.
bool draw(fl::u32 now, CRGB *outputBuffer)
Renders the current effect or transition to the output buffer.
Defines the red, green, and blue (RGB) pixel struct.
Implements the FastLED namespace macros.
shared_ptr< T > make_shared_no_tracking(T &obj)
Representation of an RGB pixel (Red, Green, Blue)