lottie-constructor
is a command-line tool that converts a sequence of PNG frames into a Lottie JSON animation file. This tool is useful for creating animations in Lottie format from individual image frames.
- Converts PNG frames to a Lottie JSON animation.
- Supports specifying input directory, output file, and frame rate.
Ensure you have Node.js installed on your system.
To install the package globally and use it from the command line, run:
npm install -g lottie-constructor
lottie-constructor [options]
Options
- -v :version
- -i, --input 'dir' : Input directory containing PNG frames. Defaults to the current directory (./).
- -o, --output 'file' : Output Lottie JSON file. Defaults to output.json.
- -f, --framerate 'rate': Frame rate of the animation. Defaults to 24.
ex: lottie-constructor -i /path/to/frames -o /path/to/output.json -f 30
the tool by default will assign the input directory to the current directory ./
if -i
is not provided, also the frame rate -f
by default i will be 24