weather: add synthetic rain and snow simulation states
This commit is contained in:
1 parent
2ad5d9f8f9
commit
65e31a5302
3 files changed
+131
-13
No files matched your search
@@ -101,9 +101,22 @@ window.CONFIG = {
|
||||
// false = live Open-Meteo conditions (also used for the theme choice).
|
||||
// true = cycle sunny -> cloudy -> stormy -> night, useful to compare
|
||||
// all weather looks without waiting on the API.
|
||||
weatherSim: true, // test mode: cycles sunny/cloudy/stormy/night
|
||||
weatherSim: true, // test mode: cycles configured weather states
|
||||
weatherSimInterval: 15000, // ms per weather step when weatherSim is true
|
||||
// weatherSim: false, weatherSimInterval: 30000
|
||||
// Synthetic weather states used by weatherSim. Each state sets theme,
|
||||
// Open-Meteo-like weather_code, temperature, humidity, precipitation and wind.
|
||||
weatherSimStates: ['sunny', 'cloudy', 'rain', 'snow', 'stormy', 'night'],
|
||||
weatherSimProfile: {
|
||||
sunny: { code: 0, tempC: 18, humidity: 45, precipMm: 0.0, snowMm: 0.0, windKmh: 8, windDirDeg: 240 },
|
||||
cloudy: { code: 3, tempC: 14, humidity: 70, precipMm: 0.0, snowMm: 0.0, windKmh: 14, windDirDeg: 260 },
|
||||
rain: { code: 61, tempC: 10, humidity: 92, precipMm: 1.2, snowMm: 0.0, windKmh: 22, windDirDeg: 270 },
|
||||
snow: { code: 73, tempC: -2, humidity: 85, precipMm: 0.4, snowMm: 0.8, windKmh: 12, windDirDeg: 300 },
|
||||
stormy: { code: 95, tempC: 16, humidity: 88, precipMm: 2.5, snowMm: 0.0, windKmh: 35, windDirDeg: 250 },
|
||||
night: { code: 0, tempC: 8, humidity: 65, precipMm: 0.0, snowMm: 0.0, windKmh: 6, windDirDeg: 220 }
|
||||
// weatherSimStates: ['sunny', 'rain', 'stormy']
|
||||
// weatherSimProfile: { rain: { code: 80, tempC: 9, precipMm: 2.0, windKmh: 28 } }
|
||||
},
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Weather data
|
||||
@@ -183,7 +196,7 @@ window.CONFIG = {
|
||||
// only ever reports sunny/cloudy/stormy, so the deck keeps that
|
||||
// coverage through the night as well - 'night' is used by the weather
|
||||
// simulation (weatherSim: true) alone.
|
||||
density: { sunny: 0.25, cloudy: 0.50, stormy: 0.80 },
|
||||
density: { sunny: 0.25, cloudy: 0.50, rain: 0.75, snow: 0.65, stormy: 0.80 },
|
||||
// 'night' intentionally has no own density: it follows the last
|
||||
// non-night weather density (sunny/cloudy/stormy).
|
||||
// Cloud motion from Open-Meteo wind. Open-Meteo reports wind FROM
|
||||
@@ -197,7 +210,7 @@ window.CONFIG = {
|
||||
// wind: { speedScale: 0 } // static clouds
|
||||
// wind: { speedScale: 140, maxSpeed: 0.12 } // very visible motion
|
||||
}
|
||||
// density: { sunny: 0.05, cloudy: 0.9, stormy: 1.0 }
|
||||
// density: { sunny: 0.05, cloudy: 0.9, rain: 0.95, snow: 0.85, stormy: 1.0 }
|
||||
},
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
@@ -538,7 +551,7 @@ window.CONFIG = {
|
||||
// time, 1440 = one simulated day per minute. Clock hands, digital readout,
|
||||
// weather and sky all use the same clock. Hash overrides: #at=... #speed=...
|
||||
day: {
|
||||
startAt: '2026-10-12T18:30', // test clock: evening, then accelerated
|
||||
startAt: '2026-01-15T18:30', // test clock: winter evening, then accelerated
|
||||
speed: 1440 // one simulated day per minute
|
||||
// startAt: null, speed: 1 // real time
|
||||
},
|
||||
|
||||
Reference in new issue
Block a user