30 lines
845 B
JSON
30 lines
845 B
JSON
{
|
|
"MaxCount": 800,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"Code": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.lifetime = 4;",
|
|
" effect.rate = 120;",
|
|
" effect.spin = 6;",
|
|
"}",
|
|
"",
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 2 + rand(p.seed);",
|
|
" p.vel = p.dir * mix(50, 60, rand(p.seed));",
|
|
"}",
|
|
"",
|
|
"void update(inout Particle p) {",
|
|
" p.scale = 0.5 + 1.5 * p.age;",
|
|
" float3 a0 = float3(0.098, 0.141, 0.784);",
|
|
" float3 a1 = float3(0.525, 0.886, 0.980);",
|
|
" float3 b0 = float3(0.376, 0.121, 0.705);",
|
|
" float3 b1 = float3(0.933, 0.227, 0.953);",
|
|
" p.color.rgb = mix(mix(a0, a1, p.age), mix(b0, b1, p.age), rand(p.seed));",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": []
|
|
} |