Rendering
Environment
12 symbols, imported from @driftengine/core.
Explained in Sky and atmosphere.
Interfaces
CelestialSite- Where in the world, and when in the year, the sky is being sampled.
CelestialStateDaylightKey- The lighting at one point of the palette's scalar. Every colour is linear and may exceed one.
DaylightPalette- Keys in ascending order of
at, validated once. Build withcreateDaylightPalette. DaylightState- One moment of the palette, written in place by
resolveDaylight.
Functions
celestialStateAt- Convert a timestamp and an authored azimuth into sky state.
createCelestialStatecreateDaylightPalette- Sort and check the keys. Throws at construction, so a bad palette never reaches a frame.
createDaylightStateeaseExposurecurrentmoved towardtargetoverdtSec, closing half the distance in stops everyhalfLifeSec.moonIllumination- Visible fraction: new at 0/1, quarters at 0.25/0.75, full at 0.5.
resolveDaylight- The palette at
at, intoout. Past either end the nearest key holds.