- Parameters
-
| now | The current time in milliseconds. Fx writers are encouraged to use this instead of millis() directly as this will more deterministic behavior. |
Implements fl::Fx.
Definition at line 223 of file animartrix.hpp.
223 {
225 mXyMap.convertToLookUpTable();
226 }
227
228 mCtx.leds = ctx.leds;
230 mCtx.xyMapUserData =
this;
231
232
234 if (anim_changed) {
237 }
238 if (
mCtx.mEngine ==
nullptr) {
240 }
241
242
243 if (anim_changed || !
mViz) {
245 }
246
248
249
250
255 }
256
257
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]);
266 }
267 }
268
269 mCtx.leds = fl::span<CRGB>();
270 }
AnimartrixAnim mPrevAnimation
fl::unique_ptr< IAnimartrix2Viz > mCustomViz
AnimartrixAnim mCurrentAnimation
fl::unique_ptr< IAnimartrix2Viz > mViz
IAnimartrix2Viz * createViz(AnimartrixAnim anim)
void init(Context &ctx, int w, int h)
void setTime(Context &ctx, fl::u32 t)
u16 xyMapCallbackAdapter(u16 x, u16 y, void *userData)
@ RGB
Red, Green, Blue (0012)
#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.
References createViz(), fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), fl::init(), fl::DrawContext::leds, mColorOrder, mCtx, mCurrentAnimation, mCustomViz, mPrevAnimation, mViz, fl::Fx2d::mXyMap, fl::DrawContext::now, fl::RGB, RGB_BYTE0, RGB_BYTE1, RGB_BYTE2, fl::setTime(), and fl::xyMapCallbackAdapter().