Jump to content
Search Community

ScrollMagic horizontal scroll with anchor navigation

ArekSz test
Moderator Tag

Recommended Posts

Hey ArekSz and welcome to the GreenSock forums!

 

First off, ScrollMagic isn't a GreenSock product and we don't really recommend it. You can create the same effect without it. In fact, GreenSock is in the process of making a scroll plugin for GSAP that will be able to handle things like this more easily!

 

But you have two issues: Your calculation of the distance is off (you shouldn't subtract out the viewport's width / 2) and you didn't change the ease of the tween for your scroll tween to none. Fixing those issues fixes the effect:

See the Pen jObqNLO?editors=0010 by GreenSock (@GreenSock) on CodePen

 

We highly recommend using GSAP 3 because it has a smaller file size, sleeker API, and a bunch of new features!

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