• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2   "MaxCount": 800,
3   "Drawable": {
4      "Type": "SkCircleDrawable",
5      "Radius": 2
6   },
7   "Code": [
8      "uniform float rate;",
9      "uniform float spin;",
10      "uniform float3 color;",
11      "",
12      "void effectSpawn(inout Effect effect) {",
13      "  effect.lifetime = 4;",
14      "}",
15      "",
16      "void effectUpdate(inout Effect effect) {",
17      "  effect.rate = 100 * rate;",
18      "  effect.spin = spin;",
19      "}",
20      "",
21      "void spawn(inout Particle p) {",
22      "  p.lifetime = 2 + rand(p.seed);",
23      "  p.vel = p.dir * mix(50, 60, rand(p.seed));",
24      "}",
25      "",
26      "void update(inout Particle p) {",
27      "  p.color.rgb = color;",
28      "}",
29      ""
30   ],
31   "Bindings": []
32}