arcgis js 4 使用pixi.js 构建喷泉粒子

我们来用pixi.js 来构建喷泉粒子

首先数据结构定义

let option = {
renderer: {
type: “simple”,
symbol: {
startColor: “#beffd1”,
endColor: “#91ffd7”,
maxLifetime: 0.35,
maxParticles: 300
}
},
data: [
{
geometry: [12697872.012783196, 2577456.5937789795],
attributes: {
name: “深圳”
}
},
{
geometry: [12956152.73135875, 4855356.473704897],
attributes: {
name: “北京”
}
},
{
geometry: [12127804.65583251, 4070118.8821315],
attributes: {
name: “西安”
}
}

]
};
我们使用pixi 粒子插件

import {Emitter} from “pixi-particles”;
喷泉的具体参数,由于参数过于复杂,我们抽选出简单的参数来配置


this.configuration = {
"alpha": {
"start": 1,
"end": 0.3
},
"scale": {
"start": 0.5,
"end": 1
},
"color": {
"start": this.options.renderer.symbol.startColor,
"end": this.options.renderer.symbol.endColor
},
"speed": {
"start": 600,
"end": 200
},
"acceleration": {
"x": 0,
"y": 3000
},
"startRotation": {
"min": 260,
"max": 280
},
"rotationSpeed": {
"min": 0,
"max": 0
},
"lifetime": {
"min": 0.25,
"max": this.options.renderer.symbol.maxLifetime

 更多参考 https://xiaozhuanlan.com/topic/7894063521
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值