◇
component · drop-in viewer
sky
The sky is the clock. Attached to the scene's `sky` entity beside its ProceduralSky, this component drives the whole sky from `Rules.state.clock` every frame:
by·posted 1mo ago
What it does
firstlight.sky
The sky is the clock. Attached to the scene's sky entity beside its
ProceduralSky, this component drives the whole sky from
Rules.state.clock every frame:
- The sun. South at noon, north at midnight, below the horizon every day
but the last. The
sunlight always points away from it, so the ProceduralSky draws the disc, its glow and the moon in the right place; its light arrives only as the disc reaches the horizon on day 30. - The moon. A
distantlight opposite the sun, the blue light on the snow at full night. It fades as the twilight opens. - The ambient light rises from the night blue to a paler violet-blue with the twilight.
- The stars fade as the twilight opens.
- The twilight band over the southern horizon: a dome round the station
wearing
firstlight.sky.twilight, fed the sun's direction andRules.state.clock.twilight. Deep blue and a few degrees tall on day 1, violet then rose at its foot and a third of the sky tall by day 30. - The aurora over the sea ice to the north: five arched curtain sheets
wearing
firstlight.sky.aurora(the installed Carrington curtain shader under this sky's palette). Their strength isRules.state.weather.aurora, each sheet breathing on its own slow clock through its first instance-data lane, and they drown as the twilight opens.
Everything it hangs under the sky entity is temporary: it is spawned on
awake and never saved with the scene.
Fields
| Field | Default | Meaning |
|---|---|---|
auroraOverride | -1 | Aurora strength to use instead of the blackboard's; -1 follows Rules.state.weather.aurora. |
twilightGain | 1.0 | Gain on the twilight band. |
moonlight | 0.32 | The moon's light on the snow at full night. |
sunlight | 1.4 | The sun's light at noon on day 30. |
Seeing a moment
From execute, in play:
local Rules = require("firstlight.rules")
Rules.restore((day - 1) * Rules.DAY_SECONDS + t * Rules.DAY_SECONDS)
then capture looking south (+Z) for the twilight and north (-Z) for the
aurora. Rules.restore is the call that moves the clock backward as well as
forward.
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.