# 粒子特效

# 配置规范

// 这个文件描述粒子特效微件配置信息
{
  // 符号库参数配置
  "symbolList": [
    {
      // 符号对象唯一的guid
      "guid": "9D09DB87-7955-9295-2E34-61E83C30D3AA",
      // 当前符号粒子的名称
      "name": "火焰",
      // 当前符号粒子的url,即路径地址
      "image": "/upload/fire.png",
      // 当前符号对象的iconfont图标的type
      "iconUrl": "mapgis-huoyan",
      // 当前符号的粒子特效预设参数配置
      "config": {
        // 发射类型:可选 '盒状放射', '圆形放射', '锥形放射', '球形放射'
        "emitterType": "圆形放射",
        // 发射速率(个/秒)
        "emissionRate": 13,
        // 尺寸(像素)
        "imageSize": 5,
        // 粒子最小存在时间(秒)
        "minimumParticleLife": 2,
        // 粒子最大存在时间(秒)
        "maximumParticleLife": 3,
        // 最小速度(个/秒)
        "minimumSpeed": 9,
        // 最大速度(个/秒)
        "maximumSpeed": 10,
        // 初始比例
        "startScale": 1,
        // 结束比例
        "endScale": 4
      }
    }
    // ...
  ],
  // 粒子特效参数配置,传入该参数后在场景中自动生成对应的粒子特效
  "particleListConfig": [
    {
      // 粒子唯一的guid
      "guid": "80811AA9-A47F-709C-936C-C647FBD098E0",
      // 粒子名称
      "name": "粒子名称1",
      // 粒子是否显示
      "isShow": true,
      // 粒子特效配置参数
      "param": {
        // 发射类型:可选 '盒状放射', '圆形放射', '锥形放射', '球形放射'
        "emitterType": "锥形放射",
        // 发射速率(个/秒)
        "emissionRate": 10,
        // 尺寸(像素)
        "imageSize": 25,
        // 粒子最小存在时间(秒)
        "minimumParticleLife": 1.5,
        // 粒子最大存在时间(秒)
        "maximumParticleLife": 1.8,
        // 最小速度(个/秒)
        "minimumSpeed": 0,
        // 最大速度(个/秒)
        "maximumSpeed": 9,
        // 初始比例
        "startScale": 2.5,
        // 结束比例
        "endScale": 4,
        // 该粒子特效对应的符号的 guid
        "symbolGuid": "A35C78FF-DD27-66C8-DD61-027CAE317145",
        // 该粒子特效生成所在的位置的坐标点,包含参数 longitude、latitude 和 height
        "position": {
          "longitude": 114.4023,
          "latitude": 30.465911,
          "height": 15
        }
      },
      // 粒子的url,即路径地址
      "imageUrl": "/upload/fountain.png"
    }
    // ...
  ]
}

# 默认配置

{
  "symbolList": [
    {
      "guid": "9D09DB87-7955-9295-2E34-61E83C30D3AA",
      "name": "火焰",
      "image": "/upload/fire.png",
      "iconUrl": "mapgis-huoyan",
      "config": {
        "emitterType": "圆形放射",
        "emissionRate": 13,
        "imageSize": 5,
        "minimumParticleLife": 2,
        "maximumParticleLife": 3,
        "minimumSpeed": 9,
        "maximumSpeed": 10,
        "startScale": 1,
        "endScale": 4
      }
    },
    {
      "guid": "F9FDE880-8F5B-AEDF-CA95-ADC54F02A34F",
      "name": "烟雾",
      "image": "/upload/smoke.png",
      "iconUrl": "mapgis-yancong",
      "config": {
        "emitterType": "盒状放射",
        "emissionRate": 6,
        "imageSize": 7,
        "minimumParticleLife": 2.5,
        "maximumParticleLife": 2.4,
        "minimumSpeed": 2,
        "maximumSpeed": 6,
        "startScale": 3,
        "endScale": 3
      }
    },
    {
      "guid": "A35C78FF-DD27-66C8-DD61-027CAE317145",
      "name": "喷泉",
      "image": "/upload/fountain.png",
      "iconUrl": "mapgis-penquan",
      "config": {
        "emitterType": "锥形放射",
        "emissionRate": 10,
        "imageSize": 7,
        "minimumParticleLife": 1.5,
        "maximumParticleLife": 1.8,
        "minimumSpeed": 1,
        "maximumSpeed": 9,
        "startScale": 2.5,
        "endScale": 4
      }
    }
  ],
  "particleListConfig": [
    {
      "guid": "80811AA9-A47F-709C-936C-C647FBD098E0",
      "name": "粒子名称1",
      "isShow": true,
      "param": {
        "emitterType": "锥形放射",
        "emissionRate": 10,
        "imageSize": 25,
        "minimumParticleLife": 1.5,
        "maximumParticleLife": 1.8,
        "minimumSpeed": 0,
        "maximumSpeed": 9,
        "startScale": 2.5,
        "endScale": 4,
        "symbolGuid": "A35C78FF-DD27-66C8-DD61-027CAE317145",
        "position": {
          "longitude": 114.4023,
          "latitude": 30.465911,
          "height": 15
        }
      },
      "imageUrl": "/upload/fountain.png"
    },
    {
      "guid": "49A834D7-97C6-F452-4611-6F0739809B50",
      "name": "粒子名称2",
      "isShow": true,
      "param": {
        "emitterType": "圆形放射",
        "emissionRate": 13,
        "imageSize": 5,
        "minimumParticleLife": 2,
        "maximumParticleLife": 3,
        "minimumSpeed": 9,
        "maximumSpeed": 10,
        "startScale": 1,
        "endScale": 4,
        "symbolGuid": "9D09DB87-7955-9295-2E34-61E83C30D3AA",
        "position": {
          "longitude": 114.402023,
          "latitude": 30.46666308,
          "height": 7.160341631125318
        }
      },
      "imageUrl": "/upload/fire.png"
    },
    {
      "guid": "36F335E8-1F3C-41E2-40AA-EE950D691761",
      "name": "粒子名称3",
      "isShow": true,
      "param": {
        "emitterType": "锥形放射",
        "emissionRate": 29,
        "imageSize": 6,
        "minimumParticleLife": 2,
        "maximumParticleLife": 3,
        "minimumSpeed": 9,
        "maximumSpeed": 10,
        "startScale": 1,
        "endScale": 4,
        "symbolGuid": "9D09DB87-7955-9295-2E34-61E83C30D3AA",
        "position": {
          "longitude": 114.40092382,
          "latitude": 30.46549092,
          "height": 10
        }
      },
      "imageUrl": "/upload/fire.png"
    }
  ]
}