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>
136 lines
3.1 KiB
JSON
136 lines
3.1 KiB
JSON
{
|
|
"MaxCount": 32,
|
|
"Duration": 1,
|
|
"Rate": 0.5,
|
|
"Life": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 20
|
|
}
|
|
]
|
|
},
|
|
"Drawable": {
|
|
"Type": "SkImageDrawable",
|
|
"Path": "images/baby_tux.png",
|
|
"Columns": 1,
|
|
"Rows": 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": 10,
|
|
"A1": 70
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 140,
|
|
"A1": 200
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"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": 180
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 50
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkOrientationAffector",
|
|
"Enabled": true,
|
|
"Frame": "Velocity",
|
|
"Angle": {
|
|
"Input": {
|
|
"Source": "Age",
|
|
"TileMode": "Repeat",
|
|
"Left": 0,
|
|
"Right": 1
|
|
},
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Type": "Constant",
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |