mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 08:52:32 +00:00
The encodings every Lottie layer, mask and shape reuses, on serde_json values: the document header, animatable properties and their keyframes (legacy end values, hold keys, spatial tangents), ease tangents to and from speed and influence, bezier paths, gradient stop lists, the tolerant number and colour readers, and embedded images as data URIs. Taken from effectcraft crates/lottie at e18f48fb (anim.rs, shapes.rs, import.rs, export.rs, base64.rs) with EffectCraft's project types replaced by plain values. The layer, shape, effect and text mapping stays in EffectCraft, and dotLottie is ZIP, which is not this crate's format.
52 lines
1.4 KiB
JSON
52 lines
1.4 KiB
JSON
{
|
|
"v": "5.12.0",
|
|
"nm": "Bouncing Ball",
|
|
"fr": 30,
|
|
"ip": 0,
|
|
"op": 30,
|
|
"w": 200,
|
|
"h": 200,
|
|
"ddd": 0,
|
|
"assets": [],
|
|
"layers": [
|
|
{
|
|
"ddd": 0,
|
|
"ind": 1,
|
|
"ty": 4,
|
|
"nm": "Ball",
|
|
"sr": 1,
|
|
"ks": {
|
|
"a": { "a": 0, "k": [0, 0, 0] },
|
|
"p": {
|
|
"a": 1,
|
|
"k": [
|
|
{ "t": 0, "s": [100, 40, 0], "o": { "x": 0.33, "y": 0 }, "i": { "x": 0.67, "y": 1 }, "to": [0, 0, 0], "ti": [0, 0, 0] },
|
|
{ "t": 15, "s": [100, 160, 0], "o": { "x": 0.33, "y": 0 }, "i": { "x": 0.67, "y": 1 }, "to": [0, 0, 0], "ti": [0, 0, 0] },
|
|
{ "t": 30, "s": [100, 40, 0] }
|
|
]
|
|
},
|
|
"s": { "a": 0, "k": [100, 100, 100] },
|
|
"r": { "a": 0, "k": 0 },
|
|
"o": { "a": 0, "k": 100 }
|
|
},
|
|
"ao": 0,
|
|
"ip": 0,
|
|
"op": 30,
|
|
"st": 0,
|
|
"bm": 0,
|
|
"shapes": [
|
|
{
|
|
"ty": "gr",
|
|
"nm": "Ball",
|
|
"it": [
|
|
{ "ty": "el", "nm": "Circle", "d": 1, "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [40, 40] } },
|
|
{ "ty": "fl", "nm": "Fill", "c": { "a": 0, "k": [0.95, 0.35, 0.2, 1] }, "o": { "a": 0, "k": 100 }, "r": 1 },
|
|
{ "ty": "tr", "a": { "a": 0, "k": [0, 0] }, "p": { "a": 0, "k": [0, 0] }, "s": { "a": 0, "k": [100, 100] }, "r": { "a": 0, "k": 0 }, "o": { "a": 0, "k": 100 } }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"markers": []
|
|
}
|