Hi! I just start learning gsap and have some problems with synchronization inside timeline.
So, here is idea:
1) Element hero-title-trigger-1($gradientTitle) on scroll transforming(scale, move);
2) Elements hero-title-trigger-2 word on scroll move from bottom;
3) Header&hero-buttons appear and lottie start playing in the same time. Lottie should play directly(on top to bottom scroll) and reverse (on bottom to top scroll);
But lottie start playing from the start of time line.
And i just want to have something like additional tween for lottie.play().
And additional question: after page reload i can see $gradientTitle element. Just after start scrolling it move to "from" position and tween start playing. Is it possible to fix it? Or just add additional timeline for this, not triggered by scroll.
What i am doing wrong?
Thanks for your help!
<p class="codepen" data-height="300" data-default-tab="html,result" data-slug-hash="LYXoPpe" data-user="lilyashaZaya" style="height: 300px; box-sizing: border-box; display: flex; align-items: center; justify-content: center; border: 2px solid; margin: 1em 0; padding: 1em;">
<span>See the Pen <a href="https://codepen.io/lilyashaZaya/pen/LYXoPpe">
ScrollTrigger / Lottie / MatchMedia</a> by lilyasha (<a href="https://codepen.io/lilyashaZaya">@lilyashaZaya</a>)
on <a href="https://codepen.io">CodePen</a>.</span>
</p>
<script async src="https://cpwebassets.codepen.io/assets/embed/ei.js"></script>