FastLED 3.9.15
Loading...
Searching...
No Matches

◆ createViz()

IAnimartrix2Viz * fl::Animartrix::createViz ( AnimartrixAnim anim)
inlineprivate

Definition at line 337 of file animartrix.hpp.

337 {
338 // Custom viz takes precedence over everything
339 if (mCustomViz) {
340 // Return a non-owning "alias" — mCustomViz owns the lifetime.
341 // We return nullptr here; draw() will use mCustomViz directly.
342 return nullptr;
343 }
344 // Check per-animation factory overrides
345 for (const auto &ovr : mFactoryOverrides) {
346 if (ovr.first == anim && ovr.second) {
347 return ovr.second();
348 }
349 }
350 // Default: look up in ANIMATION_TABLE
351 for (const auto &entry : ANIMATION_TABLE) {
352 if (entry.anim == anim) {
353 return entry.factory();
354 }
355 }
356 return nullptr;
357 }
fl::unique_ptr< IAnimartrix2Viz > mCustomViz
fl::vector< fl::pair< AnimartrixAnim, AnimartrixVizFactory > > mFactoryOverrides
static const AnimartrixEntry ANIMATION_TABLE[]

References fl::ANIMATION_TABLE, mCustomViz, and mFactoryOverrides.

Referenced by draw().

+ Here is the caller graph for this function: