38 Str fxName()
const override {
return "NoisePalette"; }
71 uint16_t
XY(uint8_t
x, uint8_t
y)
const {
return mXyMap.mapToIndex(
x,
y); }
97 green, green, black, black, purple, purple, black, black, green,
98 green, black, black, purple, purple, black, black);
central include file for FastLED, defines the CFastLED class/object
UINumberField palette("Palette", 0, 0, 2)
void mapNoiseToLEDsUsingPalette()
RGB color palette with 16 discrete values.
uint16_t xyMap(uint16_t x, uint16_t y) const
CRGBPalette16 currentPalette
void SetupBlackAndWhiteStripedPalette()
uint8_t changeToRandomPalette()
bool hasFixedFrameRate(float *fps) const override
void setScale(uint16_t scale)
uint16_t XY(uint8_t x, uint8_t y) const
uint8_t getPalettePresetCount() const
fl::scoped_array< uint8_t > noise
Str fxName() const override
void SetupPurpleAndGreenPalette()
uint8_t getPalettePreset() const
void setSpeed(uint16_t speed)
void SetupRandomPalette()
NoisePalette(XYMap xyMap, float fps=60.f)
void setPalette(const CRGBPalette16 &palette, uint16_t speed, uint16_t scale, bool colorLoop)
void setPalettePreset(int paletteIndex)
void draw(DrawContext context) override
#define FASTLED_SMART_PTR(type)
void fill_solid(struct CRGB *targetArray, int numToFill, const struct CRGB &color)
Fill a range of LEDs with a solid color.
@ HUE_PURPLE
Purple (270°)
LIB8STATIC uint8_t random8()
Generate an 8-bit random number.
Implements a simple red square effect for 2D LED grids.
Functions to generate and fill arrays with noise.
Fast, efficient random number generators specifically designed for high-performance LED programming.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
@ Black
<div style='background:#000000;width:4em;height:4em;'></div>
Representation of an RGB pixel (Red, Green, Blue)