import type WebSceneSunLighting from "../../../webscene/SunLighting.js"; import type { EventedMixin } from "../../../core/Evented.js"; import type { SunLightingProperties as WebSceneSunLightingProperties } from "../../../webscene/SunLighting.js"; export interface SunLightingProperties extends WebSceneSunLightingProperties, Partial> { /** * The current date and time of the simulated sun. When setting the date, specifying the time zone is important, * otherwise the time zone of the browser will be used. This might lead to different lighting for users in different * time zones. * * @default new Date("March 15, 2022 12:00:00 UTC") */ date?: (Date | number | string); } /** * The SunLighting class allows you to change the lighting in the scene to sunlight. The position of the light is set to the sun's location. * * ![scene-lightings](https://developers.arcgis.com/javascript/latest/assets/references/core/views/virtualLightCombined.avif) * * Example: * ```js * let view = new SceneView({ * container: "viewDiv", * * map: new Map({ * basemap: "satellite", * ground: "world-elevation" * }), * environment: { * lighting: { * type: "sun" // autocasts as new SunLighting() * } * } * }); * ``` * The lighting visualization updates as soon as the type property changes: * ``` * view.environment.lighting = { * type: "sun", * directShadowsEnabled: true // autocasts as new SunLighting({ directShadowsEnabled: true }) * } * ``` * * @since 4.23 * @see [Sample - Daylight component](https://developers.arcgis.com/javascript/latest/sample-code/daylight/) */ export default class SunLighting extends SunLightingSuperclass { constructor(properties?: SunLightingProperties); /** * Indicates whether the date and time of the simulated sun is automatically updated to maintain the current time of * day while the camera changes. * * @default true */ accessor cameraTrackingEnabled: boolean; /** * The current date and time of the simulated sun. When setting the date, specifying the time zone is important, * otherwise the time zone of the browser will be used. This might lead to different lighting for users in different * time zones. * * @default new Date("March 15, 2022 12:00:00 UTC") */ get date(): Date; set date(value: (Date | number | string)); /** * Enables global illumination for more realistic lighting in the scene through ambient occlusion and emissive lighting. * * **Ambient occlusion** darkens areas where surrounding geometry blocks ambient light, adding definition to corners, crevices, and spaces between buildings. * * **Emissive lighting** illuminates surfaces near emissive materials. The illumination depends on the emitters’ strength and color, as well as their distance from the surfaces they illuminate. See the [Visualizations with light-emitting symbols sample](/sample-code/light-emitting-symbols/) for more details on configuring emissive symbols. * *
* Comparison of scene lighting with global illumination enabled and disabled *
Global illumination, enabled on the right, provides more detailed ambient occlusion shading and emissive lighting.
*
* * Global illumination is a camera-dependent, screen-space approximation based on visible depth, surface normals, and recent frame data. It is not a physically exact lighting simulation or a scene-wide path tracer. Off-screen or hidden geometry cannot reliably provide indirect light. * It is meant to be used mainly for visual context, not illumination measurements or lighting-compliance analysis. * * Global illumination progressively accumulates lighting over multiple frames, reducing noise and improving visual quality. After camera or scene changes, lighting settles over successive rendered frames. During navigation, reduced resolution trades detail for rendering cost. * * * **Known limitations** * * - Global illumination is not supported with [GaussianSplatLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GaussianSplatLayer/): neither ambient occlusion nor emissive lighting will be computed for this layer. * - [SceneView.takeScreenshot()](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/#takeScreenshot) uses a dedicated accumulation path to compute global illumination. Captures with global illumination enabled can therefore take substantially longer to finish. * - Small emitters, or emitters that appear small on screen due to distance may produce only weak illumination. Increasing size, [emissive strength](https://developers.arcgis.com/javascript/latest/references/core/symbols/support/Symbol3DEmissive/#strength) and enabling [glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) can help improve visibility, but cannot guarantee a particular light footprint or replace missing screen-space samples from arbitrary distances and angles. * - Global illumination is disabled at high camera altitudes. * * @default false * @beta * @since 5.2 * @see [Sample - Global Illumination](https://developers.arcgis.com/javascript/latest/sample-code/global-illumination/) */ accessor globalIllumination: boolean; /** Indicates that the light source is simulated position of the sun. */ get type(): "sun"; } declare const SunLightingSuperclass: typeof WebSceneSunLighting & typeof EventedMixin