Amount of new Pixels per loop for confetti effect is now configurable. Also, the color is based on a slowly rotating baseHue.
This commit is contained in:
@ -1,10 +1,13 @@
|
||||
#include "effect_confetti.h"
|
||||
#include "config.h"
|
||||
#include "functions.h"
|
||||
#include "prototypes.h"
|
||||
|
||||
void ConfettiEffect::loop() {
|
||||
fadeToBlackBy(leds, LED_COUNT, 1);
|
||||
addPixelColor(random16(LED_COUNT), CHSV(random8(), 200, 255));
|
||||
for (int i=0; i<EFFECT_CONFETTI_PIXELS_PER_LOOP; i++) {
|
||||
addPixelColor(random16(LED_COUNT), CHSV(baseHue + random8(64), 200, 255));
|
||||
}
|
||||
}
|
||||
|
||||
boolean ConfettiEffect::can_be_shown_with_clock() { return true; };
|
||||
|
Reference in New Issue
Block a user