mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-14 06:22:24 +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`.