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

◆ draw()

void fl::WaveFx::draw ( DrawContext context)
inlineoverridevirtual
Parameters
nowThe 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 146 of file wave.h.

146 {
147 // Update the wave simulation.
148 if (mAutoUpdates) {
149 mWaveSim.update();
150 }
151 // Map the wave values to the LEDs.
152 mCrgbMap->mapWaveToLEDs(mXyMap, mWaveSim, context.leds);
153 }
XYMap mXyMap
Definition fx2d.h:31
WaveCrgbMapPtr mCrgbMap
Definition wave.h:170
bool mAutoUpdates
Definition wave.h:171
WaveSimulation2D mWaveSim
Definition wave.h:169

References fl::_DrawContext::leds, mAutoUpdates, mCrgbMap, mWaveSim, and fl::Fx2d::mXyMap.