Aldrin Posted August 25, 2022 Share Posted August 25, 2022 I'm trying to rotate each circle counterclockwise on its axis as well as have the circles revolve on their orbits. not sure why its not working, please help... See the Pen BaredbJ by aldrinbright (@aldrinbright) on CodePen Link to comment Share on other sites More sharing options...
GreenSock Posted August 25, 2022 Share Posted August 25, 2022 I'm not sure I understand your goal correctly, but here's one approach to making an element orbit: See the Pen vYRwWOV?editors=1010 by GreenSock (@GreenSock) on CodePen I wrapped another <g> so that I could counter-rotate the inner group while the outer group is rotating in the opposite direction. You're using some invalid ID values too, just so you know. There are many ways to accomplish the orbiting - this is one of the simpler approaches in my opinion (given your setup). 1 Link to comment Share on other sites More sharing options...
Aldrin Posted August 26, 2022 Author Share Posted August 26, 2022 this is exactly what I am looking for, but why transformOrigin : 'center center' not working here? Link to comment Share on other sites More sharing options...
Cassie Posted August 26, 2022 Share Posted August 26, 2022 It is working! See the Pen NWYVLLy?editors=0110 by GreenSock (@GreenSock) on CodePen If you add an outline you can see. 2 Link to comment Share on other sites More sharing options...
Aldrin Posted August 26, 2022 Author Share Posted August 26, 2022 ok got it, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now