# ModelExplosion

#### new Cesium.ModelExplosion(viewer)
MapGIS/Tools/ModelExplosion.js 16

模型爆炸工具集

Name | Type | Description
--- | --- | ---
`viewer` | Viewer | 场景视图

Author:
  - 基础平台-周凌风

### Methods

#### multiLayerAxisExplosionNoAnimate(layers, options)
MapGIS/Tools/ModelExplosion.js 506

多图层-轴向爆炸-无动画

Name | Type | Description
--- | --- | ---
`layers` | Array | 图层数组
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`moveDirection` | Cartesian3 | `new Cartesian3(1, 0, 0)` | optional 爆炸方向
`expDistance` | Number | `1` | optional 爆炸间距

#### multiLayerAxisExplosionWithAnimate(layerList)
MapGIS/Tools/ModelExplosion.js 469

多图层-轴向爆炸-有动画

Name | Type | Default | Description
--- | --- | --- | ---
`layerList` | Array |  | 图层数组
`options.moveDirection` | Cartesian3 | `new Cartesian3(1, 0, 0)` | optional 爆炸方向
`options.expDistance` | Number | `1` | optional 爆炸间距
`options.speed` | Number | `1` | optional 爆炸动画速度

#### multiLayerCenterExplosionNoAnimate(layers, options)
MapGIS/Tools/ModelExplosion.js 657

多图层-中心点爆炸-无动画

Name | Type | Description
--- | --- | ---
`layers` | Array | 图层数组
`options` | Object | 附加属性
Name | Type | Default | Description
--- | --- | --- | ---
`center` | Cartesian3 |  | 中心点坐标
`expDistance` | Number | `1` | optional 爆炸间隔距离

#### multiLayerCenterExplosionWithAnimate(layers, options)
MapGIS/Tools/ModelExplosion.js 621

多图层-中心点爆炸-有动画

Name | Type | Description
--- | --- | ---
`layers` | Array | 图层数组
`options` | Object | 附加属性
Name | Type | Default | Description
--- | --- | --- | ---
`center` | Cartesian3 |  | 中心点坐标
`expDistance` | Number | `1` | optional 爆炸间隔距离
`speed` | Number | `1` | optional 动画中移动速度

#### recover(layers)
MapGIS/Tools/ModelExplosion.js 706

将mapgism3d的modelExplosion属性修改为false，确保不对其他功能造成性能影响

Name | Type | Description
--- | --- | ---
`layers` | Array | 图层数组

#### removeModelExplosion(layers)
MapGIS/Tools/ModelExplosion.js 692

移除爆炸

Name | Type | Description
--- | --- | ---
`layers` | Array | 图层数组

#### singleLayerAxisExplosionNoAnimate(layer, options)
MapGIS/Tools/ModelExplosion.js 366

单图层-轴向爆炸-无动画

Name | Type | Description
--- | --- | ---
`layer` | Object | 图层
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`direction` | Cartesian3 | `new Cartesian3(0,0,1)` | optional 爆炸方向
`expDistance` | Number | `100` | optional 爆炸间距

#### singleLayerAxisExplosionWithAnimate(layer, options)
MapGIS/Tools/ModelExplosion.js 310

单图层-轴向爆炸-有动画

Name | Type | Description
--- | --- | ---
`layer` | Object | 图层
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`direction` | Cartesian3 | `new Cartesian3(0,0,1)` | optional 爆炸方向
`expDistance` | Number | `1` | optional 爆炸间距
`speed` | Number | `1` | optional 动画中移动速度

#### singleLayerCenterExplosionNoAnimate(layer, options)
MapGIS/Tools/ModelExplosion.js 267

单图层-中心点爆炸-无动画

Name | Type | Description
--- | --- | ---
`layer` | Object | 图层
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`center` | Cartesian3 |  | 中心点坐标
`expDistance` | Number | `1` | optional 爆炸间隔距离

#### singleLayerCenterExplosionWithAnimate(layer, options)
MapGIS/Tools/ModelExplosion.js 216

单图层-中心点爆炸-有动画

Name | Type | Description
--- | --- | ---
`layer` | Object | 图层
`options` | Object | 附加参数
Name | Type | Default | Description
--- | --- | --- | ---
`center` | Cartesian3 |  | 中心点坐标
`expDistance` | Number | `1` | optional 爆炸间隔距离
`speed` | Number | `1` | optional 动画中移动速度

#### transformTileset(tileset, options)
MapGIS/Tools/ModelExplosion.js 580

特别注意这个函数不能被多图层的爆照循环调用 原因在于单个图层的局部坐标系是由偏移，如果各自按照各自的远原点来爆炸不会是想象中的那么整齐 必须通过第一个图层的原点作为整个合并空间的原点才好控制量纲

Name | Type | Description
--- | --- | ---
`tileset` | * |
`options` | * |