Jump to content
Search Community

Scrolltrigger image sequence changes frames without scroll interaction

andoivrjrev test
Moderator Tag

Recommended Posts

Hey,

 

I have a little problem with my on scroll image sequence. I am quite sure it has nothing to do directly with Scrolltrigger, but maybe someone had an issue like this in the past and can give me a hint.

The image sequence works perfectly on desktop, but there is an issue at iPad and iPhone. At first the sequence works well also but if you stop scrolling (and I mean really stop, so the scrollbar is absolutely still) - sometimes the sequence jumps back like 45 frames after a while.

Has somebody ever seen something like this?

Thank you guys!

Link to comment
Share on other sites

That sounds like the side effect of the viewport height changing when the address bar shows/hides on mobile devices. By default, ScrollTrigger calls its refresh() method as soon as scrolling stops so that the start/end positions are re-calculated (hence the jump). Otherwise, they'd be inaccurate. So this isn't a bug or anything - it's a logic issue related to the viewport resizing. Your options are: 

  1. Prevent the browser from resizing. See the helper functions page.
  2. Configure ScrollTrigger so that it doesn't .refresh() on resize events. See https://greensock.com/docs/v3/Plugins/ScrollTrigger/static.config() but remember that means things may end up triggering at the wrong places after resize. You could only run that .config() call if it's a mobile device so that desktops don't get affected. 

Exciting news: the next release has a brand new feature aimed at addressing this kind of situation with an unconventional (but seemingly effective) approach. Stay tuned. :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...