Hi,
I've come to the mighty forums as I can't figure out how to get a complicated squiggly SVG path to always draw alongside the scrollTrigger (for example 50% of the viewport).
(As a @Carl student I feel like I should be able to figure this one out 😅, sorry.)
I tried to find any hint on the forums, but nothing seems to fit my particular question.
My objective is that the line is drawn always at a fixed position of the viewport (for example 50% of the viewport like in the demo), instead of its natural mapping to the line full length.
I've created a basic demo.
https://codepen.io/andre1melo/pen/bGJLqoY
I am trying to replicate the effect of the blue line in https://cursor.sh/, albeit with a much more squiggly path.
Could anybody just point me in the right direction? I'm a quick learner.
Thank you so much!
P.S.- My crazy idea so far is to create an CustomEase with the shape of the SVG path?!?! Didn’t seem to work when I clumsily tried.
a1m