bdcdf1a7c3
All curves (and path affectors) are driven by an SkParticleValue. The value can derive its value from the current defaults (age of particle or effect), or explicitly choose the other one, a random value, or any other particle value. Values can be range adjusted and support repeat, clamp, and mirror tiling. Also fixed some more issues related to resource path in the slide GUI. Bug: skia: Change-Id: I4755018d5b57ae2d5ec400d541055ca4fb542978 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/196760 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
112 lines
2.5 KiB
JSON
112 lines
2.5 KiB
JSON
{
|
|
"MaxCount": 4096,
|
|
"Duration": 1,
|
|
"Rate": 30,
|
|
"Life": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 10
|
|
}
|
|
]
|
|
},
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 1
|
|
},
|
|
"Spawn": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Enabled": true,
|
|
"Force": false,
|
|
"Frame": "World",
|
|
"Angle": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 170,
|
|
"A1": 190
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 10,
|
|
"A1": 30
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkPositionOnPathAffector",
|
|
"Enabled": true,
|
|
"Input": {
|
|
"Source": "Random",
|
|
"TileMode": "Clamp",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"SetHeading": false,
|
|
"Path": "h500"
|
|
}
|
|
],
|
|
"Update": [
|
|
{
|
|
"Type": "SkSizeAffector",
|
|
"Enabled": true,
|
|
"Curve": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Cubic",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 10,
|
|
"B0": 10,
|
|
"C0": 10,
|
|
"D0": 0,
|
|
"A1": 10,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |