blob: 1419bfc165e7878bd9f8a5e4051b47c80d5d1127 [file] [log] [blame]
{
"MaxCount": 32,
"Drawable": {
"Type": "SkSkottieDrawable",
"Path": "skottie",
"Name": "skottie_sample_2.json"
},
"Code": [
"void effectSpawn(inout Effect effect) {",
" effect.rate = 15;",
"}",
"",
"void spawn(inout Particle p) {",
" p.lifetime = 1.0 + rand(p.seed) * 2.0;",
" p.scale = 0.25;",
"}",
"",
"void update(inout Particle p) {",
" p.frame = p.age;",
" float a = radians(rand(p.seed) * 360);",
" float invAge = 1 - p.age;",
" p.vel = float2(cos(a), sin(a)) * mix(250, 550, rand(p.seed)) * invAge * invAge;",
" p.dir = normalize(p.vel);",
"}",
""
],
"Bindings": []
}