amapic Posted February 20, 2023 Share Posted February 20, 2023 Basically, I would like to chain 2 animations with the same element pinned If the first animation is limited by: start: "center center", end: "+=900 center" how can I start the second one as the center stays at the center ? This won't work: start: "center center", end: "+=900 center" nor this: start: "center+=900 center", end: "+=900 center" I put in the codepen an example. After the black circles reach the center of the screen, I just would like any other animation to start with the ".flex" element staying at the same place. Thanks for you help. See the Pen RwYrpaV by amoP (@amoP) on CodePen Link to comment Share on other sites More sharing options...
Solution GreenSock Posted February 21, 2023 Solution Share Posted February 21, 2023 I think it'd actually be cleaner (if I understand your goal) to just use a Timeline: See the Pen dyqGqgR?editors=0010 by GreenSock (@GreenSock) on CodePen That way you can add as much animation as you want and it'll just have to pin that element once. But if you really need to separate them out and not use a Timeline (I doubt it), you can have one ScrollTrigger set its start position to the previous one's end position: See the Pen mdGVGGp?editors=1010 by GreenSock (@GreenSock) on CodePen I hope that helps. 1 Link to comment Share on other sites More sharing options...
amapic Posted February 21, 2023 Author Share Posted February 21, 2023 That's it. Thank you. Sorry for not being clearer. 2 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