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
727 B
JSON
32 lines
727 B
JSON
{
|
|
"MaxCount": 32,
|
|
"Drawable": {
|
|
"Type": "SkImageDrawable",
|
|
"Path": "resources/images/index8.png",
|
|
"Columns": 1,
|
|
"Rows": 1
|
|
},
|
|
"EffectCode": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.rate = 0.5;",
|
|
" effect.scale = 0.1;",
|
|
"}",
|
|
""
|
|
],
|
|
"Code": [
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 5;",
|
|
" float a = radians(mix(-30, -80, rand));",
|
|
" float s = mix(150, 200, rand);",
|
|
" p.vel.x = cos(a) * s;",
|
|
" p.vel.y = sin(a) * s;",
|
|
"}",
|
|
"",
|
|
"void update(inout Particle p) {",
|
|
" p.vel.y += 50 * dt;",
|
|
" p.dir = normalize(p.vel);",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": []
|
|
} |