8b6283fc98
- 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>
134 lines
3.0 KiB
JSON
134 lines
3.0 KiB
JSON
{
|
|
"MaxCount": 32,
|
|
"Duration": 1,
|
|
"Rate": 0.5,
|
|
"Life": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 20,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 0,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
},
|
|
"StartColor": [ 1, 1, 1, 1 ],
|
|
"EndColor": [ 1, 1, 1, 0.25098 ],
|
|
"Velocity": {
|
|
"Angle": 5.41052,
|
|
"Spread": 0.523599,
|
|
"Strength": {
|
|
"min": 140,
|
|
"max": 200
|
|
},
|
|
"Bidirectional": false,
|
|
"Spin": {
|
|
"min": 0.2,
|
|
"max": 0
|
|
},
|
|
"BidirectionalSpin": false
|
|
},
|
|
"Image": "images/baby_tux.png",
|
|
"ImageCols": 1,
|
|
"ImageRows": 1,
|
|
"Emitter": {
|
|
"Type": "SkLineEmitter",
|
|
"P1": { "x": 237, "y": 396 },
|
|
"P2": { "x": 214, "y": 398 }
|
|
},
|
|
"Spawn": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Force": false,
|
|
"Angle": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 280,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 340,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 140,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 200,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"Update": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Force": true,
|
|
"Angle": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 90,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 0,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 50,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 0,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkOrientAlongVelocityAffector"
|
|
}
|
|
]
|
|
} |