21 VideoFxWrapperPtr vid_fx = VideoFxWrapperPtr::New(effect);
22 vid_fx->setFade(0, 0);
62 bool ok =
mEffects.get(index, &removedFx);
int addFx(FxPtr effect)
Adds a new effect to the engine.
~FxEngine()
Destructor for FxEngine.
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 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.
bool draw(uint32_t now, CRGB *outputBuffer)
Renders the current effect or transition to the output buffer.
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.
Implements a simple red square effect for 2D LED grids.
Representation of an RGB pixel (Red, Green, Blue)