• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2   "MaxCount": 2000,
3   "Drawable": {
4      "Type": "SkCircleDrawable",
5      "Radius": 4
6   },
7   "Code": [
8      "void effectSpawn(inout Effect effect) {",
9      "  effect.rate = 800;",
10      "}",
11      "",
12      "void spawn(inout Particle p) {",
13      "  p.lifetime = 2 + rand(p.seed);",
14      "  float a = radians(rand(p.seed) * 360);",
15      "  p.vel = float2(cos(a), sin(a)) * mix(5, 15, rand(p.seed));",
16      "  p.scale = mix(0.25, 0.75, rand(p.seed));",
17      "}",
18      "",
19      "void update(inout Particle p) {",
20      "  p.color.r = p.age;",
21      "  p.color.g = 1 - p.age;",
22      "}",
23      ""
24   ],
25   "Bindings": []
26}