36 const fl::u32 width =
waveSim.getWidth();
37 const fl::u32 height =
waveSim.getHeight();
38 for (fl::u32
y = 0;
y < height;
y++) {
39 for (fl::u32
x = 0;
x < width;
x++) {
42 leds[idx] =
CRGB(value8, value8, value8);
89 if (
args.crgbMap ==
nullptr) {
91 mCrgbMap = fl::make_shared<WaveCrgbMapDefault>();
94 mCrgbMap = args.crgbMap;
127 void setf(
size_t x,
size_t y,
float value) {
132 void addf(
size_t x,
size_t y,
float value) {
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
UINumberField palette("Palette", 0, 0, 2)
uint16_t getHeight() const
uint16_t getWidth() const
void setGradient(const Gradient &gradient)
fl::GradientInlined Gradient
WaveCrgbGradientMap()=default
void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, CRGB *leds) override
WaveCrgbGradientMap(const CRGBPalette16 &palette)
virtual void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, CRGB *leds)=0
virtual ~WaveCrgbMap()=default
void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, CRGB *leds) override
void setAutoUpdate(bool autoUpdate)
void setHalfDuplex(bool on)
void setSpeed(float speed)
uint8_t getu8(size_t x, size_t y) const
void setf(size_t x, size_t y, float value)
void setCrgbMap(WaveCrgbMapPtr crgbMap)
void draw(DrawContext context) override
void setEasingMode(U8EasingFunction mode)
WaveFx(const XYMap &xymap, Args args=Args())
void setSuperSample(SuperSample factor)
void setDampening(float dampening)
void addf(size_t x, size_t y, float value)
void setXCylindrical(bool on)
fl::string fxName() const override
WaveSimulation2D mWaveSim
WaveSimulation1D waveSim(NUM_LEDS, SuperSample::SUPER_SAMPLE_2X)
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
Utility functions for color fill, palettes, blending, and more.
Declares classes for managing logical groups of LEDs.
#define FASTLED_SMART_PTR(type)
Representation of an RGB pixel (Red, Green, Blue)
WaveFxArgs(SuperSample factor, bool half_duplex, bool auto_updates, float speed, float dampening, WaveCrgbMapPtr crgbMap)
WaveFxArgs & operator=(const WaveFxArgs &)=default
WaveFxArgs(const WaveFxArgs &)=default