Details
-
Technical task
-
Resolution: Unresolved
-
P2: Important
-
None
-
None
Description
Lottie has a mechanism where a layer is set to exist for a specific time period. We should map this to the visible property in Qt Quick.
There is some POC work already: https://codereview.qt-project.org/c/qt/qtdeclarative/+/638471 (and the equivalent mapping in Qt Lottie), but a better approach might be to generate a global "frame number animation" which knows the frame rate of the document and lets you query the current frame. Then the visibility could be handled simply with:
visible: globalFrameAnimation.frame >= startFrame && globalFrameAnimation.frame <= endFrame
This might be useful in other cases as well, since referring to frame numbers is common in Lottie.