Forum Discussion
Help with JavaScript
Hi Math,
I wasn't sure I had explained my problem enough but, that is definitely what I'm looking for!
I knew it was a Bezier curve I was looking for, but I had no idea how to integrate it into SL.
Your demo shows that the anchor point to the movable end is offset from the actual path line.
Yeah... not sure the anchorpoint causes it. My best guess is its caused by SVG DOM calculating position of elements different then HTML DOM elements.
Some documentation about that you can find here..
https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths
https://www.sarasoueidan.com/blog/svg-transformations/
A bit of searching on GSAP forum gave this option.
https://greensock.com/docs/v3/Plugins/MotionPathHelper/static.editPath()
I do think using it like this its much easier... as you can create a basic SVG path and with the sample code shown here make it editable.... so you can drag it around.