Vulkan: Lava rot bis orange statt gelb/weiß, Gestein rötlich
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
bcb33c1dd1
commit
4ce8bfee64
2 files changed
+12
-6
No files matched your search
@@ -200,7 +200,7 @@ Nach dem Einschalten läuft das Gewitter.
|
||||
| 🌅 | Sonnenaufgang | `sonnenaufgang` | 40 s | Nacht mit Sternen, Morgenrot, Tag und Abendrot; die Sonne zieht ihre Bahn |
|
||||
| 🌷 | Blumenwiese | `blumenwiese` | 30 s | Wogendes Gras, Blumen auf Stängeln, ein Schmetterling flattert |
|
||||
| 🏞️ | Wasserfall | `wasserfall` | 25 s | Wasser stürzt an der Rückseite herab in ein Becken, Gischt spritzt |
|
||||
| 🌋 | Vulkan | `vulkan` | 30 s | Glühender Krater, Lavaströme an den Hängen, immer wieder Ausbrüche |
|
||||
| 🌋 | Vulkan | `vulkan` | 30 s | Rot-orange glühender Krater, Lavaströme an den Hängen, immer wieder Ausbrüche |
|
||||
| 🍂 | Herbstlaub | `herbstlaub` | 30 s | Bunte Blätter segeln im Wind herab und bleiben am Boden liegen |
|
||||
| 🌠 | Sternschnuppen | `sternschnuppen` | 30 s | Funkelnder Nachthimmel, ab und zu zieht eine Schnuppe vorbei |
|
||||
|
||||
|
||||
+11
-5
@@ -220,6 +220,12 @@ static bool isMountain(int x, int y, int z) {
|
||||
return (z == 0 && d <= 2.3f) || (z == 1 && d <= 1.5f && d > 0.5f) || (z == 2 && d <= 1.0f && d > 0.5f);
|
||||
}
|
||||
|
||||
// Lava: dunkelrot -> rot -> orange, nie gelb oder weiß
|
||||
static CRGB lava(uint8_t heat) {
|
||||
static const CRGBPalette16 LAVA(CRGB(60, 0, 0), CRGB(255, 0, 0), CRGB(255, 30, 0), CRGB(255, 80, 0));
|
||||
return ColorFromPalette(LAVA, scale8(heat, 240)); // 240: nicht zurück zum Anfang überblenden
|
||||
}
|
||||
|
||||
void renderVolcano(uint32_t now) {
|
||||
static uint32_t nextEruption = 0;
|
||||
static int8_t flowDir[2][2];
|
||||
@@ -234,21 +240,21 @@ void renderVolcano(uint32_t now) {
|
||||
uint32_t t = now - fxStart;
|
||||
FastLED.clear();
|
||||
FOR_XYZ {
|
||||
if (isMountain(x, y, z)) at(x, y, z) = CRGB(brightness / 5, brightness / 9, brightness / 12);
|
||||
if (isMountain(x, y, z)) at(x, y, z) = CRGB(brightness / 4, brightness / 14, 0); // dunkles, rötliches Gestein
|
||||
}
|
||||
// Krater und Schlot glühen
|
||||
at(2, 2, 1) = HeatColor(170 + scale8(sin8(t / 4), 60)).nscale8(highlight);
|
||||
at(2, 2, 2) = HeatColor(200 + random8(40)).nscale8(highlight);
|
||||
at(2, 2, 1) = lava(170 + scale8(sin8(t / 4), 60)).nscale8(highlight);
|
||||
at(2, 2, 2) = lava(200 + random8(40)).nscale8(highlight);
|
||||
// zwei Lavaströme fließen die Hänge hinab
|
||||
for (auto &d : flowDir)
|
||||
for (uint8_t k = 1; k <= 2; k++) {
|
||||
uint8_t pulse = sin8(k * 70 - t / 3);
|
||||
at(2 + d[0] * k, 2 + d[1] * k, 2 - k) = HeatColor(120 + pulse / 3).nscale8(scale8(highlight, 150 + pulse / 3));
|
||||
at(2 + d[0] * k, 2 + d[1] * k, 2 - k) = lava(120 + pulse / 3).nscale8(scale8(highlight, 150 + pulse / 3));
|
||||
}
|
||||
if (int32_t(now - nextEruption) >= 0) {
|
||||
nextEruption = now + random16(1500, 4000);
|
||||
for (uint8_t i = random8(12, 20); i > 0; i--)
|
||||
spawnParticle(MID, MID, 2.5f, rnd(-0.06f, 0.06f), rnd(-0.06f, 0.06f), rnd(0.12f, 0.2f), HeatColor(random8(160, 255)).nscale8(highlight));
|
||||
spawnParticle(MID, MID, 2.5f, rnd(-0.06f, 0.06f), rnd(-0.06f, 0.06f), rnd(0.12f, 0.2f), lava(random8(100, 255)).nscale8(highlight));
|
||||
}
|
||||
moveParticles(0.006f, 0.99f, 3);
|
||||
drawParticles();
|
||||
|
||||
Reference in new issue
Block a user