Function getSunlightDirection

Get the direction of sunlight

time or Date

sunrise hour or longitude

sunset hour or latitude

east position

  • Get the direction of the sunlight at a specified location and time

    Parameters

    • date: Date

      specified time in Date

    • longitude: number

      specified longitude in degree

    • latitude: number

      specified latitude in degree

    Returns Vector3

  • Get the direction of the sunlight at a specified time and east position

    Parameters

    • hours: number

      specified hour in [ 0.0 ~ 24.0 ], can use 'dateToHours' to convert from a Date

    • sunrise: number

      sunrise hour in [ 0.0 ~ 24.0 ], can use 'dateToHours' to convert from a Date

    • sunset: number

      sunset hour in [ 0.0 ~ 24.0 ], can use 'dateToHours' to convert from a Date

    • eastPosition: Vector2

      specified east position

    Returns Vector3