Subclasses implement rendering given the time delta and total time.
- Parameters
-
| dt_ms | Milliseconds since last draw (capped to prevent huge jumps). |
| t_ms | Milliseconds since first draw. |
Implements fl::FlowField.
Definition at line 434 of file flowfield.cpp.hpp.
434 {
435 float dt = dt_ms * 0.001f;
436 float t = t_ms * 0.001f;
437
439 switch (
mParams.emitter_mode) {
440 case 0:
442 break;
443 case 1:
445 break;
446 case 2:
449 break;
450 default:
452 break;
453 }
455
458 for (
int y = 0;
y < h;
y++) {
459 for (
int x = 0;
x < w;
x++) {
460 int ledIdx =
mXyMap.mapToIndex(
x,
y);
462 context.leds.data()[ledIdx].r =
f2u8(
mR[i]);
463 context.leds.data()[ledIdx].g =
f2u8(
mG[i]);
464 context.leds.data()[ledIdx].b =
f2u8(
mB[i]);
465 }
466 }
467
468 if (
mParams.show_flow_vectors) {
470 }
471}
void drawFlowVectors(fl::span< CRGB > leds)
void flowAdvect(float dt)
void emitOrbitalDots(float t)
void flowPrepare(float t)
void emitLissajousLine(float t)
int idx(int y, int x) const
References drawFlowVectors(), emitLissajousLine(), emitOrbitalDots(), f2u8(), flowAdvect(), flowPrepare(), fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), idx(), fl::DrawContext::leds, mB, mG, fl::FlowField::mParams, mR, fl::Fx2d::mXyMap, fl::t, fl::x, and fl::y.