Jump to content
Search Community

Control second timeline in with ScrollMagic

marko krstic test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

If I understand your question correctly, I think setting up a two timelines and a second trigger for each section would be the way to go. The opacity --> 1 tween plays when the section hits the first trigger and then the opacity --> 0 tween plays when the element is 80% of the way through the scroll. This is all assuming you want the tweens to play with their actual duration.


If you're trying to have them play as the user scrolls then one timeline would be fine. Just set the second tween to play later with a relative position, delay or label.


Make sense? Happy tweening.


  • Like 2
Link to comment
Share on other sites

You don't need two loops and two controllers. I just meant to make a second scene for each section in the each() loop. You can then set the same trigger hook and just offset the second scene by 80% of the element height.


I think something like this should work for you.

See the Pen GVqbMK by PointC (@PointC) on CodePen

Make sense? Happy tweening.



  • Like 2
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...