Proper way to pause animations when not in view

Tofus

New Member
I'm wondering whether there is a proper way to pause requestAnimationFrame animations when the user has scrolled and the animation is not in the view anymore?requestAnimationFrame does this automatically when the browser displays another tab, but is it possible to do it when the user scrolls?
 
Back
Top