You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
722 B

{
"MaxCount": 4096,
"Drawable": {
"Type": "SkCircleDrawable",
"Radius": 2
},
"Code": [
"void effectSpawn(inout Effect effect) {",
" effect.rate = 90;",
"}",
"",
"float2 circle(inout float seed) {",
" float r = sqrt(rand(seed));",
" float a = rand(seed) * 6.283185;",
" return r * float2(sin(a), cos(a));",
"}",
"",
"void spawn(inout Particle p) {",
" p.lifetime = 30;",
" p.pos += circle(p.seed) * 40;",
"}",
"",
"void update(inout Particle p) {",
" p.vel += normalize(p.pos - effect.pos) * dt * 10;",
" p.scale = mix(0.25, 3, p.age);",
"}",
""
],
"Bindings": []
}