blob: b6d9a45503fc4d2c7edefb333bb17115c6ee2a46 [file] [log] [blame]
{
"MaxCount": 6000,
"Drawable": {
"Type": "SkCircleDrawable",
"Radius": 2
},
"EffectCode": [
"void effectSpawn(inout Effect effect) {",
" effect.rate = 2000;",
"}",
"",
"void effectUpdate(inout Effect effect) {",
"}",
""
],
"Code": [
"void spawn(inout Particle p) {",
" p.pos.y += sin(effect.age * 6.28) * 40;",
" p.lifetime = 2 + (rand * 2);",
" p.vel.x = (30 * rand) + 50;",
" p.vel.y = (20 * rand) - 10;",
"}",
"",
"void update(inout Particle p) {",
" p.color.r = p.age;",
" p.color.g = 1 - p.age;",
" float s1 = 0.5 + (1.5 * p.age);",
" float s2 = 1.0 + (-0.75 * p.age);",
" p.scale = s1 + (s2 - s1) * rand;",
" p.vel.y += 20.0 * dt;",
"}",
""
],
"Bindings": []
}