Share Posted May 15, 2020 Hi Tweeners, I've been wrestling with an animation I've been working on, on and off for a few weeks, and I'm reaching out for advice as I can't seem to crack it. I've set up a basic version in the codepen, which as you can see, has circles, connected by lines, which move around a path object (the purple shapes). The circles track along the path, and i'm updating the line connection points so they're following along. In addition to that, I've also set up some scaling up and down of the circle sizes and I'm looking to also change the scale of the path. On top of all of that, I've set up different positioning of the circles depending on the breakpoint the user is in (These are defined on the SVG elements themselves). So if you resize it, you'll see that happen, and that's where my trouble comes in. So I currently have 2 trouble points: 1: When I move between breakpoints, the circles and lines disconnect. I know this is due to how i'm doing the scaling up and down of the circles (if I comment that part out, they work as expected). I'm not sure why this is, I thought it might have been the transformOrigin, but I didn't have any luck there. 2: When I resize the path object, the animation is unaffected, it continues along with the original path size. I was having a look around at the .updateTo() method that used to be available for Tweens, which I thought would have been what I was after, but see that it has been removed in v3. I figure I need to notify the animation in some way, so is there a different way of doing this in V3, or am I approaching this one in the wrong way? Any tips you could provide would be greatly appreciated! Thanks, Haydon. See the Pen wvKEyJL by haydon-gunn (@haydon-gunn) on CodePen Link to comment Share on other sites More sharing options...
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
Already have an account? Sign in here.Sign In Now