2019-06-05 04:27:55 +00:00
|
|
|
#include "effect_firework.h"
|
|
|
|
#include "my_fastled.h"
|
|
|
|
#include "functions.h"
|
|
|
|
#include "config.h"
|
|
|
|
|
|
|
|
void FireworkEffect::loop() {
|
2019-06-06 04:44:52 +00:00
|
|
|
blur(EFFECT_FIREWORK_BLUR);
|
|
|
|
fadeToBlackBy(leds, LED_COUNT, EFFECT_FIREWORK_FADEOUT_SPEED);
|
2019-06-07 04:24:16 +00:00
|
|
|
|
2019-06-05 04:27:55 +00:00
|
|
|
if (random8(EFFECT_FIREWORK_SHOT_CHANCE)==0) {
|
|
|
|
leds[random16(LED_COUNT)] = CHSV(random8(), 255, 255);
|
|
|
|
}
|
|
|
|
}
|