rive-react icon indicating copy to clipboard operation
rive-react copied to clipboard

Start playback animation at specific frame

Open annarack opened this issue 2 years ago • 1 comments

Hey!

Currently it's only possible to play/pause/stop an animation. As far as I can see it's not possible get the current frame or to jump to a specific frame or?

annarack avatar Jul 17 '23 11:07 annarack

Hello 👋 ! If you're just playing a singular animation via the animations property, you should be able to use scrub(animationName: String, value: Number) on the rive object returned from useRive() to scrub (in seconds) to the timestamp you need. This isn't possible on a state machine yet, to be able to scrub to a certain frame/time in a given state.

zplata avatar Jul 19 '23 14:07 zplata