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

149 {
150 // Update the wave simulation.
151 if (mAutoUpdates) {
152 mWaveSim.update();
153 }
154 // Map the wave values to the LEDs.
155 mCrgbMap->mapWaveToLEDs(mXyMap, mWaveSim, context.leds);
156 }
XYMap mXyMap
Definition fx2d.h:31
WaveCrgbMapPtr mCrgbMap
Definition wave.h:173
bool mAutoUpdates
Definition wave.h:174
WaveSimulation2D mWaveSim
Definition wave.h:172

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