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>
38 lines
916 B
JSON
38 lines
916 B
JSON
{
|
|
"MaxCount": 2000,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 1
|
|
},
|
|
"EffectCode": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.rate = 1000;",
|
|
"}",
|
|
""
|
|
],
|
|
"Code": [
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = mix(1, 3, rand);",
|
|
" float a = radians(mix(250, 290, rand));",
|
|
" float s = mix(10, 30, rand);",
|
|
" p.vel.x = cos(a) * s;",
|
|
" p.vel.y = sin(a) * s;",
|
|
" p.pos = text(rand).xy;",
|
|
"}",
|
|
"",
|
|
"void update(inout Particle p) {",
|
|
" float4 startColor = float4(1, 0.196, 0.078, 1);",
|
|
" float4 endColor = float4(1, 0.784, 0.078, 1);",
|
|
" p.color = mix(startColor, endColor, p.age);",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": [
|
|
{
|
|
"Type": "SkTextBinding",
|
|
"Name": "text",
|
|
"Text": "SKIA",
|
|
"FontSize": 96
|
|
}
|
|
]
|
|
} |