Jump to content
Search Community

MeloWise

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by MeloWise

  1. On 9/12/2018 at 3:07 PM, GreenSock said:

    so if that code is 2.5 years old, it's still probably 1.5 years until the rest of the web catches up ;)

    It been a while since this thread had any action.

    I assume I should be using the FLIP plugin for this style of animation now?
     

  2. @ZachSaucier Thanks for the quick reply.  I will have a read on that article you posted.

    It does make sense, you're creating the tween

    onEnter: () => goToSection(section, intoAnim)
    onEnterBack: () => goToSection(section),

    Now the scrollTo y position is created and set when you enter the triggered section. But the real trick is when you create this Tween for the "window" it grabs the scroll position AT THE TIME OF THE TWEEN CREATION. Allowing the "window" scroll position to change and be correct every time. 

    gsap.to(window, {
        scrollTo: {y: section, autoKill: false},
        duration: 1
      });
    
    Thank you for the help. I will add this logic to my page.
×
×
  • Create New...