skia2/resources/particles/explosion.json
Brian Osman bdcdf1a7c3 Add SkParticleValue to allow further customization of curve behavior
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>
2019-03-04 22:04:17 +00:00

118 lines
2.6 KiB
JSON

{
"MaxCount": 32,
"Duration": 1,
"Rate": 8,
"Life": {
"Input": {
"Source": "Age",
"TileMode": "Repeat",
"Left": 0,
"Right": 1
},
"XValues": [],
"Segments": [
{
"Type": "Constant",
"Ranged": true,
"Bidirectional": false,
"A0": 1,
"A1": 3
}
]
},
"Drawable": {
"Type": "SkImageDrawable",
"Path": "images/explosion_sprites.png",
"Columns": 4,
"Rows": 4
},
"Spawn": [
{
"Type": "SkPositionInCircleAffector",
"Enabled": true,
"SetHeading": true,
"X": {
"Input": {
"Source": "Age",
"TileMode": "Repeat",
"Left": 0,
"Right": 1
},
"XValues": [],
"Segments": [
{
"Type": "Constant",
"Ranged": false,
"Bidirectional": false,
"A0": 0
}
]
},
"Y": {
"Input": {
"Source": "Age",
"TileMode": "Repeat",
"Left": 0,
"Right": 1
},
"XValues": [],
"Segments": [
{
"Type": "Constant",
"Ranged": false,
"Bidirectional": false,
"A0": 0
}
]
},
"Radius": {
"Input": {
"Source": "Age",
"TileMode": "Repeat",
"Left": 0,
"Right": 1
},
"XValues": [],
"Segments": [
{
"Type": "Constant",
"Ranged": false,
"Bidirectional": false,
"A0": 60
}
]
}
}
],
"Update": [
{
"Type": "SkPointForceAffector",
"Enabled": true,
"Point": { "x": 200, "y": 200 },
"Constant": 0,
"InvSquare": -50
},
{
"Type": "SkFrameAffector",
"Enabled": true,
"Curve": {
"Input": {
"Source": "Age",
"TileMode": "Repeat",
"Left": 0,
"Right": 1
},
"XValues": [],
"Segments": [
{
"Type": "Linear",
"Ranged": false,
"Bidirectional": false,
"A0": 0,
"D0": 1
}
]
}
}
]
}