Comments (4)
You're right, setting the "sid" on lottie json properties manually is not easy. We're currently working on abstracting the theme creation process in Lottie Creator, but until that happens, there is a workaround that allows you to assign slot IDs to animated color properties to match the parent shape's existing class name or ID. You can use relottie to parse the Lottie JSON into a relottie AST and traverse the AST to locate the target shapes by their class name or ID, and then modify their animated color properties' slot ID to match their parent Shapes class name or ID.
It would be nice to be able to apply theme updates using the existing class name or id, that way we don't have to manually add sid to the JSON file, or if there was a script provided that added the sid automatically based off of existing class names or ids in that are in the JSON file.
I've noted down the other two issues and have been able to replicate them. I will update you as soon as I have a fix
from dotlottie-web.
This part of the issue is fixed in [email protected] release.
Memory access out of bounds error when reverting back to default theme
Issue: Using loadThemeData, I'm running into issues when trying to revert an asset's theme back to the original data that's within the JSON file. Changing the theme works properly, but when reverting the theme back using loadThemeData("") or loadTheme(""), the manipulated property changes to black and error messages are thrown.
Will update you once the other part of the issue is resolved, thanks
from dotlottie-web.
Thanks @khuynh92 for reporting these issues. We will look into it and get back to you with an easier way to set the slot IDs
from dotlottie-web.
Will update you once the other part of the issue is resolved, thanks
Appreciate it! Thanks for the consistent status updates 🙂
from dotlottie-web.
Related Issues (20)
- Animation does not work in DotLottie Web HOT 3
- Exclude network request time from dotLottie viewer load time
- RuntimeError: table index is out of bounds HOT 2
- Implement a Marker Selection Control in dotLottie Viewer
- Including index.css interferes with other classes Type: Bug HOT 2
- `play()` after `setFrame()` resets the animation HOT 3
- AE loopOut() does not work HOT 5
- Animation lags (skips frames) when moving to the background and back to the foreground HOT 4
- Trim paths speed do not match original clip HOT 2
- High CPU load HOT 8
- This Animation don't has color HOT 1
- dotlottie-web interactivity for scroll interactions HOT 1
- TypeScript: getDotLottieInstance should be defined (vue3) HOT 1
- Live examples (and probably this package) isn't working HOT 1
- Rounded corners missing but work in @dotlottie/player-component HOT 3
- Add segment duration getter HOT 1
- Set speed
- DotLottie worker HOT 1
- Lottie matte rendering artifacts with lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dotlottie-web.