@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
78 lines (76 loc) • 4.09 kB
TypeScript
import type Glow from "./Glow.js";
import type { JSONSupport } from "../core/JSONSupport.js";
import type { GlowProperties } from "./Glow.js";
export interface SunLightingProperties extends Partial<Pick<SunLighting, "directShadowsEnabled" | "displayUTCOffset">> {
/**
* 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.
*/
date?: (Date | number | string);
/**
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
* disable the effect.
*
* Example:
* ```js
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
* ```
*/
glow?: GlowProperties | null;
}
/**
* The sun lighting object is part of the [webscene/Environment](https://developers.arcgis.com/javascript/latest/references/core/webscene/Environment/) and contains information relating to
* how a [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/) is lit by the sun. This class contains all properties which can be persisted in a [WebScene](https://developers.arcgis.com/javascript/latest/references/core/WebScene/).
*
* @since 4.24
* @see [Environment](https://developers.arcgis.com/javascript/latest/references/core/webscene/Environment/)
*/
export default class SunLighting extends JSONSupport {
constructor(properties?: SunLightingProperties);
/**
* 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.
*/
get date(): Date;
set date(value: (Date | number | string));
/**
* Indicates whether to show shadows cast by the sun.
* Shadows are only displayed for real world 3D objects. Terrain doesn't cast shadows. In local scenes at small zoom
* levels, shadows are not displayed. For more control on which 3D objects cast shadows use the `castShadows`
* property available on [ObjectSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/ObjectSymbol3DLayer/#castShadows),
* [FillSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/FillSymbol3DLayer/#castShadows),
* [ExtrudeSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/ExtrudeSymbol3DLayer/#castShadows),
* and [PathSymbol3DLayer.castShadows](https://developers.arcgis.com/javascript/latest/references/core/symbols/PathSymbol3DLayer/#castShadows).
*
* @default false
*/
accessor directShadowsEnabled: boolean;
/**
* The UTC time zone offset in hours that should be displayed in the UI to represent the date.
* This value does not have an impact on the actual lighting of the scene.
*/
accessor displayUTCOffset: number | null | undefined;
/**
* Adds a glow effect to the scene intended for stylistic visualizations. When set, this property creates a halo around
* light emitters, making them appear brighter and more prominent. Accepts a [Glow](https://developers.arcgis.com/javascript/latest/references/core/webscene/Glow/) instance or `null` to
* disable the effect.
*
* Example:
* ```js
* scene.environment.lighting.glow = new Glow({ intensity: 1 });
* ```
*/
get glow(): Glow | null | undefined;
set glow(value: GlowProperties | null | undefined);
/** Indicates that the light source is simulated position of the sun. */
get type(): "sun";
/**
* Creates a deep clone of this object.
*
* @returns Creates a new clone of the instance calling this method.
*/
clone(): SunLighting;
}