blob: baec4e39d2f40e80a998a6a366518473a1393ac5 [file] [log] [blame]
{
"MaxCount": 32,
"Drawable": {
"Type": "SkImageDrawable",
"Path": "images",
"Name": "index8.png",
"Columns": 1,
"Rows": 1
},
"Code": [
"void effectSpawn(inout Effect effect) {",
" effect.rate = 0.5;",
" effect.scale = 0.1;",
"}",
"",
"void spawn(inout Particle p) {",
" p.lifetime = 5;",
" float a = radians(mix(-30, -80, rand(p.seed)));",
" float s = mix(150, 200, rand(p.seed));",
" p.vel.x = cos(a) * s;",
" p.vel.y = sin(a) * s;",
"}",
"",
"void update(inout Particle p) {",
" p.vel.y += 50 * dt;",
" p.dir = normalize(p.vel);",
"}",
""
],
"Bindings": []
}