The SnowyWeather class allows you to change the weather conditions in the scene to snowy weather.
Example:
let view = new SceneView({
container: "viewDiv",
map: new Map({
basemap: "satellite",
ground: "world-elevation"
}),
environment: {
weather: {
type: "snowy",
cloudCover: 0.8,
precipitation: 0.3,
snowCover: "enabled" // autocasts as new SnowyWeather({ cloudCover: 0.8, precipitation: 0.3, snowCover: "enabled" })
}
}
});
The weather visualization updates as soon as the property changes:
view.environment.weather = {
type: "snowy",
cloudCover: 0.4,
precipitation: 0.3 // autocasts as new SnowyWeather({ cloudCover: 0.4, precipitation: 0.3, snowCover: "disabled" })
}
- See also:
Constructors
-
new SnowyWeather(properties)
-
Parameter:properties Objectoptional
See the properties for a list of all the properties that may be passed into the constructor.
Property Overview
Name | Type | Summary | Class | |
---|---|---|---|---|
Number | more details Specifies the amount of cloud cover in the sky for a certain weather type. | more details | SnowyWeather | |
String | more details The name of the class. | more details | Accessor | |
Number | more details Specifies the amount of falling snow. | more details | SnowyWeather | |
String | more details Display surfaces covered with snow. | more details | SnowyWeather | |
String | more details The type of Weather | more details | SnowyWeather |
Property Details
-
cloudCover Number
-
Specifies the amount of cloud cover in the sky for a certain weather type.
- Default Value:0.5
-
The name of the class. The declared class name is formatted as
esri.folder.className
.
-
precipitation Number
-
Specifies the amount of falling snow.
- Default Value:0.5
-
snowCover String
-
Display surfaces covered with snow. The snow cover does not display on basemaps or draped layers.
Possible Values:"enabled"|"disabled"
- Default Value:"disabled"
-
type Stringreadonly
-
The type of Weather
For SnowyWeather the type is always "snowy".
Method Overview
Name | Return Type | Summary | Class | |
---|---|---|---|---|
SnowyWeather | more details Creates a deep clone of this object. | more details | SnowyWeather |
Method Details
-
clone(){SnowyWeather}
-
Creates a deep clone of this object.
Returns:Type Description SnowyWeather Creates a new clone of the instance calling this method.