SDK JS
    Preparing search index...

    Function enuDirectionFromAzimuthAltitude

    • Convert a SunCalc azimuth + altitude into a unit ENU direction vector pointing toward the sun. Pure helper, exported mainly for testing; most callers want computeSunState.

      Parameters

      • azimuthRad: number

        Azimuth in radians, SunCalc convention: 0 = south, positive toward west (clockwise), +π/2 = west.

      • altitudeRad: number

        Altitude above the horizon in radians (+π/2 = zenith, negative below the horizon).

      Returns Vec3

      A unit Vec3 in tile-local ENU (x = east, y = north, z = up) pointing toward the sun.