Hello all!
First off, here is the codesandbox for my testing : https://codesandbox.io/s/confident-tree-crcmt?file=/src/App.js
I'm new to all this so i have a few questions if that's ok...
First off, i'm trying to use both the timeline and scrolltrigger together and sadly i couldn't make it work.
If i change the start value to "top center" and the timeline is already triggered on refresh, the animation plays perfectly,
however well if i refresh the page and i'm outside of my trigger then get to it well...the animation just "pops in" and doesn't play out at all.
I tried various things but couldn't make it work as intended : have the animation play once the scroll reaches the trigger.
Second, i'm having a lot of trouble understanding how to set an element as the end point/destination.
For exemple, if i want my animation in the codesandbox to land exactly at the edge of the gray div, right on top of the orange div, how could i determine that through the x & y coordinates without it being destroyed by viewport and responsive? I guess it's more practical vertically, but horizontally the x coordinates always become obsolete the moment the window is resized, and i don't know how to deal with that...
And finally sorry, in my exemple you can see i'm using a rotation and bounce ease, however when the bounce happens the rotation goes backwards and it's jarring. I understand why it does that, but is there a way to keep the rotation linear instead of it rotating backwards on the bounce?
Apologies for the long post, i hope it's not too much of an issue, have a good day!