scene: ridge and terrain scenes follow the sky state #47
Loading…
Reference in a new issue
No description provided.
Delete branch "nibu/sky-consumer"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Consumer for the sky seam (#43): the scene now follows
getSkyState. Branched from deva1298662. Touches no title-bar control, theme wiring or auth styles.index.ts(the door): readsgetSkyState()at start, subscribes, and on a change disposes the scene and builds a new one on the same canvas; the returned scene'sdisposeunsubscribes. Alogin()already made is replayed on the rebuilt scene. A change that lands mid-build, or after dispose, is dropped by generation. The ray-march scene (Scene.ts, one fixed PALETTE dusk) ignores the state and is not rebuilt.skyForState.ts: state to the scene's own sky option.autoreturns nothing (ridgeskyColours(), terrain clock plus?sky=?sun=?az=), so auto is today's behaviour.duskis the ridge dusk (skyColours());day/nighttake top, middle and horizon stops from the baked noonday/midnight gradients thatskyBackdropbounds. Terrain:day=sky:'noonday',night=sky:'midnight',dusk= a sun at 2 degrees.skyForState.test.ts(10) andindex.test.ts(8): drawn colours lie insideskyBackdrop(state); auto passes no sky; subscribe on start, rebuild on change, dispose removes the subscription; login replay; stale and quick-succession changes. Mutations: deletingoff()fails 2, the generation guard 2, the login replay fails its test.Not rendered in a browser: nothing was drawn. Not seen: the rebuilt ridge or terrain on a real canvas (the tests mock the scene modules), the rebuild flash and restart of the pull-back on a state change, a WebGL scene rebuilt on its existing context, or whether the terrain dusk (sun at 2 degrees) looks like the ridge dusk. The terrain dusk is not inside
skyBackdrop('dusk')by construction (that bound is the ridge dusk), so its containment is untested.chooseSkyprecedence is unchanged: a?sun=in the URL beatsday/night. If the rebuild yields no scene the host'sdata-scenestays set (no callback for that).