Whether the sky and its matching distance haze are drawn.
Current overcast factor, 0 (clear) – 1 (solid grey).
The color the world dissolves into: the horizon band after biome tinting and overcast. Reused between calls — copy anything you keep.
Add the dome to a scene (or any Object3D). Returns this for chaining.
Show or hide the whole sky system — dome mesh and surface haze together.
Set the gradient directly — the standalone path for scenes without a day/night cycle. Unset fields keep their current value.
Re-point the biome haze tint the horizon band leans toward (null clears it) — call after swapping the terrain palette, since a new palette means a new average. See averageTerrainColor.
Point the sun/moon glow. dirTowardLight points from the scene toward the
luminary; the glow fades out as it sinks below the horizon.
Optionalcolor: ColorAdopt one moment of a DayNightCycle: gradient colors, the active
luminary's direction and color, and the star fade. Named as the cycle's
sky target this is called for you every frame.
How overcast the sky reads, 0–1 — a WeatherSystem's overcast.
Flattens the gradient toward grey, dims the horizon haze to match, and
puts out the sun disc and the stars, so rain and snow stop happening under
a clear blue sky.
Restyle the distance haze (near/far/density). false switches it off.
Re-push the haze onto the current material list — call after swapping terrain or liquid materials (HexWorld does this for you).
Ride the camera and advance the twinkle. dt may be omitted for a static
star field. Call once per frame, before rendering.
Detach the dome, free its geometry/material, and switch the surface haze back off.
Gradient sky dome that closes the world: a zenith→horizon→ground ramp with a sun/moon glow and a night star field, plus the matching distance haze on the ground materials so the map edge dissolves into the same color the sky shows at the horizon.
It is a sink, not a clock — feed it a DayNightState (directly, or by naming it as a DayNightCycle target) for time of day, and an overcast factor from a WeatherSystem for rain and snow, which flattens the gradient toward grey and puts out the sun and stars.
The mesh rides the camera and never writes or tests depth, so its radius only has to stay inside the far plane — SkyDome.update rescales it to match whatever camera it is handed.
Example