105#ifndef FL_ANIMARTRIX_USE_FIXED_POINT
106#if defined(FL_IS_ESP_32P4)
107#define FL_ANIMARTRIX_USE_FIXED_POINT 0
109#define FL_ANIMARTRIX_USE_FIXED_POINT 1
114#if FL_ANIMARTRIX_USE_FIXED_POINT
115#define ANIMARTRIX_VIZ(FloatClass, FPClass) &makeViz<FPClass>
117#define ANIMARTRIX_VIZ(FloatClass, FPClass) &makeViz<FloatClass>
200 return {-1,
"UNKNOWN"};
208 Fx2d *self =
static_cast<Fx2d *
>(userData);
225 mXyMap.convertToLookUpTable();
228 mCtx.leds = ctx.leds;
230 mCtx.xyMapUserData =
this;
238 if (
mCtx.mEngine ==
nullptr) {
243 if (anim_changed || !
mViz) {
259 for (
int i = 0; i <
mXyMap.getTotal(); ++i) {
260 CRGB &pixel = ctx.leds[i];
264 pixel =
CRGB(pixel.raw[b0_index], pixel.raw[b1_index],
265 pixel.raw[b2_index]);
304 if (ovr.first == anim) {
305 ovr.second = factory;
346 if (ovr.first == anim && ovr.second) {
352 if (entry.anim == anim) {
353 return entry.factory();
#define ANIMARTRIX_VIZ(FloatClass, FPClass)
Animartrix(const Animartrix &) FL_NO_EXCEPT=delete
fl::string fxName() const FL_NO_EXCEPT override
AnimartrixAnim mPrevAnimation
int fxNum() const FL_NO_EXCEPT
void fxNext(int fx=1) FL_NO_EXCEPT
fl::unique_ptr< IAnimartrix2Viz > mCustomViz
IAnimartrix2Viz * createViz(AnimartrixAnim anim) FL_NO_EXCEPT
fl::vector< fl::pair< AnimartrixAnim, AnimartrixVizFactory > > mFactoryOverrides
AnimartrixAnim mCurrentAnimation
fl::unique_ptr< IAnimartrix2Viz > mViz
Animartrix(const XYMap &xyMap, AnimartrixAnim which_animation) FL_NO_EXCEPT
int fxGet() const FL_NO_EXCEPT
void setVizFactory(AnimartrixAnim anim, AnimartrixVizFactory factory) FL_NO_EXCEPT
Override the factory for a specific built-in animation enum.
void fxSet(int fx) FL_NO_EXCEPT
void draw(DrawContext ctx) FL_NO_EXCEPT override
static fl::vector< fl::pair< int, fl::string > > getAnimationList() FL_NO_EXCEPT
EOrder getColorOrder() const FL_NO_EXCEPT
void setCustomViz(IAnimartrix2Viz *viz) FL_NO_EXCEPT
Set a fully custom viz that bypasses the animation enum entirely.
void setColorOrder(EOrder order) FL_NO_EXCEPT
u16 xyMap(u16 x, u16 y) const FL_NO_EXCEPT
u16 getWidth() const FL_NO_EXCEPT
Fx2d(const XYMap &xyMap) FL_NO_EXCEPT
u16 getHeight() const FL_NO_EXCEPT
void push_back(const T &value)
A doubly-linked list container.
Centralized logging categories for FastLED hardware interfaces and subsystems.
pair< typename fl::decay< T1 >::type, typename fl::decay< T2 >::type > make_pair(T1 &&t, T2 &&u) FL_NO_EXCEPT
static const AnimartrixEntry ANIMATION_TABLE[]
u8 u8 fract8 blur_amount FL_NO_EXCEPT
IAnimartrix2Viz *(*)() AnimartrixVizFactory
fl::string getAnimartrixName(int animation) FL_NO_EXCEPT
int getAnimartrixCount() FL_NO_EXCEPT
void init(Context &ctx, int w, int h) FL_NO_EXCEPT
u16 xyMapCallbackAdapter(u16 x, u16 y, void *userData) FL_NO_EXCEPT
void setTime(Context &ctx, fl::u32 t) FL_NO_EXCEPT
AnimartrixAnimInfo getAnimartrixInfo(int index) FL_NO_EXCEPT
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
static IAnimartrix2Viz * makeViz() FL_NO_EXCEPT
Base definition for an LED controller.
AnimartrixVizFactory factory
#define RGB_BYTE2(RO)
Gets the color channel for byte 2.
#define RGB_BYTE1(RO)
Gets the color channel for byte 1.
#define RGB_BYTE0(RO)
Gets the color channel for byte 0.
Low level pixel data writing class.
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)