GeoWater

new Cesium.GeoWater(options)

水面特效
Name Type Description
options Object optional 参数选项:
Name Type Description
viewer Viewer optional 三维球对象。
url String optional 法线纹理贴图地址。
Example:
var water = new Cesium.GeoWater({
		viewer: viewer,
		url: '/geomap-api/JsCesuimDemo/lib/Cesium/Assets/Textures/grey.png'
});
var waterPostion = [];
//顶点数据需采用逆时针顺序
waterPostion.push(Cesium.Cartesian3.fromDegrees(108.95784047447702, 34.219977705424250, 422));
waterPostion.push(Cesium.Cartesian3.fromDegrees(108.95782804955876, 34.219364587415185, 422));
waterPostion.push(Cesium.Cartesian3.fromDegrees(108.95838631130526, 34.219330390989890, 422));
waterPostion.push(Cesium.Cartesian3.fromDegrees(108.95839328710329, 34.220033491883065, 422));
var waterpolygon = new Cesium.PolygonGeometry({
		polygonHierarchy: new Cesium.PolygonHierarchy(waterPostion),
		perPositionHeight: true
});
water.waterPolygon = waterpolygon;
water.waterColor = new Cesium.Color(0.439, 0.564, 0.788, 0);//蓝
water.waveWidth = 6;
water.flowDirection = 0;
water.flowSpeed = 0.7;
Demo:

Members

flowDirection : Number

水流方向,单位为°,范围[0, 360]。
Default Value: 90

flowSpeed : Number

水流速度(m/s)。
Default Value: 0.7

isVisible : Boolean

显示或隐藏
Default Value: true

waterColor : Cesium.Color

水的颜色。
Default Value: new Cesium.Color(.439,.564,.788,0)

waterPolygon : PolygonGeometry

水面几何形状。

waveWidth : Number

波纹宽度,范围(0, +Infinity]。
Default Value: 0.2

Methods

destroy()

销毁。