feat: initialize sunrise with 100-player shared rooms
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
# Open-Meteo weather integration
|
||||
|
||||
Goal: Synchronize cloud cover and visibility to the selected instant, and smoothly attenuate sunlight in cloudy or hazy conditions.
|
||||
|
||||
Design: Extend the existing TypeScript/Three.js app without dependencies or a backend. Fetch two UTC days of hourly data and interpolate by Unix timestamp (the UI remains in Asia/Seoul). Use forecasts near today, historical forecasts from 2022, and cloud-only reanalysis from 1940. Display missing data explicitly; do not substitute today's weather for another date. Cache requests, bound memory, ignore obsolete responses, and clean up requests on disposal. Weather remains representative of the site's fixed coordinates, not every walking step.
|
||||
|
||||
Rendering: Reuse Sky cloud uniforms, terrain fog and the separate sun shader. Apply an explicitly approximate cloud/haze transmission to disc, halo and directional light. Smooth transitions over frames without changing solar geometry. This is weather-conditioned visualization, not directional cloud reconstruction.
|
||||
|
||||
## Tasks
|
||||
- [x] Add tests for date routing, UTC/KST selection, interpolation/missing data, cache/races, and attenuation.
|
||||
- [x] Add feature constants and a small weather data/controller module.
|
||||
- [x] Connect weather to the sky/sun/fog and add status/attribution in the location panel (avoids overlap with the bottom controls).
|
||||
- [x] Run focused tests, all tests, build, and browser checks where available. Document API/network limitations.
|
||||
|
||||
No Git metadata is present in this workspace; implementation remains in the current directory. The user's follow-up authorizes the Open-Meteo approach described in the preceding investigation.
|
||||
|
||||
Verification: seven focused weather tests and all 57 current tests pass; production build passes with the existing bundle-size warning. The localhost HTTP test needed network permission. Live requests to all three API endpoints returned HTTP 200 with CORS `*`. Browser verified live values, October 29 hourly scrubbing (100% cloud), 2000 reanalysis with missing visibility, and 2099 unavailable fallback. A review found missing CUSTOM-mode retries; reproduced with a failing test and fixed with a disposable expiry timer. Browser QA found native fetch receiver binding; reproduced, fixed and tested. Concurrent workspace changes to walking/vegetation were preserved.
|
||||
Reference in New Issue
Block a user