WaterEffect

new Cesium.WaterEffect(viewer, options)

水效果
Name Type Description
viewer Object optional 场景对象
options Object optional 设置选项:
Name Type Default Description
positions Array optional 坐标数组,每个顶点包括经度、纬度、高程,不可为空,. const pos = [[115.907543, 30.441563, 541.47],[115.904337, 30.439412, 491.79]];
width Number optional 根据线宽生成对称多边形,如果不设置该参数,则默认将positions坐标当做多边进行边界处理
height Number 0.0 optional 设置水体底面高程
extrudedHeight Number 0.0 optional 设置水体拉伸高程
flowSpeed Number 1.0 optional 水流速度
image String optional 设置水面纹理图片,不可为空
show Boolean true optional 是否显示
swapUV Boolean false optional 是否交换纹理坐标顺序,仅对width为undefined时起作用
enableFlow Boolean true optional 是否开启流动效果,仅对width为undefined时起作用
moveDir Boolean true optional 设置流动方向,仅对width为undefined时起作用
waterColor Color Color(1.0, 1.0, 1.0, 1.0) optional 水体颜色,影响水下颜色和水面颜色
enableUnderWater Boolean true optional 是否开启水下效果
underWaterAlphaByDistance Cartesian4 Cartesian4(0.0, 0.6, 250, 0.9) optional 水下效果透明度调整

Members

enableFlow : Boolean

设置是否流动

enableUnderWater : Number

是否开启水下效果

extrudedHeight : Number

设置水流高度
设置流动速度
设置水面纹理
设置/获取是否显示
是否交换UV坐标
设置起伏变化,默认为new Cartesian3(50, 1, 100)
设置水流宽度

Methods

销毁对象
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.