33 const uint32_t width =
waveSim.getWidth();
34 const uint32_t height =
waveSim.getHeight();
35 for (uint32_t
y = 0;
y < height;
y++) {
36 for (uint32_t
x = 0;
x < width;
x++) {
39 leds[idx] =
CRGB(value8, value8, value8);
50 const uint32_t width =
waveSim.getWidth();
51 const uint32_t height =
waveSim.getHeight();
52 for (uint32_t
y = 0;
y < height;
y++) {
53 for (uint32_t
x = 0;
x < width;
x++) {
84 if (args.crgbMap ==
nullptr) {
86 mCrgbMap = WaveCrgbMapDefaultPtr::New();
89 mCrgbMap = args.crgbMap;
119 void setf(
size_t x,
size_t y,
float value) {
124 void addf(
size_t x,
size_t y,
float value) {
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
UINumberField palette("Palette", 0, 0, 2)
UISlider dampening("Dampening", 6.0f, 0.0f, 10.0f, 0.1f)
WaveSimulation1D waveSim(NUM_LEDS, SuperSample::SUPER_SAMPLE_2X)
RGB color palette with 16 discrete values.
uint16_t getHeight() const
uint16_t getWidth() const
void mapWaveToLEDs(const XYMap &xymap, WaveSimulation2D &waveSim, CRGB *leds) override
WaveCrgbGradientMap(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)
WaveFx(XYMap xymap, Args args=Args())
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)
void setSuperSample(SuperSample factor)
void setDampening(float dampening)
void addf(size_t x, size_t y, float value)
WaveSimulation2D mWaveSim
fl::Str fxName() const override
Utility functions for color fill, palettes, blending, and more.
#define FASTLED_SMART_PTR(type)
CRGB ColorFromPalette(const CRGBPalette16 &pal, uint8_t index, uint8_t brightness, TBlendType blendType)
Get a color from a palette.
Implements a simple red square effect for 2D LED grids.
Declares classes for managing logical groups of LEDs.
Representation of an RGB pixel (Red, Green, Blue)