Computed sun state at a moment in time at a particular site.

interface SunPosition {
    aboveHorizon: boolean;
    altitude: number;
    azimuth: number;
}

Properties

aboveHorizon: boolean

true when altitude > 0 — useful for shaders / scheduler logic that wants to switch between "day" and "night" environment lighting.

altitude: number

Degrees above the local horizon (positive = day, negative = night).

azimuth: number

Degrees clockwise from local north (0 = N, 90 = E, 180 = S, 270 = W).