2019-10-15 14:27:59 +00:00
|
|
|
{
|
|
|
|
"MaxCount": 2000,
|
|
|
|
"Drawable": {
|
|
|
|
"Type": "SkCircleDrawable",
|
|
|
|
"Radius": 4
|
|
|
|
},
|
2021-02-01 19:47:30 +00:00
|
|
|
"Code": [
|
2019-10-15 14:27:59 +00:00
|
|
|
"void effectSpawn(inout Effect effect) {",
|
|
|
|
" effect.rate = 800;",
|
|
|
|
"}",
|
2021-02-01 19:47:30 +00:00
|
|
|
"",
|
2019-10-15 14:27:59 +00:00
|
|
|
"void spawn(inout Particle p) {",
|
2020-02-10 18:45:22 +00:00
|
|
|
" p.lifetime = 2 + rand(p.seed);",
|
|
|
|
" float a = radians(rand(p.seed) * 360);",
|
|
|
|
" p.vel = float2(cos(a), sin(a)) * mix(5, 15, rand(p.seed));",
|
|
|
|
" p.scale = mix(0.25, 0.75, rand(p.seed));",
|
2019-10-15 14:27:59 +00:00
|
|
|
"}",
|
|
|
|
"",
|
|
|
|
"void update(inout Particle p) {",
|
|
|
|
" p.color.r = p.age;",
|
|
|
|
" p.color.g = 1 - p.age;",
|
|
|
|
"}",
|
|
|
|
""
|
|
|
|
],
|
|
|
|
"Bindings": []
|
|
|
|
}
|