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>
173 lines
4.1 KiB
JSON
173 lines
4.1 KiB
JSON
{
|
|
"MaxCount": 4096,
|
|
"Duration": 1,
|
|
"Rate": 400,
|
|
"Life": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 1,
|
|
"A1": 3
|
|
}
|
|
]
|
|
},
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"Spawn": [
|
|
{
|
|
"Type": "SkPositionOnPathAffector",
|
|
"Enabled": true,
|
|
"Input": {
|
|
"Source": "Random",
|
|
"TileMode": "Clamp",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"SetHeading": true,
|
|
"Path": "h50"
|
|
},
|
|
{
|
|
"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": -10,
|
|
"A1": 10
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 50,
|
|
"A1": 60
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"Update": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Enabled": true,
|
|
"Force": true,
|
|
"Frame": "World",
|
|
"Angle": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 90
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Cubic",
|
|
"Ranged": false,
|
|
"Bidirectional": true,
|
|
"A0": 180,
|
|
"B0": -90,
|
|
"C0": -120,
|
|
"D0": -200
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkSizeAffector",
|
|
"Enabled": true,
|
|
"Curve": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Linear",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 3,
|
|
"D0": 1.5
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkColorAffector",
|
|
"Enabled": true,
|
|
"Curve": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Linear",
|
|
"Ranged": true,
|
|
"A0": [ 0.0999616, 0.140218, 0.784314, 1 ],
|
|
"D0": [ 0.523837, 0.886396, 0.980392, 1 ],
|
|
"A1": [ 0.378665, 0.121107, 0.705882, 1 ],
|
|
"D1": [ 0.934257, 0.229599, 0.955882, 1 ]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |