diff --git a/fx_natur.cpp b/fx_natur.cpp index 8aa4baa..e5b989a 100644 --- a/fx_natur.cpp +++ b/fx_natur.cpp @@ -88,11 +88,12 @@ void renderOcean(uint32_t now) { } } -// --- Glühwürmchen: grünlich-gelbe Lichter blinken langsam im Dunkeln ----------- +// --- Glühwürmchen: gelbe bis orange Lichter blinken langsam im Dunkeln -------- struct Firefly { float p[3], v[3]; uint32_t start; // Beginn des nächsten Leuchtens + uint8_t green; // Grünanteil: wenig = orange, viel = gelb }; static Firefly flies[10]; @@ -105,6 +106,7 @@ void renderFireflies(uint32_t now) { f.v[i] = 0; } f.start = now + random16(3000); + f.green = random8(60, 150); } } FastLED.clear(); @@ -121,7 +123,7 @@ void renderFireflies(uint32_t now) { if (t < 0) continue; float env = t < 400 ? t / 400.0f : t < 700 ? 1 : t < 1500 ? 1 - (t - 700) / 800.0f : 0; if (t >= 1500) f.start = now + random16(1000, 4000); - if (env > 0) plotSoft(f.p[0], f.p[1], f.p[2], CRGB(scale8(highlight, 150), highlight, 0).nscale8(uint8_t(env * 255))); + if (env > 0) plotSoft(f.p[0], f.p[1], f.p[2], CRGB(highlight, scale8(highlight, f.green), 0).nscale8(uint8_t(env * 255))); } }