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