Moved image params out to SkParticleDrawable
Added a simpler circle drawable, moved drawing code out so that frame
calculation is handled by the drawable. Fixed all the sample effects,
including some size adjustments to better create the intended effect.
Bug: skia:
Change-Id: I60af9cd6262ff98352ca8ceaf6768aef9c7e164c
Reviewed-on: https://skia-review.googlesource.com/c/193029
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/resources/particles/snowfall.json b/resources/particles/snowfall.json
index dccc506..91c6690 100644
--- a/resources/particles/snowfall.json
+++ b/resources/particles/snowfall.json
@@ -22,23 +22,10 @@
},
"StartColor": [ 1, 0.999994, 0.99999, 1 ],
"EndColor": [ 0.99999, 0.999992, 1, 1 ],
- "Velocity": {
- "Angle": 1.5708,
- "Spread": 0.174533,
- "Strength": {
- "min": 10,
- "max": 30
- },
- "Bidirectional": false,
- "Spin": {
- "min": 0,
- "max": 0
- },
- "BidirectionalSpin": false
+ "Drawable": {
+ "Type": "SkCircleDrawable",
+ "Radius": 1
},
- "Image": "images/half-transparent-white-pixel.png",
- "ImageCols": 1,
- "ImageRows": 1,
"Emitter": {
"Type": "SkLineEmitter",
"P1": { "x": 61, "y": 34 },