Hey there, I was a longtime GSAP user on AS3, and now am happily using it on a JS project (and hopefully many future JS projects.)
I'm trying to figure out two problems right now.
1. In the attached codepen, at the end of the animation, I've got 4 visible blocks (out of 15) that I need to line up with one another, so they are horizontally centered in their container. I can't position them absolutely, so I need to calculate the relative offset, based on the center of the container, to animate them to. The fact that they change height during the animation also means that I can't safely calculate this position at the beginning.s
2. Related, what's the best way to handle dynamic properties? For example, should I create the movement tween above after the timeline finishes? And what's the recommended way to handle window resizing, which would necessitate recalculating the positions again?
I realize that some of the problem stems from CSS, so if anyone has any suggestions on the CSS in the code snippet as well, I'd love to hear them.
BTW - I'm using ScrollMagic as well, but the issue is the same if I remove that.
Thanks in advance for any help/suggestions! I've been really impressed with GSAP on JS.