Jump to content
Search Community

ClipPath Scrolltrigger Scrub animation

terrorbyrd test
Moderator Tag

Recommended Posts

Hi @terrorbyrd welcome to the forum and thanks for being a club member! 

 

When animating clip-path (or complex strings) with GSAP it is best to have the same amount of points and have everything have the same suffix. I've written some things down to explain things better, check out the post below. 

 

 

Next to that your issue at the moment is that your ScrollTrigger is done before it has even started. I've disabled all your ScrollTriggers and just left the one you're having issues with. ScrollTrigger works by animating a tween between the start and end markers hooked to the scrollbar. When the green markers touch the animation starts. and when the end markers touch it ends, but as you can see in your case the red marker is already past the end before the green markers has even touched, so ScrollTrigger sees it needs to start and then directly jumps to the end. You can easily fix this by setting end:  "bottom 80%" in your ScrollTrigger. Hope it helps and happy tweening! 

 

Side note: When wanting to tween percent based values, be sure to use xPercent and yPercent, then you can just use numbers instead of strings 

 

See the Pen abxdaEW?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

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