airbnb / lottie-web

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

When using PlaySegments is there a way to get current frame of whole animation? Not only segment? #2874

Open HightowerPL opened 1 year ago

HightowerPL commented 1 year ago

Hi,

I need to create a section where lottie will play animation to specific frames depending on user interaction. When using playSegments method currentFrame value is based on specific segment not the whole animation. Is there a way I can play animation to specific frame and not use playSegment? Something like playTo method etc?

bodymovin commented 1 year ago

hi, you can query the animation.firstFrame that will return the offset frame from which to start counting.