2019-12-03 14:49:12 +00:00
|
|
|
{
|
|
|
|
"MaxCount": 4000,
|
|
|
|
"Drawable": {
|
|
|
|
"Type": "SkCircleDrawable",
|
|
|
|
"Radius": 3
|
|
|
|
},
|
|
|
|
"EffectCode": [
|
|
|
|
"void effectSpawn(inout Effect effect) {",
|
|
|
|
" effect.rate = 4000;",
|
|
|
|
"}",
|
|
|
|
"",
|
|
|
|
"void effectUpdate(inout Effect effect) {",
|
|
|
|
"}",
|
|
|
|
""
|
|
|
|
],
|
|
|
|
"Code": [
|
|
|
|
"void spawn(inout Particle p) {",
|
|
|
|
" p.lifetime = 1;",
|
2020-02-10 18:45:22 +00:00
|
|
|
" p.pos = float2(rand(p.seed), rand(p.seed)) * 200;",
|
|
|
|
" p.vel = float2(rand(p.seed), rand(p.seed)) * 2 - 1;",
|
2019-12-03 14:49:12 +00:00
|
|
|
" p.vel *= 20;",
|
2020-02-10 18:45:22 +00:00
|
|
|
" p.scale = mix(0.25, 1, rand(p.seed));",
|
2019-12-03 14:49:12 +00:00
|
|
|
"}",
|
|
|
|
"",
|
|
|
|
"void update(inout Particle p) {",
|
|
|
|
" p.color = img(p.pos / 200);",
|
|
|
|
"}",
|
|
|
|
""
|
|
|
|
],
|
|
|
|
"Bindings": [
|
|
|
|
{
|
|
|
|
"Type": "SkImageBinding",
|
|
|
|
"Name": "img",
|
|
|
|
"ImagePath": "images",
|
|
|
|
"ImageName": "mandrill_128.png"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|