Poylar Posted May 17, 2022 Share Posted May 17, 2022 Simple const oldtl = gsap.timeline() oldtl.to(elem, { x: 10000, onComplete: () => { const tl = gsap.timeline({ repeat: -1 }) tl.to(elem, { x: 100, opacity: 0 }) } }) How remove x 10000 after complete? Now after calling the callback and playing the animation there, I still get x 1000 every time at the beginning of the animation See the Pen gOvgyON?editors=1010 by poylar (@poylar) on CodePen Link to comment Share on other sites More sharing options...
PointC Posted May 18, 2022 Share Posted May 18, 2022 Are you asking the same thing as your other thread here? 1 Link to comment Share on other sites More sharing options...
Poylar Posted May 18, 2022 Author Share Posted May 18, 2022 46 minutes ago, PointC said: Вы спрашиваете то же самое, что и в другой вашей теме здесь? Yes, these questions are similar, but in that topic I went a little in a different direction. I just tested this and I can't figure out why my previous timeline is being called when the new timeline is repeated. Link to comment Share on other sites More sharing options...
GreenSock Posted May 18, 2022 Share Posted May 18, 2022 Your demo doesn't match your question. I don't understand what you're asking. Please elaborate or make your demo more simple/clear. 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