59 for (fl::u32
x = 0;
x <
width;
x++) {
62 leds[idx] =
CRGB(value8, value8, value8);
188 if (
args.crgbMap ==
nullptr) {
190 mCrgbMap = fl::make_shared<WaveCrgbMapDefault>();
193 mCrgbMap = args.crgbMap;
380 const fl::u32 w =
mWaveSim.getWidth();
381 const fl::u32 h =
mWaveSim.getHeight();
UINumberField palette("Palette", 0, 0, 2)
u16 getWidth() const FL_NO_EXCEPT
Fx2d(const XYMap &xyMap) FL_NO_EXCEPT
u16 getHeight() const FL_NO_EXCEPT
fl::GradientInlined Gradient
void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, fl::span< CRGB > leds) FL_NO_EXCEPT override
Map wave values to gradient-colored LEDs.
WaveCrgbGradientMap() FL_NO_EXCEPT=default
Default constructor with no initial gradient.
WaveCrgbGradientMap(const CRGBPalette16 &palette) FL_NO_EXCEPT
Construct with a color palette.
void setGradient(const Gradient &gradient) FL_NO_EXCEPT
Set or update the color gradient.
Wave-to-color mapper using gradient/palette coloring.
virtual ~WaveCrgbMap() FL_NO_EXCEPT=default
virtual void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, fl::span< CRGB > leds) FL_NO_EXCEPT=0
Convert wave simulation values to LED colors.
void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, fl::span< CRGB > leds) FL_NO_EXCEPT override
Map wave values to grayscale LED colors.
Default wave-to-color mapper producing grayscale output.
Abstract base class for mapping wave simulation values to LED colors.
void addf(size_t x, size_t y, float value) FL_NO_EXCEPT
Add wave amplitude to existing value at a position.
void setf(size_t x, size_t y, float value) FL_NO_EXCEPT
Set wave amplitude at a specific grid position.
bool getUseChangeGrid() const FL_NO_EXCEPT
Get current change grid tracking setting.
LaplacianStencil getStencil() const FL_NO_EXCEPT
Get the currently active Laplacian stencil.
fl::u8 getOutputBlurPasses() const FL_NO_EXCEPT
void setXCylindrical(bool on) FL_NO_EXCEPT
Enable/disable cylindrical topology on x-axis.
void setStencil(LaplacianStencil s) FL_NO_EXCEPT
Select the discrete Laplacian stencil.
void setCrgbMap(WaveCrgbMapPtr crgbMap) FL_NO_EXCEPT
Set custom color mapping function.
fl::u8 getOutputBlurAmount() const FL_NO_EXCEPT
void draw(DrawContext context) FL_NO_EXCEPT override
Render wave to LED array.
void setHalfDuplex(bool on) FL_NO_EXCEPT
Enable/disable half-duplex mode.
void setDampening(float dampening) FL_NO_EXCEPT
Set wave energy dampening.
void setAutoUpdate(bool autoUpdate) FL_NO_EXCEPT
Enable/disable automatic simulation updates.
WaveFx(const XYMap &xymap, Args args=Args()) FL_NO_EXCEPT
Construct wave effect with given coordinate mapping and parameters.
void setOutputBlur(fl::u8 amount, fl::u8 passes=1) FL_NO_EXCEPT
Configure the post-process output blur (#3122 A4)
void setEasingMode(U8EasingFunction mode) FL_NO_EXCEPT
Set easing function for wave amplitude calculation.
void setSuperSample(SuperSample factor) FL_NO_EXCEPT
Set supersampling quality level.
void setSpeed(float speed) FL_NO_EXCEPT
Set wave propagation speed.
void setUseChangeGrid(bool enabled) FL_NO_EXCEPT
Enable/disable change grid tracking optimization.
void update() FL_NO_EXCEPT
Manually advance wave simulation by one step.
u8 getu8(size_t x, size_t y) const FL_NO_EXCEPT
Get wave amplitude as 8-bit value.
WaveSimulation2D mWaveSim
fl::string fxName() const FL_NO_EXCEPT override
Get effect name.
2D wave simulation effect with supersampling and gradient coloring
fl::WaveSimulation1D waveSim(NUM_LEDS, fl::SuperSample::SUPER_SAMPLE_2X)
fl::UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
u8 u8 fract8 blur_amount FL_NO_EXCEPT
constexpr int type_rank< T >::value
void blur2d(fl::span< CRGB > leds, u8 width, u8 height, fract8 blur_amount, const XYMap &xymap) FL_NO_EXCEPT
FL_DISABLE_WARNING_PUSH U constexpr common_type_t< T, U > min(T a, U b) FL_NO_EXCEPT
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
Representation of an 8-bit RGB pixel (Red, Green, Blue)
float speed
Wave propagation speed (0.0-1.0, typical: 0.1-0.3)
bool x_cyclical
If true, waves wrap around the x-axis (cylindrical topology)
fl::u8 output_blur_passes
Number of blur passes (1 = single pass, 2+ = repeated smoothing).
WaveFxArgs & operator=(const WaveFxArgs &) FL_NO_EXCEPT=default
WaveCrgbMapPtr crgbMap
Custom color mapper (nullptr uses default grayscale)
bool auto_updates
If true, simulation advances automatically in draw()
SuperSample factor
Supersampling quality (SUPER_SAMPLE_2X recommended for balance)
WaveFxArgs(const WaveFxArgs &) FL_NO_EXCEPT=default
float dampening
Energy dampening factor (higher = faster decay, typical: 3-10)
WaveFxArgs() FL_NO_EXCEPT=default
bool half_duplex
If true, constrains waves to positive values only.
bool use_change_grid
Use change grid tracking for optimization (may reduce visual quality)
fl::u8 output_blur_amount
Post-process Gaussian-style blur (#3122 A4 / #3112 research §A1).
Configuration parameters for WaveFx effect.