当前位置: 首页>>代码示例 >>用法及示例精选 >>正文


JavaScript ArcGIS RainyWeather用法及代码示例


基本信息

以下是所在类或对象的基本信息。

AMD: require(["esri/views/3d/environment/RainyWeather"], (RainyWeather) => { /* code goes here */ });

ESM: import RainyWeather from "@arcgis/core/views/3d/environment/RainyWeather";

类: esri/views/3d/environment/RainyWeather

继承: RainyWeather > Accessor

自从:用于 JavaScript 4.22 的 ArcGIS API

用法说明

RainyWeather 类允许您将场景中的天气条件更改为下雨天气。

scene-atmosphere

例子:

let view = new SceneView({
  container: "viewDiv",

  map: new Map({
    basemap: "satellite",
    ground: "world-elevation"
  }),
  environment: {
    weather: {
      type: "rainy",
      cloudCover: 0.8     // autocasts as new RainyWeather({ cloudCover: 0.8 })
    }
  }
});

属性更改后,天气可视化会立即更新:

view.environment.weather = {
   type: "rainy",
   cloudCover: 0.4   // autocasts as new RainyWeather({ cloudCover: 0.4 })
}

相关用法


注:本文由纯净天空筛选整理自arcgis.com大神的英文原创作品 RainyWeather。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。