@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
55 lines (53 loc) • 1.65 kB
TypeScript
import type { JSONSupport } from "../../../core/JSONSupport.js";
export interface FoggyWeatherProperties extends Partial<Pick<FoggyWeather, "fogStrength">> {}
/**
* The FoggyWeather class allows you to change the weather conditions in the scene to foggy weather.
*
* 
*
* Example:
* ```js
* let view = new SceneView({
* container: "viewDiv",
*
* map: new Map({
* basemap: "satellite",
* ground: "world-elevation"
* }),
* environment: {
* weather: {
* type: "foggy",
* fogStrength: 0.8 // autocasts as new FoggyWeather({ fogStrength: 0.8 })
* }
* }
* });
* ```
* The weather visualization updates as soon as the property changes:
* ```
* view.environment.weather = {
* type: "foggy",
* fogStrength: 0.4 // autocasts as new FoggyWeather({ fogStrength: 0.4 })
* }
* ```
*
* @since 4.22
* @see [Sample - Weather visualization](https://developers.arcgis.com/javascript/latest/sample-code/scene-weather/)
* @see [Sample - Weather component](https://developers.arcgis.com/javascript/latest/sample-code/weather/)
*/
export default class FoggyWeather extends JSONSupport {
constructor(properties?: FoggyWeatherProperties);
/**
* Specifies the amount of fog used in the scene.
*
* @default 0.5
*/
accessor fogStrength: number;
/** The type of Weather */
get type(): "foggy";
/**
* Creates a deep clone of this object.
*
* @returns Creates a new clone of the instance calling this method.
*/
clone(): FoggyWeather;
}