Jump to content

Abi Rana

Issue using MorphSVGPlugin.pathDataToBezier()

Recommended Posts

Has anyone encountered the issue, today I was work on a new project and I was using new updated GSAP and MorphSVGPlugin for this one. I had to do some motion along a path. So first this I wan creating variables like below:


var motionPath_1 = MorphSVGPlugin.pathDataToBezier("#motionPath-1", {align:"#connecting-dot"});


But this is throwing an error as below:

Uncaught TypeError: MorphSVGPlugin.pathDataToBezier is not a function


This is the same thing I've been using and on the new update this has no change as I can think of. When using old GSAP and MorphSVGPlugin it is work fine.


Has anyone encountered this? Does anyone know what is the issue?

Link to comment
Share on other sites

Hi there, an update if anyone visiting this topic.


I just saw that MotionPathPlugin is a separate plugin in this new version, I just found it. In fact now you don't even need MorphSVGPlugin just only for MotionPathPlugin. Also GSAP is providing MotionPath helper, with that we can see the path and edit in real time. Check this out here https://greensock.com/docs/v3/Plugins/MotionPathPlugin


Maybe this can be helpful if anyone is having such issue.

  • Like 3
Link to comment
Share on other sites

Hey @Abi Rana,


Welcome to the GreenSock Forum.

I'm glad you found the way.
Maybe your post will help another in such a case.


See the Pen MWWNrGR by mikeK (@mikeK) on CodePen


Happy tweening ...


  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.