Jump to content
Search Community

Clip Path Animation. Left side jumps end???

tslevack
Moderator Tag

Recommended Posts

Posted

Just starting out.  Trying to animate clip-path on scroll. It's working but the left side doesn't transition out.. It just jumps to end, the the right side plays fine.   Can anyone see what Im missing??? thanks

 

T

See the Pen zYyQOJQ by tlevack (@tlevack) on CodePen.

Posted

Hi @tslevack welcome to the forum!

 

I've changed your inset clip-path to a polygon one, which does not have that jump. Personally I've never used an inset() clip-path, so I don't know what it needs exactly. I always use https://bennettfeely.com/clippy/ to create my clip-path's which always works perfect for me (keep in mind that you will need to suffix every number with a % sign, to fix unexpected results) 

 

Also the ScrollTrigger object does not have a property called ease. The snap property does, but your are not using that, or if you want all your tweens to have a default ease you can set it in the defaults: {} object. I've set it to none, which 'feels' nice with scrubbed ScrollTriggers, but change it to what ever you like. 

 

Hope it helps and happy tweening! 

 

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

  • Like 2
Posted

Hi @tslevack and welcome to the GSAP forums!

 

This seems related to the fact that the last value jumps to zero as the animation starts.

 

A solution is to use a polygon instead:

See the Pen oNJRjNL by GreenSock (@GreenSock) on CodePen.

 

Hopefully this helps.

Happy Tweening!

  • Haha 1
Posted

Thank you both.   I will try this method.  

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