Delos Posted May 22, 2020 Share Posted May 22, 2020 Hello there! Very new to Gsap. I have had some difficulty wrapping my head around how to maintain the circles position while rotating and scaling either up or down as seen in the codepen example. I've tried looking around the forum and google, yet no luck. Would love some assistance. See the Pen pojGqPe by ronbabious (@ronbabious) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted May 22, 2020 Share Posted May 22, 2020 Hey Delos and welcome to the GreenSock forum! The main issue here is that you're wanting the transform/svgOrigin of the elements to be in two different places at once: For the rotation you want it to be the center of the larger circle. For the scaling, you want it to be the center of each smaller circle. Unfortunately you can't have origins for specific properties like that. There's a few different avenues that you can use to accomplish what you're trying to accomplish though: Animate a containing element for the movement and the individual circles for the scale. By applying each animation to different elements, you can have a different origin for each animation. Use a different method of rotating the circles that doesn't rely on an origin. For example one that uses GSAP's MotionPathPlugin: I used the first approach here: See the Pen pojGBBp?editors=0010 by GreenSock (@GreenSock) on CodePen For more information about timelines, see the timeline docs and the position parameter page 2 Link to comment Share on other sites More sharing options...
Delos Posted May 22, 2020 Author Share Posted May 22, 2020 AMAZING! This helped a lot appreciate the help ❤️ 1 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