[QUESTION] About templating
See original GitHub issueSupposed to have a set of AE animations, is there any way to load them a template engine so that expressions can be handled at run time?
According to the docs I could start using TextLayer.updateDocumentData to update the text at run time:
https://github.com/airbnb/lottie-web/wiki/TextLayer.updateDocumentData
So assumed to have a text animation, I would use an expression to change the text, while using the same animation template.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:7
Top Results From Across the Web
What are some examples of 'template questions' on Quora?
“Template questions” are not simply a survey question, rather they are a question where the main subject can be replaced by any number...
Read more >Template Questions - SurveyPlanet
If you are not sure what questions to ask your participants, you can always use our pre-made templates and save time on typing...
Read more >Question Templates - WebAssign
These templates provide best practice examples of a wide variety of question types and techniques. After you have added the WebAssign templates as...
Read more >Defining Question Templates - How Can We Help?
Question templates are associated to specific game types and define the following:
Read more >Customizing Question Attributes and Templates
This page is an overview of how to hide or display attributes and sections in Question types via the init options. There are...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@bodymovin thank you I was thinking to a common parser api to traverse the
animationDatainstead of modifying “by hand”, so that to avoid any possibile typos or unsupported changes for a certain object type, like modifying aTextLayermanually etc.I will have a look at the api then. In the meanwhile I have put the ongoing project here: https://github.com/loretoparisi/lottie-adobe-after-effects-json-animation
In this example I would like to change animation speed as well:
(https://github.com/loretoparisi/lottie-adobe-after-effects-json-animation/blob/master/js/app.js#L252)
Using the
TextLayer.updateDocumentDataI can change the keyframes 💯 , but how about other properties, can do this with the lottie-api?Thank you!
Yes, the best approach is to load the animationData, traverse it to find the properties you want to update, and then pass it to lottie. If you want to update the properties after the animation has been loaded, you can use the lottie-api library https://github.com/bodymovin/lottie-api