FastLED 3.10.6
Loading...
Searching...
No Matches

◆ WaveFx()

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

Construct wave effect with given coordinate mapping and parameters.

Parameters
xymapCoordinate mapping from 2D grid to 1D LED array
argsConfiguration parameters (uses defaults if not specified)

Definition at line 184 of file wave.h.

185 : Fx2d(xymap), mWaveSim(xymap.getWidth(), xymap.getHeight(),
186 args.factor, args.speed, args.dampening) {
187 // Initialize the wave simulation with the given parameters.
188 if (args.crgbMap == nullptr) {
189 // Use the default CRGB mapping function.
191 } else {
192 // Set a custom CRGB mapping function.
193 mCrgbMap = args.crgbMap;
194 }
195 setAutoUpdate(args.auto_updates);
196 setXCylindrical(args.x_cyclical);
197 setUseChangeGrid(args.use_change_grid);
198 setOutputBlur(args.output_blur_amount, args.output_blur_passes);
199 }
XYMap xymap
Fx2d(const XYMap &xyMap)
Definition fx2d.h:19
void setAutoUpdate(bool autoUpdate)
Enable/disable automatic simulation updates.
Definition wave.h:395
WaveCrgbMapPtr mCrgbMap
Definition wave.h:417
void setUseChangeGrid(bool enabled)
Enable/disable change grid tracking optimization.
Definition wave.h:305
void setOutputBlur(fl::u8 amount, fl::u8 passes=1) FL_NO_EXCEPT
Configure the post-process output blur (#3122 A4)
Definition wave.h:211
void setXCylindrical(bool on)
Enable/disable cylindrical topology on x-axis.
Definition wave.h:223
WaveSimulation2D mWaveSim
Definition wave.h:416
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:414
corkscrew_args args
Definition old.h:149

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

+ Here is the call graph for this function: