1{ 2 "MaxCount": 4000, 3 "Drawable": { 4 "Type": "SkCircleDrawable", 5 "Radius": 3 6 }, 7 "Code": [ 8 "void effectSpawn(inout Effect effect) {", 9 " effect.rate = 4000;", 10 "}", 11 "", 12 "void effectUpdate(inout Effect effect) {", 13 "}", 14 "", 15 "void spawn(inout Particle p) {", 16 " p.lifetime = 1;", 17 " p.pos = float2(rand(p.seed), rand(p.seed)) * 200;", 18 " p.vel = float2(rand(p.seed), rand(p.seed)) * 2 - 1;", 19 " p.vel *= 20;", 20 " p.scale = mix(0.25, 1, rand(p.seed));", 21 "}", 22 "", 23 "void update(inout Particle p) {", 24 " p.color = img(p.pos / 200);", 25 "}", 26 "" 27 ], 28 "Bindings": [ 29 { 30 "Type": "SkImageBinding", 31 "Name": "img", 32 "ImagePath": "images", 33 "ImageName": "mandrill_128.png" 34 } 35 ] 36}