1{
2   "MaxCount": 2000,
3   "Drawable": {
4      "Type": "SkCircleDrawable",
5      "Radius": 4
6   },
7   "Code": [
8      "uniform float2 mouse_pos;",
9      "",
10      "void effectSpawn(inout Effect effect) {",
11      "  effect.rate = 500;",
12      "}",
13      "",
14      "void effectUpdate(inout Effect effect) {",
15      "  effect.pos = mouse_pos;",
16      "}",
17      "",
18      "void spawn(inout Particle p) {",
19      "  p.lifetime = 2 + rand(p.seed);",
20      "  p.vel.y = (20 * rand(p.seed)) - 10;",
21      "}",
22      "",
23      "void update(inout Particle p) {",
24      "  p.color.r = p.age;",
25      "  p.color.g = 1 - p.age;",
26      "  float s1 = 0.5 + (1.5 * p.age);",
27      "  float s2 = 1.0 + (-0.75 * p.age);",
28      "  p.scale = (s1 + (s2 - s1) * rand(p.seed)) * 0.5;",
29      "  p.vel.y += 20.0 * dt;",
30      "}",
31      ""
32   ],
33   "Bindings": []
34}