WeatherEffect

new Cesium.WeatherEffect()

天气效果

Methods

static Cesium.WeatherEffect.Rain(position, cesiumViewer, imgPath, options)

添加雨天气效果
Name Type Description
position Cartesian3 粒子位置
cesiumViewer Viewer 场景对象
imgPath String 粒子效果图片路径
options Object optional 粒子效果属性,同雪粒子效果

static Cesium.WeatherEffect.Snow(position, cesiumViewer, imgPath, options)

添加雪天气效果
Name Type Description
position Cartesian3 optional 相机位置
cesiumViewer Object optional 场景对象
imgPath String optional 粒子效果图片路径
options Object optional 粒子效果属性:
Name Type Default Description
show Boolean true optional 是否显示.
emitter ParticleEmitter new CircleEmitter(0.5) optional 粒子发射器.
emissionRate Number 5 optional 每秒要发射的粒子数.
startScale Number optional 开始阶段粒子图像的初始比例。
endScale Number optional 结束阶段粒子图像的初始比例。
startColor Color optional 粒子初始颜色.
endColor Color optional 粒子结束颜色.
minimumImageSize Cartesian2 optional 设置最小边界(宽度按高度),在该范围上以像素为单位随机缩放粒子图像的尺寸。
maximumImageSize Cartesian2 optional 设置最大边界(宽度按高度),在该范围上以像素为单位随机缩放粒子图像的尺寸。
speed Number 1.0 optional 设置速度
minimumSpeed Number optional 初始速度设置
maximumSpeed Number optional 终止速度设置
lifetime Number Number.MAX_VALUE optional 最大生命周期
minimumParticleLife Number optional 以秒为单位设置粒子寿命的可能持续时间的最小界限,超过该范围将随机选择粒子的实际寿命
maximumParticleLife Number optional 以秒为单位设置粒子寿命的可能持续时间的最大界限,超过该范围将随机选择粒子的实际寿命
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.