Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
Gary

Animating the transformOrigin

Recommended Posts

Any chance transformOrigin tweening will be added to an upcoming release?  I have a bunch of uses for that if it were added.

 

The attached codepen is an example.  I wanted to rotate and move the phone simultaneously but couldn't.  To do that I would need to animate the position, rotation, and transformOrigin of the image at the same time.

 

 

Here's another example. I'd really like to Greensock-ize something like this, but that also requires animating the transform origin.

See the Pen bVgeBa by garyc (@garyc) on CodePen

  • Like 1
Link to comment
Share on other sites

This is actually a lot more complex than it may seem due to all the magic GSAP does under the hood to normalize behavior across browsers and manage transforms and offsets. Not impossible, but very tricky. And as far as I can tell, it'd be impossible to do without breaking existing code unless we create an entirely different special property for this sort of thing. That's less than ideal. 

 

Another factor is that this is a very uncommon request. If we kept hearing from people that they wanted to animate the origin, it'd help prove that it's worth us investing all the time into changing the current behavior (and adding the feature). I think I remember maybe one other person requesting it in the last 2 years. That doesn't mean it doesn't have value of course. But other enhancements would deliver more value to more people, so it's hard to justify putting those off to work on this very tricky change that almost nobody is asking for - see what I mean? Again, it's a totally valid request - I don't mean to diminish it at all. So it's pretty unlikely that we'll attack this change anytime soon. I wish we had a more positive answer for you :( But don't worry - we're hard at work trying to innovate and push things forward with the platform (as evidenced by the email that members got today, wink wink). 

  • Like 3
Link to comment
Share on other sites

Bummer. :(   I definitely understand the position, as you describe it, though.  Thanks, Jack.

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