Jump to content
Search Community

Stop item animation on path

ninmorfeo test
Moderator Tag

Recommended Posts

Is there any way to stop the elements that move on the path in a certain position?

 

In the example in question, I would like the squares at the end of the animation to be positioned equidistantly on the bezier curve.

 

I could divide the length of the curve by the number of elements but I don't know how to stop them.

See the Pen KKwGBwy by Ninmorfeo (@Ninmorfeo) on CodePen

Link to comment
Share on other sites

Hey ninmorfeo,

 

Good question. The end property is perfect for this sort of thing:

See the Pen povxZrK?editors=0010 by GreenSock (@GreenSock) on CodePen

 

Check out the MotionPathPlugin docs for more details and other properties. They're not too thorough at this point but we're working on improving them.

 

Another resource that may help you understand how to work with motion paths is this helper function that animates the drawing of a line to specific anchor points.

  • Like 3
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...