We identified and fixed compatibility issues in lottie.json and added new interactive features to the Lottie Viewer.
js/: Modularized application logic (ES Modules).main.js: Entry point.player.js: Lottie player logic.layers_*.js: Layer management.analyze.js,fix.js,export.js: Tools.
json/: Lottie animation files.index.html&style.css: The Viewer UI.server.js: Local development server (Required).
A new sidebar on the left lists available JSON files.
- Dynamic Access: The viewer connects to the local server to see files in real-time.
- Refresh Icon: A refresh button updates the list without reloading the page.
- Functionality: Allows realtime tinting of Shape, Text, Precomp, and Solid layers.
- Smart Detection: automatically detects and displays the current color of the layer.
- Target: Updates the
fillandstrokeof all SVG elements inside the layer or group.
- Analyze Button: Scans the current animation for compatibility issues.
- Fix Button [NEW]: Instantly fixes common issues in the currently loaded animation (in-memory).
- Removes Expressions (which cause crashes).
- Removes Merge Paths (unsupported on Android).
- Removes/Converts Effects (unsupported).
- Workflow: Load -> Analyze -> Fix -> Download.
- Download Button: Downloads the current state of variables (fixed/modified) as a new JSON file.
Important
Running the Application: You must run the server to view the app.
- Open Terminal.
- Run:
node server.js - Open Browser:
http://localhost:8000
- Load File: Select
lottie.json. - Analyze: Click "Analyze". Note the errors.
- Fix: Click the green "Fix" button.
- Confirm the prompt.
- An alert will show what was fixed.
- The player reloads automatically.
- Re-Analyze: Click "Analyze" again. Errors should be gone.
- Download: Click "Download" to save the
_exported.jsonversion.
json/lottie_fixed.json: The patched file.server.js: Development server.js/script.js&style.css: Updated viewer.