Run the full animation pipeline on a new Lottie file — interpolate to 48fps, recolor shoes to purple, optimize file size. Use when adding a new mascot animation from Motchi/Anirive.
Process a new Lottie animation through the full pipeline. The user provides a source file path or URL as $ARGUMENTS.
Copy/download the source Lottie to assets/mascot-NAME.json (ask the user for the animation name if not obvious from context)
Inspect the source:
python3 -c "import json; d=json.load(open('assets/mascot-NAME.json')); print(f'{d[\"fr\"]}fps, {d[\"op\"]} frames, {d[\"w\"]}x{d[\"h\"]}')"
Interpolate (two passes, 12fps → 24fps → 48fps):
python3 scripts/interpolate_lottie.py assets/mascot-NAME.json --alpha-low 80 --alpha-high 175 --no-loop
python3 scripts/interpolate_lottie.py assets/mascot-NAME.json --alpha-low 80 --alpha-high 175 --no-loop
Recolor shoes from blue to purple:
python3 scripts/recolor_lottie.py assets/mascot-NAME.json --from-color 0081DC --to-color 6200C4
Optimize (downscale + compress):
python3 scripts/optimize_lottie.py assets/mascot-NAME.json --size 256 --quality 60-80
Register in manifest.json under web_accessible_resources
Add the animation key to the ANIMS object in content-script.js
Report final frame count, fps, duration, and file size