Jump to content
GreenSock

jorma

Animate attributes with Bezier plugin

Moderator Tag

Recommended Posts

I'm trying to move some circles around with the Bezier Plugin. However, when I animate the cx and cy they are animated in the style. Not the actual attributes. How do I animate the attributes?

 

<circle id="mycircle" cx="250" cy="250" r="10" style="fill: rgb(0, 0, 238); stroke: rgb(238, 238, 238); stroke-width: 3px; cy: 422px; cx: 167px;"></circle>

See the Pen zYYJVEW by jormaturkenburg (@jormaturkenburg) on CodePen

Link to comment
Share on other sites

I don't think that is possible, at least not directly. Why are you trying to animate attributes anyways? What's wrong with letting it do x and y transforms?

Link to comment
Share on other sites

I'm not sure I understand what you mean with letting it do x and y transforms. At the moment it is animating cx and cy in the style. How do I let it do x and y transforms?

 

Thx

Link to comment
Share on other sites

Another alternative: GSAP 3's MotionPathPlugin makes movement along a path easy! You should check it out :) I'd recommend still using x and y or a <path> when using it though.

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