Test clouds2 effect with simplified theme structure

This commit is contained in:
Richard Zink committed 2026-10-07 10:13:42 +02:00
1 parent efcdcb6765
commit 9ebbff08f1
1 file changed
+8 -24
+8 -24
View File
@@ -336,7 +336,7 @@
<div id="weather-forecast" class="weather-forecast"></div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@0.5.21/dist/vanta.clouds.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.clouds2.min.js"></script>
<script>
var effect = VANTA.CLOUDS({
el: "#vanta",
@@ -823,40 +823,28 @@ var weatherThemes = {
sunny: {
skyColor: 0x54514f,
cloudColor: 0xb0a89a,
cloudShadowColor: 0x6d6a63,
sunColor: 0xf3ede1,
sunGlareColor: 0xe0914f,
sunlightColor: 0xe6dfd1,
lightColor: 0xf3ede1,
backgroundColor: 0x54514f,
speed: 1.0
},
cloudy: {
skyColor: 0x6d6a63,
cloudColor: 0x999187,
cloudShadowColor: 0x54514f,
sunColor: 0xe6dfd1,
sunGlareColor: 0xb0a89a,
sunlightColor: 0xb0a89a,
lightColor: 0xe6dfd1,
backgroundColor: 0x3a383d,
speed: 1.2
},
stormy: {
skyColor: 0x29282c,
cloudColor: 0x3a383d,
cloudShadowColor: 0x1c1b1f,
sunColor: 0x999187,
sunGlareColor: 0x6d6a63,
sunlightColor: 0x6d6a63,
lightColor: 0x999187,
backgroundColor: 0x100f12,
speed: 2.5
},
night: {
skyColor: 0x100f12,
cloudColor: 0x29282c,
cloudShadowColor: 0x1c1b1f,
sunColor: 0xb0a89a,
sunGlareColor: 0x54514f,
sunlightColor: 0x6d6a63,
lightColor: 0xb0a89a,
backgroundColor: 0x100f12,
speed: 0.4
}
@@ -914,7 +902,7 @@ var weatherThemes = {
}
var result = {};
var keys = ['skyColor', 'cloudColor', 'cloudShadowColor', 'sunColor', 'sunGlareColor', 'sunlightColor', 'backgroundColor'];
var keys = ['skyColor', 'cloudColor', 'lightColor', 'backgroundColor'];
for (var i = 0; i < keys.length; i++) {
var k = keys[i];
if (prevThemeColors && smoothT < 1) {
@@ -938,12 +926,8 @@ var weatherThemes = {
return {
sky: mixColor(c.sky, themeColors.skyColor, mix),
cloud: mixColor(c.cloud, themeColors.cloudColor, mix),
cloudShadow: mixColor(c.cloudShadow, themeColors.cloudShadowColor, mix),
sun: mixColor(c.sun, themeColors.sunColor, mix * 0.5),
sunGlare: mixColor(c.sunGlare, themeColors.sunGlareColor, mix * 0.5),
sunLight: mixColor(c.sunLight, themeColors.sunlightColor, mix * 0.5),
bg: mixColor(c.bg, themeColors.backgroundColor, mix),
sunVis: c.sunVis
light: mixColor(c.sun, themeColors.lightColor, mix * 0.5),
bg: mixColor(c.bg, themeColors.backgroundColor, mix)
};
}