Colored sky background with day cycle

This commit is contained in:
Richard Zink committed 2026-10-07 07:22:13 +02:00
1 parent 9bc1ce6230
commit 4f90dc5253
1 file changed
+14 -14
+14 -14
View File
@@ -40,9 +40,9 @@
speed: 0.4,
backgroundColor: 0x0,
backgroundAlpha: 0,
skyColor: 0x141316,
cloudColor: 0x2a2822,
lightColor: 0x54514f,
skyColor: 0x3a4458,
cloudColor: 0x6d6a63,
lightColor: 0xb0a89a,
texturePath: "./noise.png"
}) || { setOptions: function() {} };
@@ -66,17 +66,17 @@
var CYCLE = 20000;
var palette = [
{ t: 0.00, sky: 0x100f12, cloud: 0x2a2822, light: 0x2a2822, bg: 0x100f12 },
{ t: 0.08, sky: 0x141316, cloud: 0x2a2822, light: 0x3a383d, bg: 0x141316 },
{ t: 0.18, sky: 0x1f1814, cloud: 0x3a2e22, light: 0x6b4423, bg: 0x1f1814 },
{ t: 0.28, sky: 0x2a1f17, cloud: 0x4a2e18, light: 0x8a5b34, bg: 0x2a1f17 },
{ t: 0.40, sky: 0x3a2e22, cloud: 0x54514f, light: 0xa68a6a, bg: 0x3a2e22 },
{ t: 0.50, sky: 0x403d39, cloud: 0x6d6a63, light: 0xb0a89a, bg: 0x403d39 },
{ t: 0.60, sky: 0x3a2e22, cloud: 0x5a4a3a, light: 0x8a5b34, bg: 0x3a2e22 },
{ t: 0.70, sky: 0x2a1f17, cloud: 0x4a2e18, light: 0x6b4423, bg: 0x2a1f17 },
{ t: 0.82, sky: 0x1f1814, cloud: 0x3a2e22, light: 0x54514b, bg: 0x1f1814 },
{ t: 0.92, sky: 0x141316, cloud: 0x2a2822, light: 0x3a383d, bg: 0x141316 },
{ t: 1.00, sky: 0x100f12, cloud: 0x2a2822, light: 0x2a2822, bg: 0x100f12 }
{ t: 0.00, sky: 0x0a0a14, cloud: 0x2a2822, light: 0x2a2822, bg: 0x0a0a14 },
{ t: 0.08, sky: 0x141428, cloud: 0x2a2822, light: 0x4a383d, bg: 0x1a1428 },
{ t: 0.18, sky: 0x3a2a28, cloud: 0x4a2e1c, light: 0xa85f1d, bg: 0x4a2820 },
{ t: 0.28, sky: 0x6a4030, cloud: 0x5a3a28, light: 0xd6824a, bg: 0x7a4530 },
{ t: 0.40, sky: 0x4a5060, cloud: 0x6d6a63, light: 0xe0d4be, bg: 0x506080 },
{ t: 0.50, sky: 0x3a4458, cloud: 0x6d6a63, light: 0xe6dfd1, bg: 0x445878 },
{ t: 0.60, sky: 0x4a5060, cloud: 0x5a5a55, light: 0xd6b46a, bg: 0x506070 },
{ t: 0.70, sky: 0x5a4030, cloud: 0x4a3a28, light: 0xe0914f, bg: 0x6a4530 },
{ t: 0.82, sky: 0x3a2030, cloud: 0x3a2a2a, light: 0xa85f1d, bg: 0x4a2030 },
{ t: 0.92, sky: 0x1a1428, cloud: 0x2a2822, light: 0x4a383d, bg: 0x1a1428 },
{ t: 1.00, sky: 0x0a0a14, cloud: 0x2a2822, light: 0x2a2822, bg: 0x0a0a14 }
];
function getColor(t) {