en en en en en en en en en en en en en en en en fa en en fr hbs_lat en en en es en en en ms en de en fr en en en ca en en en en en en en en en en en de en en en en en en en en en pt en en en en en en de en en en en en en en en fr nb en en fr fr en en en en en en en fr nb en en fr fr en en en en en en fr en nb en fr en en en en en en en en en fr en nb en fr en en en en en en en en en fr en nb en fr en en en en en en en en en en de en it en en en en en en en de en en en pt en en en en en en en fr cv es tr es en en en en ms en en en en en en fr en hbs_lat en en en en en en en fr cv es tr es en en en en de en en en ca en en en en en
Sorry, Jack, I wasn't clear on the mutually exclusive issue. Total progress is obviously 0-1, no confusion there. Total time is fixed, but how it's cut up into keyframes isn't. Hence the idea of a 10-second run changing into a 20-second jog and adjusting everything thereafter. Sorry, too, that there was a lot of detail. I think I at least feel like the approach is validated: Build whatever I know initially (dummy tween or known totalTime and any keyframes to date) Add a balance progress of (1-lastProgress) that takes a balance duration of (totalTime - accumulatedKeyframeDurations) Kill tweens and then start over upon the next edit. If anyone has any ideas, I'm open to hearing them. I have to say, Jack, I've been having so much fun getting back into GSAP after a prolonged absence. GSAP makes me want to create things without necessarily first having a project to drive the effort.
Rich Shupe started following Best way to allow an end-user to edit a timeline on the fly? September 21, 2021
Rich Shupe posted a topic in GSAP
How to setup control of Tweens and Timelines together AND separately?
Rich Shupe replied to Rich Shupe's topic in GSAP
Carl, fantastic. In an isolated case, this is EXACTLY what I needed. I have to fit it in with other things going on around this, and pass in complete, and possibly reverse, event handlers, but this is an awesome start! Rich
How to setup control of Tweens and Timelines together AND separately?
Rich Shupe replied to Rich Shupe's topic in GSAP
I should add that the result I get when I try to reverse each individual tween (as when I'm using getChildren() on the timeline) is that they just pop out. Also, I like the Timeline use because all my events are set-level, not individual tween-level. So, if I play and reverse a timeline, i can use complete and reverse event handlers, etc If I play the timeline, but reverse the tweens, it's a bit more of a pain.
How to setup control of Tweens and Timelines together AND separately?
Rich Shupe posted a topic in GSAP
Hey, guys! I'm wondering the best way to setup a somewhat complex situation in which I can control tweens (TweenMax) from multiple timelines (TimelineMax) and/or from timelines and the tweens themselves. This is too involved for a CodePen, but it's likely just conceptual and I'll clarify, further. Here are some givens: I'm using drawSVG, but I think the analogy can apply to any tween. For simplicity, imagine a simple x tween in all cases 5 sets of 5 unique tweens (resulting in 25 unique tweens). need to animate each set in sequentially, but out simultaneously. that is, "1,2,3,4,5 in" and "12345 out." The rub is that I want to be able to interrupt at any time. If this is clear, I could end up with "1,2,3 (half way) in", interrupt, and then "123.5 out" That is, 1 and 2 will finish, 3 will be half-way complete, I interrupt, and the 1, 2, and the visible half of three all tween out at the same time. When I was able to animate in and out sequentially, this was super easy because all I had to do was create one timeline and reverse it. Most important to this question, I could interrupt any time and everything looked beautiful. Half-complete still reversed seamlessly. When I was asked to switch to sequential in and simultaneous out, I was no longer able to reverse with a single timeline.reversre() call any time I wanted. For my first test, I created two timelines: sequential and simultaneous. I could easily play sequential in, then set the progress of simultaneous to 1 and reverse that timeline out. All fine, but I was no longer able to interrupt the switches. For example, half way through sequential in, the non-complete timelines would obviously jump to their ends to simultaneously reverse out. Then I wondered if I could create just the 5 sequential timelines but tell each tween to reverse individually (instead of reversing the timeline). And, I would then cleanup using progress() to make sure the timeline was at 0, etc. That is: "group1timeline.play()"; interrupt half way through the 3rd tween; "all group1 tweens reverse"; group1timeline.progress(0). But, I got some odd results. I moved on to thinking about synchronizing progress for each corresponding tween in the sequential and simultaneous timelines, but thought that too complicated. Next I thought about not using TimelineMax at all. . Put each tween of a group in an array and then play and reverse each one. That seems like it will work. How would you recommend setting up 5 sets of tweens so that I could sequentially animate each set in, but interrupt and simultaneously animate only the progress thus far, out simultaneously?
“I really need to commit to using GSAP more in my daily work & demos. I love pushing native CSS animation as far as I can but every time I use GSAP I’m just blown away. Keep up the great work!”
“After searching around the web for alternatives, I found GreenSock to be the most performant.”
“The best thing about GSAP is that it just works, and it works well. On every single browser I’ve tested.”
“GSAP and CSS Transitions: I've done both, and its like comparing an F16 to a horse. Take like 10 minutes to try.”
“GSAP was a revelation for me to be compared with the introduction of jQuery.”
“Every time a new GSAP plugin is introduced, I'm close to bursting from excitement. The simplicity of the GreenSock API makes learning and applying these tools in projects such a dream.”
“I can definitely say ever since I started using GSAP, my work exponentially improved. It basically changed my life.”
“@greensock is just pure awesomeness. What more can be said?”
“I continue to be astounded by the sheer breadth of what @greensock can do. Every time I'm like "ooh, I wonder if I can do X", it turns out I can!”
Sign Up For Our Newsletter
Get the latest updates on GreenSock products, exclusive offers, and more right in your inbox.
Your information will always be kept confidential.
Thanks for signing up!
Now you'll begin receiving the latest GreenSock updates, exclusive offers, and more right in your inbox. Welcome aboard.