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>
31 lines
726 B
JSON
31 lines
726 B
JSON
{
|
|
"MaxCount": 32,
|
|
"Drawable": {
|
|
"Type": "SkImageDrawable",
|
|
"Path": "images",
|
|
"Name": "index8.png",
|
|
"Columns": 1,
|
|
"Rows": 1
|
|
},
|
|
"Code": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.rate = 0.5;",
|
|
" effect.scale = 0.1;",
|
|
"}",
|
|
"",
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 5;",
|
|
" float a = radians(mix(-30, -80, rand(p.seed)));",
|
|
" float s = mix(150, 200, rand(p.seed));",
|
|
" 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": []
|
|
} |