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>
35 lines
856 B
JSON
35 lines
856 B
JSON
{
|
|
"MaxCount": 6000,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"EffectCode": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.rate = 2000;",
|
|
"}",
|
|
"",
|
|
"void effectUpdate(inout Effect effect) {",
|
|
" effect.pos.y = sin(effect.age * 6.28) * 40;",
|
|
"}",
|
|
""
|
|
],
|
|
"Code": [
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 2 + (rand * 2);",
|
|
" p.vel.x = (30 * rand) + 50;",
|
|
" p.vel.y = (20 * rand) - 10;",
|
|
"}",
|
|
"",
|
|
"void update(inout Particle p) {",
|
|
" p.color.r = p.age;",
|
|
" p.color.g = 1 - p.age;",
|
|
" float s1 = 0.5 + (1.5 * p.age);",
|
|
" float s2 = 1.0 + (-0.75 * p.age);",
|
|
" p.scale = s1 + (s2 - s1) * rand;",
|
|
" p.vel.y += 20.0 * dt;",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": []
|
|
} |