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();
230 mCtx.xyMapUserData =
this;
238 if (
mCtx.mEngine ==
nullptr) {
243 if (anim_changed || !
mViz) {
259 for (
int i = 0; i <
mXyMap.getTotal(); ++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)
void setVizFactory(AnimartrixAnim anim, AnimartrixVizFactory factory)
Override the factory for a specific built-in animation enum.
Animartrix(const Animartrix &) FL_NOEXCEPT=delete
AnimartrixAnim mPrevAnimation
fl::unique_ptr< IAnimartrix2Viz > mCustomViz
void draw(DrawContext ctx) override
void setColorOrder(EOrder order)
Animartrix(const XYMap &xyMap, AnimartrixAnim which_animation)
fl::vector< fl::pair< AnimartrixAnim, AnimartrixVizFactory > > mFactoryOverrides
AnimartrixAnim mCurrentAnimation
fl::unique_ptr< IAnimartrix2Viz > mViz
static fl::vector< fl::pair< int, fl::string > > getAnimationList()
void setCustomViz(IAnimartrix2Viz *viz)
Set a fully custom viz that bypasses the animation enum entirely.
EOrder getColorOrder() const
fl::string fxName() const override
IAnimartrix2Viz * createViz(AnimartrixAnim anim)
u16 xyMap(u16 x, u16 y) const
void push_back(const T &value)
A doubly-linked list container.
Centralized logging categories for FastLED hardware interfaces and subsystems.
fl::string getAnimartrixName(int animation)
static const AnimartrixEntry ANIMATION_TABLE[]
IAnimartrix2Viz *(*)() AnimartrixVizFactory
void init(Context &ctx, int w, int h)
AnimartrixAnimInfo getAnimartrixInfo(int index)
void setTime(Context &ctx, fl::u32 t)
u16 xyMapCallbackAdapter(u16 x, u16 y, void *userData)
static IAnimartrix2Viz * makeViz()
pair< typename fl::decay< T1 >::type, typename fl::decay< T2 >::type > make_pair(T1 &&t, T2 &&u) FL_NOEXCEPT
EOrder
RGB color channel orderings, used when instantiating controllers to determine what order the controll...
@ RGB
Red, Green, Blue (0012)
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)