Jump to content



Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Is there any way to have the starting y of a line or rectangle follow a circlePath while the ending y of the line remains locked? In other words, creating a pivot like action such as a engine piston or locomotive wheel piston. 


I tried rotating the line with additional TweenMax.To, but it does not create exact results.



Link to comment
Share on other sites

Hi Dave,


I'm not sure if this is a perfect solution but it could help a little:


See the Pen jaigd by rhernando (@rhernando) on CodePen


Basically is a combination of rotation and a bezier path. The reason to separate the motion in 4 tweens is that controlling everything in just one tween didn't looked good, or may I say, even worst than it looks now ;).


Also you could take a look at some canvas samples, in kineticsjs there are some amazing things and remember that the engine has a kinecticjs plugin so you can work with both.



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