lottie-image-extract
v0.6.0
Published
Extract image from lottie JSON file.
Downloads
5
Readme
lottie-image-extract
INSTALL
npm i lottie-image-extract -g
USAGE
lit-tool extract|e .json
lit-tool e a.json
before
dir |_ a.json (lottie)
after
|_ a.json
|_ a.json.lottie.js
|_ a.json.0.png
|_ a.json.1.png
|_ a.json.2.png
...
|_ a.json.99.png
CODE
before
import a from 'a';
after
import a from 'a.json.lottie';
import {loadAnimation} from 'lottie-web';
import animationData from 'a.json.lottie';
export default {
name: 'index',
mounted() {
let {container} = this.$refs;
loadAnimation({
container,
renderer: 'svg',
loop: true,
autoplay: true,
animationData,
});
}
};