Jump to content
GreenSock

jorma

What does it mean to animate x and y?

Moderator Tag

Recommended Posts

I'm trying to move a group around in an SVG and am trying to understand how Greensock interprets {x: value, y: value} in the vars. Is there a page where this is explained? I couldn't find it in the Docs. 

Link to comment
Share on other sites

Thank you!

So, absolute values, relative to the original position in the SVG, at the start of the animation?

 

Is there a page in the docs where I could read more about this?

Link to comment
Share on other sites

1 minute ago, jorma said:

Is there a page in the docs where I could read more about this?

 

 Not really. It's just a standard translate transform, so it's really not a feature of gsap. 

https://developer.mozilla.org/en-US/docs/Web/CSS/transform-function/translate

 

7 minutes ago, jorma said:

So, absolute values, relative to the original position in the SVG, at the start of the animation?

 

Yeah, but I don't know if "absolute values" is the best term. If something is scaled, then the coordinates are going to be scaled.

 

See the Pen 3725a4a2212e288d14aa4167c1bc2753 by osublake (@osublake) on CodePen

 

  • Like 5
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.
×