0c48681e58
Add particle "frame" enum, to allow effects relative to local, world, or velocity. Remove the "orient along velocity" and replace with a much more general orientation affector (angle curve + frame). Add an angular velocity affector to mirror the behavior of the linear velocity affector. Bug: skia: Change-Id: Ibbaaeb352c9547d00d81c7916d00148dd65ed2b9 Reviewed-on: https://skia-review.googlesource.com/c/195361 Reviewed-by: Brian Osman <brianosman@google.com> Commit-Queue: Brian Osman <brianosman@google.com>
163 lines
4.0 KiB
JSON
163 lines
4.0 KiB
JSON
{
|
|
"MaxCount": 4096,
|
|
"Duration": 1,
|
|
"Rate": 400,
|
|
"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
|
|
}
|
|
]
|
|
},
|
|
"Drawable": {
|
|
"Type": "SkCircleDrawable",
|
|
"Radius": 2
|
|
},
|
|
"Emitter": {
|
|
"Type": "SkLineEmitter",
|
|
"P1": { "x": 200, "y": 200 },
|
|
"P2": { "x": 250, "y": 200 }
|
|
},
|
|
"Spawn": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Enabled": true,
|
|
"Force": false,
|
|
"Frame": 0,
|
|
"Angle": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": -10,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 10,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
},
|
|
"Strength": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": true,
|
|
"Ranged": true,
|
|
"Bidirectional": false,
|
|
"A0": 50,
|
|
"B0": 0,
|
|
"C0": 0,
|
|
"D0": 0,
|
|
"A1": 60,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
}
|
|
],
|
|
"Update": [
|
|
{
|
|
"Type": "SkLinearVelocityAffector",
|
|
"Enabled": true,
|
|
"Force": true,
|
|
"Frame": 0,
|
|
"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": false,
|
|
"Ranged": false,
|
|
"Bidirectional": true,
|
|
"A0": 180,
|
|
"B0": -90,
|
|
"C0": -120,
|
|
"D0": -200,
|
|
"A1": 0,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkSizeAffector",
|
|
"Enabled": true,
|
|
"Curve": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": false,
|
|
"Ranged": false,
|
|
"Bidirectional": false,
|
|
"A0": 3,
|
|
"B0": 2.5,
|
|
"C0": 2,
|
|
"D0": 1.5,
|
|
"A1": 0,
|
|
"B1": 0,
|
|
"C1": 0,
|
|
"D1": 0
|
|
}
|
|
]
|
|
}
|
|
},
|
|
{
|
|
"Type": "SkColorAffector",
|
|
"Enabled": true,
|
|
"Curve": {
|
|
"XValues": [],
|
|
"Segments": [
|
|
{
|
|
"Constant": false,
|
|
"Ranged": true,
|
|
"A0": [ 0.0999616, 0.140218, 0.784314, 1 ],
|
|
"B0": [ 0.183679, 0.183692, 0.764706, 1 ],
|
|
"C0": [ 0.242647, 0.43925, 0.916667, 1 ],
|
|
"D0": [ 0.523837, 0.886396, 0.980392, 1 ],
|
|
"A1": [ 0.378665, 0.121107, 0.705882, 1 ],
|
|
"B1": [ 0.538658, 0.162534, 0.872549, 1 ],
|
|
"C1": [ 0.672143, 0.259443, 0.867647, 1 ],
|
|
"D1": [ 0.934257, 0.229599, 0.955882, 1 ]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
]
|
|
} |