airbnb / lottie-web

Render After Effects animations natively on Web, Android and iOS, and React Native. http://airbnb.io/lottie/
MIT License
30.65k stars 2.88k forks source link

Update text layers on paused animations - Rendering isn't occur #2297

Open oronevron opened 4 years ago

oronevron commented 4 years ago

Hello!

I'm using version 5.7.3 of this wonderful package. One of my application's flows is to update text, color, etc. on text layers. I'm doing so by calling to TextLayer.updateDocumentData function. While the animation is on playing mode it works well, but when the animation is paused, the changes to the text aren't rendering to the animation. They are rendered only after I'm changing the current rendering frame (e.g. play the animation, go to frame and play, go to frame and stop). I didn't find any way to do a re-render of the current rendering frame, forced render or something like that. I'm using the SVG renderer.

I really need the ability to update text layers and see the changes in real time also on paused animations. Thanks in advance for any help!

bodymovin commented 4 years ago

that's correct. At the moment render will update only if the animation is playing. As a workaround you can try rendering the previous frame and the next one.

oronevron commented 4 years ago

Thank you for your answer @bodymovin ! The problem with your suggested workaround is that the user will experience that frames "jumping", since each frame is different, and the need is to only update the text layer without rendering other frame or change the playing state at all. There is no option to add a force-render function that will re-render the current frame? It sounds like a pretty useful feature. I can try to help if it's possible.