Skip to content

Cloud


演练场

引入

ts
import { Cloud } from "@m-tech/gis-core";

const cloud = new Cloud(viewer, options);
cloud.addToViewer(viewer);

入参

参数名称类型必填默认值描述
heightNumber1000云层高度
thicknessNumber1000云层厚度
coverNumber0.5云量
speedRatioNumber0.0001风速
skyAmbientColorColorColor.fromCssColorString('#b4d9f3')天空环境色
groundAmbientColorColorColor.fromCssColorString('#bde5d2')地面环境色
directionCartesian3new Cesium.Cartesian3(100, 0, 0)风向

属性

属性类型读/写描述
heightNumber读写设置云层高度
thicknessNumber读写设置云层厚度
coverNumber读写设置云量
speedRatioNumber读写设置风速
skyAmbientColorColor读写设置天空环境色
groundAmbientColorColor读写设置地面环境色
directionCartesian3读写设置风向

示例

ts
import { Cloud } from "@m-tech/gis-core";

const cloud = new Cloud(viewer, {
  height: 1000, // 云层高度
  thickness: 1000, // 云层厚度
  cover: 0.5, // 云量
  speedRatio: 0.0001, // 风速
  skyAmbientColor: Color.fromCssColorString("#b4d9f3"), // 天空环境色
  groundAmbientColor: Color.fromCssColorString("#bde5d2"), // 地面环境色
  direction: new Cartesian3(100, 0, 0), // 风向
});

// 添加到图层
cloud.addToViewer(viewer);

// 调整云层高度
cloud.height = 2000;

MGis 地理三维库