-
Notifications
You must be signed in to change notification settings - Fork 31
Cross-browser issues in reversing animations #399
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We'd like to look into this further but we really need a minimal repro so we can see what's going on (we weren't able to reproduce the problem ourselves). Any chance you'd be able to provide one? |
I tried to build a minimum repro from scratch but couldn't replicate the issue. I'll try keep building it up until it triggers but that's going to take a while. |
It feels like it is very sensitive to performance and timing. When I use the Animation panel in DevTools to slow down animations globally to less than x1.0 speed, the glitch doesn't trigger and the animation plays in reverse really smoothly. I'm on a MacBook Air (13-inch, Mid 2013), OSX 10.10 using latest stable and latest canary of Google Chrome. |
Is this because negative playbackRate is not working correctly as per #370 ? |
@shans, I hadn't been able to build a minimal repro and had closed issue in frustration. It might be that multiple factors come into play, such as complexity of the animation causing subtle effects in order of rendering frames queueing up all at once and the behaviours of the polyfill of which I have no idea of. For posterity I have preserved the old design over at: Although the animation plays back in reverse now but only because I had gone through several iterations of different ways to play back animations in reverse (quite interesting that there are multiple ways to do this), until I came up with a ugly hack: |
I'm trying to make full use of the Web Animations API and therefore am pushing the boundaries of this polyfill.
I have been having some issues with reversing animations.
The relevant website is: https://choreography.io/
Click on the first blue tile for the transitionary animation.
When you press the 'back' button in the top left of the website it will play the same animation but by reversing it. (You can also use Previous/Next browser history navigation)
The same behaviour is observed in their mobile versions. (Apart from ios chrome which uses webkit obviously and therefore exhibits the first-frame render glitch of Safari)
This is how the library kicks in the reverse animation:
Additionally, is the above the correct usage to reverse an animation?
Previously I had only used
player.reverse();
in the older version of the polyfill and that worked fine (as per spec I read). But the newest version of the polyfill did not play the animation anymore unless I set the currentTime to the end firstThe text was updated successfully, but these errors were encountered: