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

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

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