mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-12 08:52:32 +00:00
`craft_lottie::model` is the Lottie document as the file has it: one struct per object of the lottie-spec 1.0 object model (animation, assets, layers by type, transform, masks, effects, shape items, text, markers, fonts, glyphs), one field per key. `Animation::read` reads within `Limits` (bytes, nesting, layers, assets, shape items); `to_json` writes. Keys the model does not name, values of another type than expected, and layers and shape items of an unknown type stay in `extra` and are written back, so a document survives a read and a write. Animatable properties stay JSON (`Animated`) and are read with `read_prop`.
16 lines
512 B
TOML
16 lines
512 B
TOML
[package]
|
|
name = "craft-lottie"
|
|
description = "Lottie (Bodymovin) JSON: the lottie-spec 1.0 document model with a bounded reader and a writer, animated properties and their keyframes, ease tangents, bezier paths, gradients, value coercions and embedded image data URIs"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
rust-version.workspace = true
|
|
repository.workspace = true
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
serde_json = { workspace = true }
|
|
thiserror = { workspace = true }
|