FastLED 3.9.15
|
Directories | |
1d | |
2d | |
detail | |
video | |
Files | |
frame.cpp | |
frame.h | |
fx.h | |
fx1d.h | |
fx2d.h | |
fx_engine.cpp | |
fx_engine.h | |
time.cpp | |
time.h | |
video.cpp | |
video.h | |
The FX library adds optional, higher‑level visual effects and a small runtime around FastLED. It includes ready‑to‑use animations for strips (1D) and matrices (2D), utilities to layer/up‑scale/blend effects, and a simple video playback pipeline.
If you’re new to FastLED and C++: an effect is an object that you construct once and call draw(...)
on every frame, passing time and your LED buffer. Start with the 1D/2D examples, then explore composition and video as needed.
1d/
: Strip effects like Cylon, DemoReel100, Fire2012, NoiseWave, Pacifica, Pride2015, and TwinkleFox.2d/
: Matrix effects including NoisePalette, WaveFx, ScaleUp, Blend2d (compositing effects), and Animartrix integrations.video/
: Read frames from files/streams, buffer, and interpolate for smooth playback on your LEDs.detail/
: Internal helpers for draw context, layering, transitions, and compositing.Fx::DrawContext
carries per‑frame data: now
(ms), CRGB* leds
, optional frame_time
, and a speed
hint.CRGB
, CHSV
, CRGBPalette16
, and timing helpers like beatsin*
.Blend2d
to stack multiple 2D effects and blur/blend them.detail/
components (FxLayer
, FxCompositor
, Transition
) support cross‑fading between effects over time.video/
pipeline reads frames from a FileHandle
or ByteStream
, keeps a small buffer, and interpolates between frames to match your output rate.src/fx/readme
and headers for details.Explore each subfolder’s README to find the effect you want, then copy the corresponding header into your project and call draw(...)
every frame.
examples/Fx*
)examples/FxCylon/FxCylon.ino
examples/FxDemoReel100/FxDemoReel100.ino
examples/FxFire2012/FxFire2012.ino
examples/FxPacifica/FxPacifica.ino
examples/FxPride2015/FxPride2015.ino
examples/FxTwinkleFox/FxTwinkleFox.ino
examples/FxNoisePlusPalette/FxNoisePlusPalette.ino
examples/FxWave2d/
examples/FxGfx2Video/FxGfx2Video.ino
examples/FxSdCard/FxSdCard.ino
Minimal 1D call pattern:
Minimal 2D call pattern (requires XYMap
):