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>
66 lines
1.5 KiB
JSON
66 lines
1.5 KiB
JSON
{
|
|
"MaxCount": 1000,
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"EffectCode": [
|
|
"void effectSpawn(inout Effect effect) {",
|
|
" effect.rate = 200;",
|
|
"}",
|
|
""
|
|
],
|
|
"Code": [
|
|
"void spawn(inout Particle p) {",
|
|
" p.lifetime = 3 + rand;",
|
|
" p.vel.y = -50;",
|
|
"}",
|
|
"",
|
|
"void update(inout Particle p) {",
|
|
" p.pos.x = wave(p.age);",
|
|
" p.color = color(p.age);",
|
|
"}",
|
|
""
|
|
],
|
|
"Bindings": [
|
|
{
|
|
"Type": "SkCurveBinding",
|
|
"Name": "wave",
|
|
"Curve": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Cubic",
|
|
"Ranged": true,
|
|
"Bidirectional": true,
|
|
"A0": -20,
|
|
"B0": 50,
|
|
"C0": -30,
|
|
"D0": -10,
|
|
"A1": 20,
|
|
"B1": 60,
|
|
"C1": -20,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkColorCurveBinding",
|
|
"Name": "color",
|
|
"Curve": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Linear",
|
|
"Ranged": true,
|
|
"A0": [ 1, 0, 0, 1 ],
|
|
"D0": [ 1, 0.735294, 0, 1 ],
|
|
"A1": [ 1, 0.588235, 0, 1 ],
|
|
"D1": [ 0.941177, 1, 0, 1 ]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |