Jump to content
GreenSock

Justin Erswell

Use complex SVG polygon zoom through to background backround divs and scroll snap

Go to solution Solved by Cassie,

Recommended Posts

I have some code which allows me to scroll and 'fly through' a polygon. I need to, when this process completes load the first in a list on 'n' divs (n=11 in this example) and then scroll through those snapping to the next if a certain point is hit.

 

I have been really trying to sort this but now I cannot see my original 'Fly Through' andI think I am in a muddle. Any help would be received gratefully by my self and the kids who are having to up with dad at is computer on a Sunday.

 

Thanks GSAP crew you're awesome!

See the Pen abyLWjv by erswelljustin (@erswelljustin) on CodePen

Link to comment
Share on other sites

  • Solution

Hey there!

 

There's a lot going on here so I struggled to work out exactly what it is that you're attempting to do.

That being said, the section you're using as a trigger 'section.lhg' has no height.

You're saying 'end when the bottom reaches the bottom' and the bottom is already right up at the top when the animation starts. So it never plays.

 

You can solve this by setting a px based end like so...

See the Pen dyzVJNr?editors=0011 by GreenSock (@GreenSock) on CodePen


 

(Although this seems to be causing more issues, again - not sure what the end result you're going for is, but happy to offer further help if you can explain.)

I hope this points you in the right direction!
 

  • Like 1
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.
×