carlson Posted March 23, 2022 Share Posted March 23, 2022 Hi all, i want to add two anim on elements "block",but these two anims are in different timelines. in the first anim i want to make block rotate from 0 to 360, in the secont anim i want to make block translateX from -200 to 0, i need these two anim sequentially, but at the start, the block translate x to -200, and then start to rotate,when the rotate done,it begin to translate x to -200. i know it can be solved in exactly one timeline, but in my real project, i do need two timeline to solve other problems, so how can i fix this problem? Thanks for your help See the Pen wvpoddg?editors=1111 by matisfire (@matisfire) on CodePen Link to comment Share on other sites More sharing options...
Solution Cassie Posted March 23, 2022 Solution Share Posted March 23, 2022 Heya! You may be looking for immediateRender:false - you're using a from tween which renders the initial 'from' position on load. Sounds like that might not be the behaviour you're after. See the Pen dyJORbM?editors=0010 by GreenSock (@GreenSock) on CodePen But saying that, I'm always cautious when people ask for solutions to a problem that's been introduced by trying to solve another unknown problem - as there's likely an easier solution to the root problem. So if this isn't what you're after, feel free to walk us through the initial problem, maybe we can find an easier way!https://en.wikipedia.org/wiki/XY_problem 1 Link to comment Share on other sites More sharing options...
carlson Posted March 23, 2022 Author Share Posted March 23, 2022 thanks Cassie! solved problem perfectly 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