Jump to content
Search Community

Scrolltrigger snap - how does it work ?

oligsap test
Moderator Tag

Recommended Posts

Hi,

 

I'm having trouble getting scrolltrigger snap to work. I understand when you have div/sections that are the same width/height that its 1 / total - 1. But what happens when the sections are not the same width. I made a codepen to illustrate how I think it works building an array of snap points - obviously I'm wrong but I can't figure out why.

 

Help appreciated. Thanks !

See the Pen BarMpWR by olig (@olig) on CodePen

Link to comment
Share on other sites

Hi Jack @GreenSock, yes that's exactly what I wanted. Thank you very much.

 

I'm confused, I really thought the snap breakpoints had to go from 0 to 1. It's written no where in the docs that breakpoints can be higher than 1.

 

I thought the snap was related to the progress of the scrolltrigger tween and I can't understand the math and what it is in relation with. Can you point this out please ?

 

Thank you

Olivier

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...