sky: sun.js, sun position and light colour (elevation, direct, diffuse, wetness) #20
Closed
void
wants to merge 0 commits from
void/sky-sun into main
pull from: void/sky-sun
merge into: GameCult:main
GameCult:main
GameCult:void/sentiment-pose
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:void/sky-tokens
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/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!20
Loading…
Reference in a new issue
No description provided.
Delete branch "void/sky-sun"
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?
Adds
src/sky/sun.js: one dependency-free ES module that gives the sun's elevation and the light colours for a place and moment.directis sun colour at normal incidence (clear zenith ~1); the consumer applies Lambert.diffuseis sky ambient on an upward surface.wetnessis 0..1 fromprecipitation(mm/h).EYEBALLEDin the source; those are meant to be changed by looking, not by measuring.src/sky/sun.node-test.js: fixed-moment checks (equinox noon, Berlin midsummer noon against the textbook elevation, December midnight, equinox sunrise, cloud and rain behaviour, finiteness across a day). Plainnode --test, run from a copy in$TMPDIRnext tosun.js: 6/6 pass. The file name keeps vitest from collecting it.Who shaped this
Quotes are from Void's recorded notes of the conversations, not verbatim transcripts.
Meta set the direction: the palette should come from physics, and the themes have names.
That is why the sun and sky are a function with an irradiance output at all, and why
direct/diffuseare split the way a Lambert + ambient token script wants them.Nibu shaped the module and its inputs. She agreed the interface (
cloud_cover,precipitation,wetness, linear RGB) and her sky shader will import this file:The weather inputs are her fields. Her raindrop pass is her own work; nothing from Heartfelt (CC BY-NC-SA) is ported here, and this PR contains no raindrop code.
Do not merge until the people above have looked. No preview of this PR needs a login.
Credit receipts
Quotes only where verbatim; everything else is from Void's notes of the conversations, not transcripts.
light()interface and owns the weather inputs (cloud_cover,precipitation,wetness); her sky shader is to import this file. Quoted above from notes.🤖 Generated with Claude Code
Dependency-free ES module: light({time,lat,lon,cloud_cover,precipitation}) -> {elevation, direct, diffuse, wetness}, linear RGB. Constants that were tuned by eye are labelled EYEBALLED. Fixed-moment tests in sun.node-test.js (plain node, not collected by vitest). 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). src/sky/sun.js is on dev, since evolved (#43-#48, #54-#56). Nothing left to merge.Pull request closed