Hey guys,
This is a general question - I am trying to understand how the position attribute is converted to scroll distance when a timeline is hooked up to a scrubbed ScrollTrigger.
So if we take a look at the CodePen below, we first show the "home page" and then 10 seconds later we hide it to the side.
tl.from('.page-home', {
xPercent: -100
}).to('.page-home', {
xPercent: 100
}, "+=10")
This is meant to work with a time delay (i.e. wait 10 seconds before moving the page to the right) but when apply a ScrollTrigger with the scrub option enabled, our animation is now linked to the scroll position so the +=10 is no longer a time delay. Could someone please explain how is the "+=10" position attribute converted to a scroll distance / pixels? I'm trying to understand if this is the right approach to tell ScrollTrigger "wait X pixels in this position before continuing" or if I'm meant to use something else.
Your help would be much appreciated!