Skip to content

SandstormEffect 沙尘 ​

SandstormEffect 将流动噪声、细颗粒和暖色低能见度合成为沙尘天气,适合荒漠、极端天气和应急态势场景。

组件案例 ​

构造函数 ​

js
new WeatherEffects.SandstormEffect(viewer, options)
参数默认值范围说明
intensity0.720~2沙尘与原场景的混合强度
density0.90.05~2.5颗粒和噪声密度
speed10.01~5噪声流动速度
wind0.8-2~2水平运动方向和幅度
color#c8894de6CSS 颜色沙尘主色

使用示例 ​

js
const sandstorm = new WeatherEffects.SandstormEffect(viewer, {
  intensity: 0.72,
  density: 0.9,
  speed: 1,
  wind: 0.8,
  color: '#c8894de6',
})

sandstorm.setOptions({ intensity: 0.55, wind: 1.2 })

高强度和高密度会明显降低底图可见度,业务场景中建议保留足够的标注对比度。

基于 Apache-2.0 许可发布