Release · v2.28.0
Location-aware live weather background + location…
feat(v3): location-aware live weather background + location picker
Details
Make the ambient background reflect the real current weather at the visitor's location (default New York City) instead of a date-derived season, and add a dropdown to change the location. - weather-service.ts: resolve + persist the active location, fetch the current conditions from Open-Meteo (keyless, CORS), map WMO codes to a scene kind + intensity, derive day/night from the location's own local time, geocode city searches, and fall back to a season-derived scene when offline. Publishes a `wxdata` event. - seasonal-background.ts: weather-driven scene selection (clear day, clear night, clouds, fog, drizzle, rain, thunder, snow, sleet) with drifting clouds, twinkling stars, a moon, lightning and a night wash. Keeps the physics engine and the legacy season fallback (v2/offline). - snow-gl.ts: GPU snow now activates on snow/sleet (lazy WebGL init), with a season fallback when the weather service is absent (v2). - weather-location-picker.ts + v3 markup/SCSS: a glass popover with live conditions, a city search and preset chips; choosing a city switches the weather and enables the visual. Weather stays off by default; ?weather= / ?season= still preview scenes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Mn7fa3Z4bpbSAj4edBnjXA
Files changed (9)
| frontend/client/ts/components/weather-location-picker.ts | +286 | −0 |
| frontend/client/ts/effects/seasonal-background.ts | +623 | −76 |
| frontend/client/ts/effects/snow-gl.ts | +57 | −7 |
| frontend/client/ts/effects/weather-service.ts | +466 | −0 |
| frontend/jekyll/_layouts/v3.html | +8 | −0 |
| frontend/jekyll/_sass/v3.scss | +2 | −1 |
| frontend/jekyll/_sass/v3/_responsive.scss | +3 | −0 |
| frontend/jekyll/_sass/v3/_toggles.scss | +6 | −2 |
| frontend/jekyll/_sass/v3/_weather-location.scss | +214 | −0 |