Jump to content
Search Community

MotionPathPlugin dynamic path

neo420 test
Moderator Tag

Recommended Posts

Hello,

First of all thank you for this great library 

 

I have multiple point (html element) and I'm moving a "pen" from point to point with MotionPathPlugin .

So i have my array of object, my pen is moving fine, but I'm having trouble trying to figure out how to output a rawPath  from those points. Is there a way ?

 

Thank you !

See the Pen wvBBGKr by benmcarnolds (@benmcarnolds) on CodePen

Link to comment
Share on other sites

Thank you for the fast reply 

 

Actually i want to draw a line when my pen is moving, so creating a svg from my points could help.

I'm not a big expert of svg but it seems like I have what i need with arrayToRawPath, haven't I ?

Link to comment
Share on other sites

1 hour ago, neo420 said:

Actually i want to draw a line when my pen is moving, so creating a svg from my points could help.

Ah, I see.

 

1 hour ago, neo420 said:

I'm not a big expert of svg but it seems like I have what i need with arrayToRawPath, haven't I ?

More or less :) I'd use GSAP's DrawSVG to do that:

 

See the Pen OJPPRER?editors=0010 by GreenSock (@GreenSock) on CodePen

 

It might take a little bit of manipulation to get them to line up correctly.

  • Like 1
Link to comment
Share on other sites

  • 2 years later...

@ZachSaucier 

//  Are you just trying to get the raw path from the array of points? If so, you can use MotionPathPlugin.arrayToRawPath(),
Absolutely yes, but the method bezierThrough() in version-2 return a different format of values.
is there any possible way to get the similar values which is return in version 2 method using  MotionPathPlugin.

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.
×
×
  • Create New...