---
title: SunOptions
summary: Interface in @bimworks/viewer3d.
order: 10
languages: [javascript]
sdk-package: JavaScript · @bimworks/viewer3d
---

# SunOptions

[[page:reference/javascript/api|API catalogue]] · `@bimworks/viewer3d` · Interface

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
interface SunOptions
````



## Members

| Member | Kind | Description |
|---|---|---|
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-altitude-24700766a38b|altitude]] | Property | Manual mode: degrees above the horizon, -90..90. Default 50. |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-azimuth-39c3e1d7555c|azimuth]] | Property | Manual mode: degrees clockwise from true north, or from the model's +Y without a location. Default 135. |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-date-05a24b19173b|date]] | Property | Local calendar date, "YYYY-MM-DD"; null for today. |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-enabled-cd1ca6fc0f3d|enabled]] | Property | Light the scene with the sun (true) or the headlight (false, the default). |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-mode-da3220862bc9|mode]] | Property | "geo" (default): the sun for the reference model's location at date and time. "manual": azimuth and altitude. Without a location the sun is always manual. |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-time-79dc3b4efe37|time]] | Property | Local clock time, "HH:MM". Default "12:00". |
| [[page:reference/javascript/bimworks-viewer3d/sunoptions-18c811e1#member-timezone-c3766c73f868|timeZone]] | Property | IANA time zone, e.g. "Europe/Amsterdam"; null for the location's default. Daylight saving time follows the zone. |

## `altitude` {#member-altitude-24700766a38b}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
altitude?: number
````

Manual mode: degrees above the horizon, -90..90. Default 50.

## `azimuth` {#member-azimuth-39c3e1d7555c}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
azimuth?: number
````

Manual mode: degrees clockwise from true north, or from the model's +Y without a location. Default 135.

## `date` {#member-date-05a24b19173b}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
date?: string | null
````

Local calendar date, "YYYY-MM-DD"; null for today.

## `enabled` {#member-enabled-cd1ca6fc0f3d}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
enabled?: boolean
````

Light the scene with the sun (true) or the headlight (false, the default).

## `mode` {#member-mode-da3220862bc9}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
mode?: "manual" | "geo"
````

"geo" (default): the sun for the reference model's location at date and time. "manual":
azimuth and altitude. Without a location the sun is always manual.

## `time` {#member-time-79dc3b4efe37}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
time?: string
````

Local clock time, "HH:MM". Default "12:00".

## `timeZone` {#member-timezone-c3766c73f868}

````typescript sdk=js sdk-namespace="@bimworks/viewer3d"
timeZone?: string | null
````

IANA time zone, e.g. "Europe/Amsterdam"; null for the location's default. Daylight saving time follows the zone.
