# WeatherEffect

#### new Cesium.WeatherEffect(viewer)
MapGIS/PostProcessingEffects/WeatherEffect.js 17

天气特效：雨、雪、雾

Name | Type | Description
--- | --- | ---
`viewer` | Viewer | 视图对象

Author:
  - 周凌风

### Methods

#### addFog(options) → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 245

添加雾

Name | Type | Description
--- | --- | ---
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`alpha` | Number | `0.5` | optional 雾的透明度
`fogcolor` | Color | `new Color(1.0,1.0,1.0,0.0)` | optional 雾颜色

##### Returns:

true

#### addRain(options) → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 35

添加雨

Name | Type | Description
--- | --- | ---
`options` | Object |
Name | Type | Default | Description
--- | --- | --- | ---
`viewInverseMatrix` | Matrix4 | `Matrix4.IDENTITY` | optional 视图逆矩阵
`modelMatrix` | Matrix4 | `Matrix4.IDENTITY` | optional 模型转换矩阵
`positionArray` | Array |  | optional 限定模型上降雨范围的坐标数组
`alpha` | Number | `1.0` | optional 透明度，值域【0,1】
`angle` | Number | `0.0` | optional 倾斜角度，值域【-30,30】
`speed` | Number | `1.0` | optional 雨丝速度，值域【1.0,20.0】
`rainLength` | Number | `0.0` | optional 雨丝附加长度，值域【0.0,10.0】
`factor` | Number | `0.1` | optional 场景混合度，值域【0,1.0】

##### Returns:

true

#### addSnow(options) → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 185

添加雪

Name | Type | Description
--- | --- | ---
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`size` | Number | `5` | optional 雪大小
`scale` | Number | `5` | optional 雪规模

##### Returns:

true

#### removeAll() → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 338

移除全部天气特效

##### Returns:

true

#### removeFog() → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 322

移除雾特效

##### Returns:

true

#### removeRain() → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 290

移除雨特效

##### Returns:

true

#### removeSnow() → Boolean
MapGIS/PostProcessingEffects/WeatherEffect.js 306

移除雪特效

##### Returns:

true