aboutsummaryrefslogtreecommitdiffhomepage
path: root/resources
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2018-02-23 11:10:22 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-23 19:15:26 +0000
commit1022f743758b71bcc476e602679282a0acd64ff1 (patch)
tree3380edf89e0458408d7d0b63227e9116839f9b39 /resources
parent09f818d2c9c0b82ef5417a7f1d0f2a5ea09fc682 (diff)
[skottie] Nested animation support
Extend composition layers to support referencing external .json animations ("$"<PATH> syntax). This is a custom extension (not supported in BM/Lottie). Also make skottie::Animation ref-counted, to facilitate sharing. TBR= Change-Id: I062d031e5868d759f3930dea9b261f9b3ec81684 Reviewed-on: https://skia-review.googlesource.com/109806 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'resources')
-rw-r--r--resources/skotty/skotty_sample_nested.json96
1 files changed, 96 insertions, 0 deletions
diff --git a/resources/skotty/skotty_sample_nested.json b/resources/skotty/skotty_sample_nested.json
new file mode 100644
index 0000000000..8059b76ba9
--- /dev/null
+++ b/resources/skotty/skotty_sample_nested.json
@@ -0,0 +1,96 @@
+{
+ "v":"4.6.9",
+ "fr":60,
+ "ip":0,
+ "op":200,
+ "w":800,
+ "h":600,
+ "nm":"External Animation",
+ "ddd":0,
+
+
+ "layers":[
+ {
+ "ddd":0,
+ "ind":2,
+ "ty": 0,
+ "nm":"External Animation Ref",
+ "refId": "$skotty_sample_1.json",
+ "ao": 0,
+ "ip": 0,
+ "op": 300,
+ "st": 0,
+ "sr": 1,
+ "bm": 0,
+ "ks": {
+ "o": { "a":0, "k":100 },
+ "r": { "a":1, "k":[
+ { "s": 0, "e": 360, "t": 0 },
+ { "t": 200 }
+ ]},
+ "p": { "a":0, "k":[ 400, 300, 0 ] },
+ "a": { "a":0, "k":[ 200, 100, 0 ] },
+ "s": { "a":1, "k":[
+ { "s": [ 50, 50, 50 ], "e": [ 200, 200, 200 ], "i": { "x":0, "y":0.5 }, "o": { "x":0.5, "y":0.8 }, "t": 0 },
+ { "s": [ 200, 200, 200 ], "e": [ 50, 50, 50 ], "i": { "x":0.5, "y":0.2 }, "o": { "x":1, "y":0.5 }, "t": 100 },
+ { "t": 200 }
+ ] }
+ }
+ },
+
+ {
+ "ddd":0,
+ "ind":1,
+ "ty":4,
+ "nm":"Custom Path 1",
+ "ao": 0,
+ "ip": 0,
+ "op": 300,
+ "st": 0,
+ "sr": 1,
+ "bm": 0,
+ "ks": {
+ "o": { "a":0, "k":100 },
+ "r": { "a":0, "k":0 },
+ "p": { "a":0, "k":[ 400, 300, 0 ] },
+ "a": { "a":0, "k":[ 0, 0, 0 ] },
+ "s": { "a":1, "k":[
+ { "s": [ 50, 50, 50 ], "e": [ 200, 200, 200 ], "i": { "x":0, "y":0.5 }, "o": { "x":0.5, "y":0.8 }, "t": 0 },
+ { "s": [ 200, 200, 200 ], "e": [ 50, 50, 50 ], "i": { "x":0.5, "y":0.2 }, "o": { "x":1, "y":0.5 }, "t": 100 },
+ { "t": 200 }
+ ] }
+ },
+
+ "shapes":[
+ {
+ "ty":"gr",
+ "it":[
+ {
+ "ty": "el",
+ "nm": "Ellipse",
+ "p" : { "a": 0, "k": [ 0, 0 ] },
+ "s" : { "a": 0, "k": [ 400, 400 ] }
+ },
+
+ {
+ "ty": "fl",
+ "nm": "Fill",
+ "o" : { "a": 0, "k": 30 },
+ "c" : { "a": 0, "k": [ 0.5, 0.5, 1 ] }
+ },
+
+ {
+ "ty":"tr",
+ "p" : { "a":0, "k":[ 0, 0 ] },
+ "a" : { "a":0, "k":[ 0, 0 ] },
+ "s" : { "a":0, "k":[ 100, 100 ] },
+ "r" : { "a":0, "k": 0 },
+ "o" : { "a":0, "k":100 },
+ "nm": "Transform"
+ }
+ ]
+ }
+ ]
+ }
+ ]
+}