• 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   "Code": [
11      "void effectSpawn(inout Effect effect) {",
12      "  effect.rate = 0.5;",
13      "  effect.scale = 0.1;",
14      "}",
15      "",
16      "void spawn(inout Particle p) {",
17      "  p.lifetime = 5;",
18      "  float a = radians(mix(-30, -80, rand(p.seed)));",
19      "  float s = mix(150, 200, rand(p.seed));",
20      "  p.vel.x = cos(a) * s;",
21      "  p.vel.y = sin(a) * s;",
22      "}",
23      "",
24      "void update(inout Particle p) {",
25      "  p.vel.y += 50 * dt;",
26      "  p.dir = normalize(p.vel);",
27      "}",
28      ""
29   ],
30   "Bindings": []
31}