Files
2026-05-27 23:29:53 +01:00

31 lines
2.3 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## Why
The existing `@suaveplan/day-night` package uses hardcoded sinusoidal sun arcs, 30-day moon cycles, and preset lighting tables. It is not physically derived, not extensible to other planets, and conflates game-clock concerns with rendering concerns. This change introduces two gaming-layer packages that consume the astronomical core from `@suaveplan/universe` to provide a configurable game clock and physically-derived environment lighting.
## What Changes
- **Retire `@suaveplan/day-night`** — replaced by `@suaveplan/gaming-universe` (game clock + events) and `@suaveplan/gaming-environment-lighting` (sky colour + gameplay modifiers).
- **Create `@suaveplan/gaming-universe`** — wraps `UniverseClient` with configurable N× game clock via `@suaveplan/timing`'s `AsyncScheduler`, emitting season/sunrise/eclipse events through `@suaveplan/events`.
- **Create `@suaveplan/gaming-environment-lighting`** — replaces hardcoded day-night presets with Rayleigh/Mie scattering sky colour, twilight star visibility thresholds, multi-satellite moonlight, and continuous gameplay modifiers derived from ambient light.
**BREAKING**: `@suaveplan/day-night` is retired — consumers must migrate to `@suaveplan/gaming-universe` + `@suaveplan/gaming-environment-lighting`.
## Capabilities
### New Capabilities
- `gaming-universe`: Game-clock astronomical wrapper — N× time scale, event emission, and scene queries at game time.
- `gaming-environment-lighting`: Physically-derived environment lighting — sky colour, star visibility, moonlight, and gameplay modifiers.
### Modified Capabilities
- `gaming-day-night`: **Retired** — all requirements absorbed by `gaming-universe` and `gaming-environment-lighting`. No spec delta; capability removed on archive.
## Impact
- **New packages**: 2 packages in `universal/gaming`.
- **Dependency graph**: `universe` → `gaming-universe` → `gaming-environment-lighting`.
- **Prerequisite**: `@suaveplan/universe` and its downstream providers (`solar-system`, `stars`, `tides`) must be implemented first.
- **Downstream consumers**: Any package depending on `@suaveplan/day-night` must migrate.
- **Deferred integrations**: R3F / Three.js rendering integration, multiplayer game time sync, `@suaveplan/weather` integration are explicitly out of scope.