Can ThorVG Replace Lottie Animation Text and Color Dynamically at Runtime? #3802
-
|
We are creating Lottie assets where both the text and color need to be customized based on client input. Example of text are like "Congratulations John you have won" The work john would be a placeholder replaced based on user name provided programitically Does ThorVG provide a way to dynamically replace
If yes, can you share code samples, best practices, or references to relevant documentation/examples? If not, are there any recommended workflows or workarounds for this use case with ThorVG? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
|
Hey, @manishagarwal23 We'd recommend using Slot API for any dynamic change in runtime with Lottie asset, supporting TextDoc, Color and ETC. Plase note, mostly text asset in the Lottie animation is rendered via Shape. Thus if you want to change letters by simply putting new string, your asset should load text via font data. |
Beta Was this translation helpful? Give feedback.
-
|
@manishagarwal23 fyi, Current Lottie doesn't have layout system. Please make sure to account for how the animation will appear if the username is longer than your design. Your design can be potentially broken by it. |
Beta Was this translation helpful? Give feedback.
-> #3833