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

◆ WaveFx()

fl::WaveFx::WaveFx ( XYMap xymap,
Args args = Args() )
inline

Definition at line 80 of file wave.h.

81 : Fx2d(xymap), mWaveSim(xymap.getWidth(), xymap.getHeight(), args.factor,
82 args.speed, args.dampening) {
83 // Initialize the wave simulation with the given parameters.
84 if (args.crgbMap == nullptr) {
85 // Use the default CRGB mapping function.
86 mCrgbMap = WaveCrgbMapDefaultPtr::New();
87 } else {
88 // Set a custom CRGB mapping function.
89 mCrgbMap = args.crgbMap;
90 }
91 setAutoUpdate(args.auto_updates);
92 }
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
Fx2d(const XYMap &xyMap)
Definition fx2d.h:19
void setAutoUpdate(bool autoUpdate)
Definition wave.h:150
WaveCrgbMapPtr mCrgbMap
Definition wave.h:165
WaveSimulation2D mWaveSim
Definition wave.h:164

References fl::Fx2d::Fx2d(), dampening, fl::Fx2d::getHeight(), fl::Fx2d::getWidth(), mWaveSim, setAutoUpdate(), speed, and xymap.

+ Here is the call graph for this function: