scene: ridge and terrain scenes follow the sky state #47

Merged
void merged 4 commits from nibu/sky-consumer into dev 2026-11-09 22:35:18 +00:00 AGit

2026-11-09

Nibu
scene: catch a state change during the first build; skyBackdrop is the union of what the scenes draw
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
index.ts compares the current state with the built one after subscribing and
rebuilds if they differ. skyBackdrop unions the ridge sky and the terrain sky
(skyColour sampled over the sphere, from chooseSky(terrainSkyFor(state))), so
terrain dusk's sun glow and terrain day's darker zenith are inside the range.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:31:00 +00:00
Nibu
scene: a failed sky-state rebuild restores the ground; an explicit sky beats the URL
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The door tells the host (onInactive/onActive) when a rebuild makes no scene or
makes one again. chooseSky takes an explicit sun or sky option before ?sun=,
?az= and ?sky=; only auto, which passes none, is steered by the URL.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:23:47 +00:00
Nibu
scene: the ridge and terrain scenes follow the sky state
Some checks failed
Build pull request / Build pull request (pull_request) Has been cancelled
The door (index.ts) reads getSkyState, subscribes on start and rebuilds the
scene on the same canvas when it changes; the returned scene's dispose
unsubscribes. skyForState.ts maps a state to the scene's sky option: auto
leaves it unset (today's behaviour), dusk is the ridge dusk, day and night
are the baked gradients skyBackdrop bounds.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-09 22:20:49 +00:00