Coder Social home page Coder Social logo

Theming Optimizations about dotlottie-web HOT 4 OPEN

khuynh92 avatar khuynh92 commented on May 26, 2024 1
Theming Optimizations

from dotlottie-web.

Comments (4)

theashraf avatar theashraf commented on May 26, 2024 2

@khuynh92

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.

theashraf avatar theashraf commented on May 26, 2024 1

@khuynh92

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.

theashraf avatar theashraf commented on May 26, 2024

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.

khuynh92 avatar khuynh92 commented on May 26, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.