I am currently working on a project in order to allow a user to preview a short animated template (e.g. for a video title) online, and fill out details such as title text or theme colours. Ideally, I'd like to be able to use After Effects templates through Bodymovin, and have the template preview update whenever inputs are changed.
While properties like colour and font size seem trivial, I have been looking at modifying text during runtime, and have gotten stuck.
While I am able to modify the keyframe data and call element.buildNewText to force it to update, buildNewText (in the case of the SVG renderer) looks at the list of letters in the keyframe data generated by the dataManager. Hence, it still displays the old text.
Is there any way to force this letter information to update in a relatively performant way? Or alternatively, some way to avoid using that letter info at all and not split data by characters? I won't be needing any advanced character effects that I believe would need this.
I've added a method "updateDocumentData" that will allow to update texts dynamically.
More here:
https://github.com/bodymovin/bodymovin/wiki/TextLayer.updateDocumentData
can i do the same for iOS ?
@astrokin I don't think you can, but you should post the question on the iOS repo.
https://github.com/airbnb/lottie-ios
@bodymovin thank you for response. I've already did it.
Most helpful comment
I've added a method "updateDocumentData" that will allow to update texts dynamically.
More here:
https://github.com/bodymovin/bodymovin/wiki/TextLayer.updateDocumentData