559ffe4a23
Also removed some older effects that weren't interesting, improved others, cleaned up the unused functions in several, and renamed most of them to reflect which feature they're demonstrating. Change-Id: Ib44a00ec3d25e852a1d1661918137ba13d30c86b Reviewed-on: https://skia-review.googlesource.com/c/skia/+/244119 Reviewed-by: Michael Ludwig <michaelludwig@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
32 lines
845 B
JSON
32 lines
845 B
JSON
{
|
|
"MaxCount": 800,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"EffectCode": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.lifetime = 4;",
|
|
" effect.rate = 120;",
|
|
" effect.spin = 6;",
|
|
"}",
|
|
""
|
|
],
|
|
"Code": [
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 2 + rand;",
|
|
" p.vel = p.dir * mix(50, 60, rand);",
|
|
"}",
|
|
"",
|
|
"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);",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": []
|
|
} |