c81378624f
Change-Id: Ic53dc7ecab1b44761fe06e6b528864d24cc5fa58 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/363940 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
23 lines
543 B
JSON
23 lines
543 B
JSON
{
|
|
"MaxCount": 4000,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 3
|
|
},
|
|
"Code": [
|
|
"void effectUpdate(inout Effect effect) {",
|
|
" effect.rate = (sin(radians(effect.age * 720)) + 0.7) * 200;",
|
|
"}",
|
|
"",
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 6;",
|
|
" float a = radians(rand(p.seed) * 360);",
|
|
" float2 ofs = float2(cos(a), sin(a)) * 40;",
|
|
" p.pos += ofs;",
|
|
" p.vel = ofs;",
|
|
" p.scale = 0.5;",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": []
|
|
} |