• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2   "MaxCount": 32,
3   "Drawable": {
4      "Type": "SkImageDrawable",
5      "Path": "images",
6      "Name": "index8.png",
7      "Columns": 1,
8      "Rows": 1
9   },
10   "EffectCode": [
11      "void effectSpawn(inout Effect effect) {",
12      "  effect.rate = 0.5;",
13      "  effect.scale = 0.1;",
14      "}",
15      ""
16   ],
17   "Code": [
18      "void spawn(inout Particle p) {",
19      "  p.lifetime = 5;",
20      "  float a = radians(mix(-30, -80, rand));",
21      "  float s = mix(150, 200, rand);",
22      "  p.vel.x = cos(a) * s;",
23      "  p.vel.y = sin(a) * s;",
24      "}",
25      "",
26      "void update(inout Particle p) {",
27      "  p.vel.y += 50 * dt;",
28      "  p.dir = normalize(p.vel);",
29      "}",
30      ""
31   ],
32   "Bindings": []
33}