sky: Midnight Sky and Noonday Sky baked from sun.js; bubbles and buttons as albedo x irradiance (do not merge) #22
Closed
void
wants to merge 3 commits from
void/sky-tokens into void/sky-sun
pull from: void/sky-tokens
merge into: GameCult:void/sky-sun
GameCult:main
GameCult:dev
GameCult:void/registration-https-only
GameCult:void/register-entry
GameCult:void/default-homeserver-gamecult
GameCult:void/albums-slice-1-r2
GameCult:nibu/scene-throw-compile-fail
GameCult:void/desk-order-count
GameCult:void/desk-fork-contract
GameCult:void/reply-preview-bound
GameCult:void/reply-preview-bounds
GameCult:nibu/ridge-heightfield
GameCult:void/desk-slice-1
GameCult:void/phone-contrast-taps
GameCult:void/demo-homeserver-unreachable
GameCult:void/publish-dev-preview
GameCult:void/mind-feedback-pages-spec
GameCult:void/scene-css-function-export
GameCult:void/dings-v4
GameCult:void/scene-ink
GameCult:void/newcomer-signin-errors
GameCult:void/dings-v3
GameCult:void/pose-in-bubble
GameCult:release/dev-64edacac
GameCult:void/browse-collapse
GameCult:void/albums-slice-1
GameCult:nemesis/demo
GameCult:void/nemesis-demo-tests
GameCult:nibu/terrain-hatching
GameCult:void/navigator-s8-lows
GameCult:void/footer-lows-3
GameCult:void/footer-lows-2
GameCult:void/footer-lows
GameCult:void/auth-footer-tint
GameCult:nibu/dusk-sky-floor
GameCult:void/scene-midbuild-msg
GameCult:void/scene-midbuild-sweep
GameCult:void/scene-midbuild-test
GameCult:void/scene-test-strength
GameCult:void/sky-link-readability
GameCult:void/training-notice-comment
GameCult:void/ci-no-artifact-upload
GameCult:nibu/scene-terrain-scatter-dev
GameCult:void/room-list-plain-rows
GameCult:void/room-menu-name-chip-fix
GameCult:void/ci-runner-label
GameCult:void/text-flow-footer
GameCult:void/settings-without-window
GameCult:void/dings-hook
GameCult:void/upload-error-diagnostics
GameCult:void/file-zone-design
GameCult:void/rat-dev-cleanups
GameCult:nibu/scene-terrain-scatter
GameCult:void/text-flow-leftovers
GameCult:nibu/scene-terrain-both
GameCult:nibu/scene-terrain-stars
GameCult:nibu/scene-terrain-albedo
GameCult:void/terrain-demo
GameCult:nibu/scene-terrain-atmosphere
GameCult:void/ridge-scene-and-bubbles
GameCult:void/poses-readme
GameCult:void/preview-demo
GameCult:void/rat-dev-workflow
GameCult:void/preview-all
GameCult:nibu/scene-host
GameCult:nibu/terrain-tier-spike
GameCult:void/ci-drop-cinny-leftovers
GameCult:void/login-training-notice
GameCult:nibu/ridge-mesh-haze
GameCult:nibu/ridge-scene
GameCult:void/sky-sun
GameCult:void/ratatoskr-sky-palette
GameCult:void/brand-ratatoskr
GameCult:void/three-doors-look
GameCult:nibu/voxel-scene
GameCult:ratatoskr/estate-navigator
GameCult:void/composer-spellcheck
GameCult:nibu/scene-trace-prepass
GameCult:void/brand
GameCult:void/pose-catalogue
GameCult:void/resume-sync
GameCult:void/soundscape-human-subset
GameCult:void/soundscape-audio-socket
GameCult:void/pose-bubble
GameCult:hands/estate-h8
GameCult:ratatoskr/file-zone-map
GameCult:hands/estate-h7
GameCult:ratatoskr/research-atmosphere
GameCult:void/gamecult-theme-and-project-nav
GameCult:replace-matrix-js-sdk
GameCult:dependabot/docker/nginx-1.31.8-alpine
GameCult:kfiven-patch-3
GameCult:release-v4.12.8
GameCult:renovate/npm-sanitize-html-vulnerability
GameCult:dependabot/github_actions/actions/upload-artifact-7.0.2
GameCult:kfiven-patch-2
GameCult:dependabot/github_actions/dawidd6/action-download-artifact-27
GameCult:dependabot/github_actions/docker/setup-buildx-action-4.4.1
GameCult:dependabot/github_actions/docker/setup-qemu-action-4.4.0
GameCult:dependabot/github_actions/docker/build-push-action-7.4.0
GameCult:kfiven-patch-1
GameCult:release-v4.12.6
GameCult:release-v4.12.3
GameCult:release-v4.12.2
GameCult:more-theme
GameCult:fix-257
GameCult:imporve-thread-reply
GameCult:revert-2402-improve-menu-congestion
GameCult:mxidColor-toggle
GameCult:update-sw-main-msg
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set
Reference
GameCult/Ratatoskr!22
Loading…
Reference in a new issue
No description provided.
Delete branch "void/sky-tokens"
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?
Stacked on #20 (
void/sky-sun, head7c89bd02); do not merge. Supersedes #18's Dawn/Day/Dusk themes with the two names Meta ruled: Midnight Sky (dark) and Noonday Sky (light). No terrain anywhere in this PR.What it does
scripts/bake-sky.mjs(npm run bake:sky) lights a fixed moment withsun.js(equinox, 45N on the prime meridian; clear weather because a bake has no feed) and writessrc/sky/baked.ts: a 7-stop vertical sky gradient per theme.src/sky.css.tspaints it as the fixed body background (body.midnight-sky,body.noonday-sky). Sun elevation at the two moments: -44.6 and +45.2 degrees.src/sky/skyTokens.jsholds the albedos (bark, pale bark, leaf, new leaf, soil, clay, ochre, eight pigments for names) and multiplies each by the irradiance coloursun.jsreturns (diffuse + direct * sin(elevation), rescaled to a per-role brightness key, since the eye adapts to the scene and only the light's colour survives). Output: folds tokens for Background/Surface/SurfaceVariant and Primary/Secondary/Success/Warning/Critical (leaf for Primary, bark for Secondary), link colour,--mx-uc-1..8, and bubble vars--sky-bubble,--sky-bubble-ownand their text colours. Keys, albedos and the horizon mix are tuned by eye and marked EYEBALLED.colors.css.tsreplaces the navygamecultThemewithmidnightSkyTheme/noondaySkyThemebuilt from the bake;index.csskeeps only the GameCult type rules; defaultthemeIdismidnight-sky.Contrast (WCAG AA, 4.5:1) —
src/sky/skyTokens.test.tsComputed from the baked hex values with the WCAG relative-luminance formula.
--mx-uc-*), lowest over panels and bubblesMechanism, so the numbers are not luck: button, link and name colours are pushed brighter (dark) or darker (light) until they clear 4.5 on every ground they can sit on, and the test fails if any pair drops below 4.5 or if
baked.tsdiffers from a fresh bake. It caught one real miss while writing (Noonday link on Background was 4.45). Contrast is checked on the solid token colours; nothing is translucent here.Verified / not
vitest runin a TMPDIR copy: 157 pass (13 files, includes 12 new).vite buildok (CINNY_BASE=/void/sky-tokens/). eslint clean on the new and edited files except oneno-explicit-anywarning in the test;sun.jsitself (from #20) has eslint style errors (Math.pow, nested ternary,cloud_covercamelCase) that I left alone. Nothing has been seen rendered (no browser here): the gradient, panel depth and the Midnight Critical button (clay under blue light reads violet) want a Redmi/desktop look. Existing users withthemeId: gamecult-themefall back to Midnight Sky. The opt-in WebGL scene palette still has its own navy sky. Not merged, no deploy; no preview needs a login.Note for the stewards: the workspace-level
/var/lib/mind-void-self/package.jsonis a 0-byte file, which makesvitestfail from inside this checkout (Unexpected end of file in JSON); tests were run from a copy.Who shaped this
From Void's recorded notes, not verbatim transcripts, except the two quoted lines (already quoted in #20):
sun.jsand its weather-shaped inputs, which this PR consumes unchanged.🤖 Generated with Claude Code
scatter.js ray-marches a single-scattering Rayleigh+Mie atmosphere whose vertical optical depth is sun.js's TAU, and bakes two tables into baked.scatter: transmittance to space by view elevation (32x1) and sky radiance by azimuth from the sun x view elevation x sun elevation (7x32x12), RGB half floats, little-endian base64, value x 64. Layout, exact decode and a GLSL sampler are in src/sky/README.md. Tests pin layout, encoding, checksums and physical anchors (zenith transmittance equals exp(-TAU); blue noon, red low sun toward the sun, black below the planet-shadow limit). The per-sky sun {elevation_deg, azimuth_deg, color_linear}, ambient_linear and horizon_hex were already baked in7216456a; sun.js now exports TAU. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>Closing: landed in dev's history (head is an ancestor of dev
64edacac, brought in through the preview-all merges) (f1d8db0c). skyTokens.js, baked.ts and scatter.js are on dev and have moved on (#54, #55, #56). Nothing left to merge.Pull request closed