ReadonlyenabledWhether the geo-sun system is currently driving the scene (see Atmosphere.setEnabled).
ReadonlyisWhether a time-lapse animation is currently running.
ReadonlyshadowsWhether cast shadows are on (see Atmosphere.setShadows). Readable so a control can show
the truth instead of guessing: enabled was already readable and shadows was not,
which is why SunControlWidget seeded its switch to a hardcoded false and contradicted a scene
that was casting.
ReadonlystateThe current SunState (last computed for the current date + location).
ReadonlysystemThe underlying GeoSunSystem fanning the sun out to its controllers.
Wire an additional SunLightable layer into the sun system (relit immediately if enabled).
Start a real-time day time-lapse; see AnimateOptions. No-op where
requestAnimationFrame is unavailable (e.g. SSR).
Optionalopts: AnimateOptionsDetach all controllers and listeners, stop any animation, and restore the map's original light/sky. Call when tearing the scene down.
Remove a previously wired layer (it keeps its last lighting; it is no longer updated).
Master on/off. When disabled, the map's light/sky are restored and the layers revert to their baseline look; the selected date + shadow preference are preserved and re-applied on re-enable.
Change the running animation's speed (simulated seconds per real second).
Toggle real cast shadows on the wired layers (Phase 2). The preference persists across enable/disable and date changes.
Toggle the MapLibre visual sync (setLight / setSky). When turned off (while enabled), the
map's pre-atmosphere light/sky are restored; the 3D layers stay sun-lit.
Stop the animation, holding the current instant.
The handle returned by setTimeOfDay. Mutate the scene's sun through it (date, location, enable, animation) and subscribe to changes for a custom widget. Call Atmosphere.dispose to detach everything and restore the map's original light/sky.
Example