Hi!
I've been lurking at GSAP for a while now and just started working on something to give it a try. I'm trying to achieve a fairly simple effect based on horizontal scrolling.
The idea is to have an #intro that would slide out first, from right to left, and when it's out of the viewport, scroll through the whole .container.
Something like this, but horizontally : https://codyhouse.co/demo-tutorials/revealing-hero-effect/index.html
I believe I understand the different properties of ScrollTrigger but can't make up my mind for the right way of doing so... Especially since it's pretending to be horizontal scroll — I'm struggling to use start/end properly and trigger animation when I actually want them to trigger?
Here is the "to-do" I'm picturing:
1 - Have the .container pinned
2 - Scroll through the #intro thanks to scrub
3- Unpin .container when #intro is out of the viewport (end: -=50%)
Since some of my objects are full screen, I can't really use their position to trigger stuffs. Therefore, shall I use an empty absolute div to act as a set trigger?
Do you see another way, a better way of doing so?
All my "modules" will be the same size if it changes anything, but I don't know how many there will be. Therefore, I like the dynamic calculation.
Any help greatly appreciated
C.