skia2/resources/particles/penguin_cannon.json
Brian Osman 5c1f8eb094 Various particle system improvements
Effects now have a duration, and can be played looped
or one-shot. Added a second list of affectors that are
applied at spawn vs. update.

Effects grab and store the SkRandom at construction,
so it no longer needs to be passed to update().

Bug: skia:
Change-Id: Ib54d60466e162e4d4b70fa64c1215fc01680d47a
Reviewed-on: https://skia-review.googlesource.com/c/191722
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
2019-02-14 20:19:08 +00:00

41 lines
814 B
JSON

{
"MaxCount": 32,
"Rate": 0.5,
"Life": {
"min": 20,
"max": 20
},
"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 }
},
"Update": [
{
"Type": "SkDirectionalForceAffector",
"Force": { "x": 0, "y": 50 }
},
{
"Type": "SkOrientAlongVelocityAffector"
}
]
}