Jump to content
Search Community

Path Animation on scroll

D.Cus
Moderator Tag

Go to solution Solved by mikel,

Recommended Posts

Posted

Trying to invert so the animation give the effect of the ball removing the line as it progresses.

 

I have been playing with the value of the line under the drawSVG option but this does not appear to have the desired effect, what can I do to achieve the desired effect?

 

 

 

See the Pen abBOzzO by darren-ignition (@darren-ignition) on CodePen.

  • Solution
Posted

Hey @D.Cus,

 

Welcome to the GreenSock Forum.

 

You could use a fromTo tween

 

.fromTo(".theLine", {drawSVG: '100%'}, {drawSVG: '100% 100%'}, 0)

//Use either percentages or absolute lengths. 
//If you use a single value, 0 is assumed for the starting value, so "100%" is the same as "0 100%" and "true".
//Use a space-delimited value to define a segment like "40% 60%". 

 

Happy tweening ...

Mikel

 

  • Like 4

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