@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
50 lines (48 loc) • 2.12 kB
TypeScript
import type WebSceneVirtualLighting from "../../../webscene/VirtualLighting.js";
import type { EventedMixin } from "../../../core/Evented.js";
import type { VirtualLightingProperties as WebSceneVirtualLightingProperties } from "../../../webscene/VirtualLighting.js";
export interface VirtualLightingProperties extends WebSceneVirtualLightingProperties {}
/**
* The VirtualLighting class allows you to change the lighting in the scene to virtual light. The position of the light
* follows the camera and has a slight top-right offset in respect to the camera.
*
* 
*
* Example:
* ```js
* let view = new SceneView({
* container: "viewDiv",
*
* map: new Map({
* basemap: "satellite",
* ground: "world-elevation"
* }),
* environment: {
* lighting: {
* type: "virtual" // autocasts as new VirtualLighting()
* }
* }
* });
* ```
* The lighting visualization updates as soon as the type property changes:
* ```
* view.environment.lighting = {
* type: "virtual",
* directShadowsEnabled: true // autocasts as new VirtualLighting({ directShadowsEnabled: true })
* }
* ```
*
* @since 4.23
* @see [Sample - Daylight component](https://developers.arcgis.com/javascript/latest/sample-code/daylight/)
* @see [Sample - Exaggerating elevation](https://developers.arcgis.com/javascript/latest/sample-code/layers-custom-elevation-exaggerated/)
* @see [Sample - Line markers and label placement](https://developers.arcgis.com/javascript/latest/sample-code/visualization-line-markers/)
*/
export default class VirtualLighting extends VirtualLightingSuperclass {
constructor(properties?: VirtualLightingProperties);
/**
* Indicates that the light source is virtual light. Virtual light is top - right position respect to the camera
* enabling user to observe the scene independant to the possition of the sun.
*/
get type(): "virtual";
}
declare const VirtualLightingSuperclass: typeof WebSceneVirtualLighting & typeof EventedMixin