Lottie4J 1.4.0
1.4.0 Writes Lottie Files
Lottie4J 1.4.0 follows 1.3.0 with two additions needed by the AnimatorFX importer and its new Lottie export. (PR #16)
Writing files
LottieFileSaver could only save one layer as JSON. It now writes what LottieFileLoader reads:
save(Animation, File | OutputStream)writes Lottie JSON.saveDotLottie(DotLottie, File | OutputStream)writes a dotLottie archive: manifest, animations, themes, state machines, images and fonts. A version 1 manifest gets the version 1 directories (animations/,images/), any other the short ones of version 2.saveDotLottie(Animation, id, OutputStream)covers the common case of one animation, as a version 2 archive.
Animation ids that are missing or would leave their directory are refused. LottieFileSaverTest reads everything it writes back with the loader.
Audio levels
An audio layer (ty 6) carries its levels in au.lv: the left and the right channel in percent. The layer model had no place for them, so they were dropped on read and lost on write.
- New record
AudioSettingswith the animatedlevel, available asLayer.audioSettings(). - The previous canonical constructor of
Layeris kept, so code written against 1.3.0 still compiles. - The player does not play sound; the settings are read and written only.
See the full changelog for the details, or the GitHub diff between 1.3.0 and 1.4.0.