2.0.4 • Published 3 years ago
lottie2apng v2.0.4
Lottie-APNG
Library for converting Lottie files to APNG
Installation
npm i lottie2apng
Usage
You can use .json file.
const fs = require('node:fs');
const lottie2apng = require('lottie2apng');
(async () => {
const data = fs.readFileSync('./lottie.json');
const apng = await lottie2apng(data);
fs.writeFileSync('./res.png', apng);
})();
The above example reads lottie.json
and saves it as a res.png
in apng
Notes
This uses jsdom, so it's kinda bloated atm. Feel free to PR an alternative.
Thanks
Thanks to @MeguminSama I got the basis for making this