skia2/resources/particles/orientation.json
Brian Osman 559ffe4a23 Particles: Added particle flags for tracking state (one-time triggers, etc)
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>
2019-09-25 15:58:09 +00:00

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": []
}