Samsung / rlottie

A platform independent standalone library that plays Lottie Animation.
Other
1.15k stars 223 forks source link

support dotLottie format. #541

Closed hermet closed 1 year ago

hermet commented 1 year ago

DotLottie is a new standard for the Lottie file format. Essentially, it's a compilation of animations that encapsulates multiple Lottie animations into one zipped file. More information on its structure can be found here: https://dotlottie.io/structure/#dotlottie-structure

This implementation borrows certain elements from the unzipping functionality found at https://github.com/kuba--/zip, an open-source project distributed under the No License.

Tests have been carried out using the file '1st_animation.lottie' located in the 'examples/resource' directory.

kudanai commented 1 year ago

When parsing .lottie for the first animation, you should ignore "manifest.json" if you're not using it. It depends on the zip packing order and there is no guarantee that the animation itself will be the first .json you will encounter.

hermet commented 1 year ago

When parsing .lottie for the first animation, you should ignore "manifest.json" if you're not using it. It depends on the zip packing order and there is no guarantee that the animation itself will be the first .json you will encounter.

Or we might need to update the doc, since this specification: image

kudanai commented 1 year ago

Good suggestion. Will follow up on dotLottie docs repo here https://github.com/dotlottie/doc

hermet commented 1 year ago

Good suggestion. Will follow up on dotLottie docs repo here https://github.com/dotlottie/doc

Come to think of it, changing the spec at this time would lead the compatibility break. So I don't think it's a good idea.

kudanai commented 1 year ago

I will add a suggestion there instead for reference for future implementations to be aware of this limitation