pitrix/src/effect_firework.cpp

14 lines
331 B
C++

#include "effect_firework.h"
#include "my_fastled.h"
#include "functions.h"
#include "config.h"
void FireworkEffect::loop() {
blur(EFFECT_FIREWORK_BLUR);
fadeToBlackBy(leds, LED_COUNT, EFFECT_FIREWORK_FADEOUT_SPEED);
if (random8(EFFECT_FIREWORK_SHOT_CHANCE)==0) {
leds[random16(LED_COUNT)] = CHSV(random8(), 255, 255);
}
}