skia2/resources/particles/default.json
Brian Osman 8b6283fc98 New SkCurve type with multiple curve segments
- Converted all linear force stuff into a single affector,
  used at either spawn or update time appropriately.
  The new affector can either set or adjust velocity.
- Converted lifetime to a curve.
- Removed SkRangedFloat, initial velocity params, etc.

Looks like a large addition, but that's mostly down to the
JSON getting bigger. There's a net reduction in LoC.

Bug: skia:
Change-Id: Iac7417f15f96d0313efd08c4b26dc3250b80fa77
Reviewed-on: https://skia-review.googlesource.com/c/192102
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
2019-02-15 14:10:39 +00:00

90 lines
1.9 KiB
JSON

{
"MaxCount": 4096,
"Duration": 1,
"Rate": 2000,
"Life": {
"XValues": [],
"Segments": [
{
"Constant": true,
"Ranged": true,
"Bidirectional": false,
"A0": 1,
"B0": 0,
"C0": 0,
"D0": 0,
"A1": 3,
"B1": 0,
"C1": 0,
"D1": 0
}
]
},
"StartColor": [ 1, 0.35, 0, 1 ],
"EndColor": [ 1, 0.978085, 0.627451, 1 ],
"Velocity": {
"Angle": 4.71239,
"Spread": 0.523599,
"Strength": {
"min": 10,
"max": 30
},
"Bidirectional": false,
"Spin": {
"min": 0,
"max": 0
},
"BidirectionalSpin": false
},
"Image": "images/half-transparent-white-pixel.png",
"ImageCols": 1,
"ImageRows": 1,
"Emitter": {
"Type": "SkTextEmitter",
"Text": "SKIA",
"FontSize": 96
},
"Spawn": [
{
"Type": "SkLinearVelocityAffector",
"Force": false,
"Angle": {
"XValues": [],
"Segments": [
{
"Constant": true,
"Ranged": true,
"Bidirectional": false,
"A0": 240,
"B0": 0,
"C0": 0,
"D0": 0,
"A1": 300,
"B1": 0,
"C1": 0,
"D1": 0
}
]
},
"Strength": {
"XValues": [],
"Segments": [
{
"Constant": true,
"Ranged": true,
"Bidirectional": false,
"A0": 10,
"B0": 0,
"C0": 0,
"D0": 0,
"A1": 30,
"B1": 0,
"C1": 0,
"D1": 0
}
]
}
}
],
"Update": []
}