Browse Source

garland: tune anim comets

pull/2600/head
Dmitry Blinov 5 months ago
parent
commit
e5c92a1e06
1 changed files with 4 additions and 4 deletions
  1. +4
    -4
      code/espurna/garland/animations/anim_comets.h

+ 4
- 4
code/espurna/garland/animations/anim_comets.h View File

@ -18,7 +18,7 @@ class AnimComets : public Anim {
c = {palette, numLeds};
}
} else {
for (auto i = 0; i < 4; ++i) {
for (auto i = 0; i < 5; ++i) {
comets.emplace_back(palette, numLeds);
}
}
@ -47,12 +47,12 @@ class AnimComets : public Anim {
private:
struct Comet {
int dir = randDir();
int len = secureRandom(10, 20);
float speed = ((float)secureRandom(4, 10)) / 10;
int len = secureRandom(10, 30);
float speed = ((float)secureRandom(4, 20)) / 10;
float head;
Color color;
std::unique_ptr<Color[]> points;
Comet(Palette* pal, uint16_t numLeds) : head(dir ? secureRandom(0, numLeds / 2) : secureRandom(numLeds / 2, numLeds)), color(pal->getRndInterpColor()) {
Comet(Palette* pal, uint16_t numLeds) : head(dir > 0 ? secureRandom(0, numLeds / 2) : secureRandom(numLeds / 2, numLeds)), color(pal->getRndInterpColor()) {
// DEBUG_MSG_P(PSTR("[GARLAND] Comet created head = %d len = %d speed = %g cr = %d cg = %d cb = %d\n"), head, len, speed, color.r, color.g, color.b);
points.reset(new Color[len]);


Loading…
Cancel
Save