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

142 {
143 // Update the wave simulation.
144 if (mAutoUpdates) {
145 mWaveSim.update();
146 }
147 // Map the wave values to the LEDs.
148 mCrgbMap->mapWaveToLEDs(mXyMap, mWaveSim, context.leds);
149 }
XYMap mXyMap
Definition fx2d.h:31
WaveCrgbMapPtr mCrgbMap
Definition wave.h:166
bool mAutoUpdates
Definition wave.h:167
WaveSimulation2D mWaveSim
Definition wave.h:165

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