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 161 of file wave.h.

161 {
162 // Update the wave simulation.
163 if (mAutoUpdates) {
164 mWaveSim.update();
165 }
166 // Map the wave values to the LEDs.
167 mCrgbMap->mapWaveToLEDs(mXyMap, mWaveSim, context.leds);
168 }
XYMap mXyMap
Definition fx2d.h:31
WaveCrgbMapPtr mCrgbMap
Definition wave.h:185
bool mAutoUpdates
Definition wave.h:186
WaveSimulation2D mWaveSim
Definition wave.h:184

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