628 {
629
637
638
640
641
643
644
645 for (
int i = 0; i <
NUM_LEDS; i++) {
648
649
650 float global_brightness =
brightness.as<
float>();
651 pixel_color.r = (uint8_t)(pixel_color.r * global_brightness);
652 pixel_color.g = (uint8_t)(pixel_color.g * global_brightness);
653 pixel_color.b = (uint8_t)(pixel_color.b * global_brightness);
654
655 leds[i] = pixel_color;
656 }
657
658
660
661 int sparkle_count =
NUM_LEDS / 100 + 1;
662 for (int s = 0; s < sparkle_count; s++) {
666 }
667 }
668 }
669}
uint8_t getPaletteIndex(uint32_t millis32, int width, int max_width, int height, int max_height, uint32_t y_speed)
ColorPaletteManager palette_manager
UICheckbox autoPalette("Auto Cycle Palettes", true)
UICheckbox autoCycle("Auto Cycle Effects", true)
NoiseVariantManager variant_manager(palette_manager)
uint8_t getVariantIndex(const fl::string &name)
UISlider timescale("Time Scale", 1,.1, 10,.1)
UISlider timeBitshift("Time Bitshift", 5, 0, 16, 1)
UIDropdown variants("Noise Variants", variant_names)
UIDropdown palettes("Color Palettes", palette_names)
UISlider brightness("Brightness", 128, 0, 255, 1)
LIB8STATIC uint16_t random16()
Generate a 16-bit random number.
LIB8STATIC uint8_t random8()
Generate an 8-bit random number.
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
CRGB blend(const CRGB &p1, const CRGB &p2, fract8 amountOfP2)
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>
Representation of an RGB pixel (Red, Green, Blue)