Jump to content
Search Community

Tweens with different transformOrigins

gpalmer test
Moderator Tag

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

Hello,

I am trying to tween a shape that does the following:

  • scales at its center point
  • rotates around some external point
  • moves the external point that it rotates around along a curved path

To give a clearer picture of what I am trying to accomplish I have included a sample code pen demonstrating the animation requirements. The target shape is the red box where the line and blue box are there only as guides.  

 

I was hoping to find a way to tween the red box without having to wrap it in the positionDiv and rotationDiv divs used in the sample.

Thanks for your help,

 

Gerry

See the Pen vLpGPV by anon (@anon) on CodePen

Link to comment
Share on other sites

Thanks so much for the cool demo. Very helpful.

 

Frankly, nothing comes to mind that doesn't involve some sort of nesting like you have. It's possible someone else may have an idea, but I'm not seeing it at the moment.

 

As a side note, if you want to use an SVG path as the actual motion guide for an object check out Animate along an SVG path: http://greensock.com/morphsvg-update 

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