1{ 2 "MaxCount": 800, 3 "Drawable": { 4 "Type": "SkCircleDrawable", 5 "Radius": 2 6 }, 7 "Code": [ 8 "void effectSpawn(inout Effect effect) {", 9 " effect.lifetime = 4;", 10 " effect.rate = 120;", 11 " effect.spin = 6;", 12 "}", 13 "", 14 "void spawn(inout Particle p) {", 15 " p.lifetime = 2 + rand(p.seed);", 16 " p.vel = p.dir * mix(50, 60, rand(p.seed));", 17 "}", 18 "", 19 "void update(inout Particle p) {", 20 " p.scale = 0.5 + 1.5 * p.age;", 21 " float3 a0 = float3(0.098, 0.141, 0.784);", 22 " float3 a1 = float3(0.525, 0.886, 0.980);", 23 " float3 b0 = float3(0.376, 0.121, 0.705);", 24 " float3 b1 = float3(0.933, 0.227, 0.953);", 25 " p.color.rgb = mix(mix(a0, a1, p.age), mix(b0, b1, p.age), rand(p.seed));", 26 "}", 27 "" 28 ], 29 "Bindings": [] 30}