Jump to content
Search Community

getPositionOnPath() error

PointC test
Moderator Tag

Recommended Posts

Ha, sorry about that - I hadn't realized that Zach documented that method :) and I'm sure I neglected to tell him an important detail - in order for it to do the calculations, it must first have certain measurements cached using a special method. 

// cache the measurements first (only necessary once, unless the path data changes)
MotionPathPlugin.cacheRawPathMeasurements(rawPath);

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

 

I wonder if it's better to just remove that method from the docs. Or do you think it'd be helpful for folks? I just don't want to confuse people with the caching caveat that'd be necessary too, and maybe it's a method that nobody would really care about anyway. (?)

  • Like 4
Link to comment
Share on other sites

5 minutes ago, GreenSock said:

Or do you think it'd be helpful for folks?

I don't know if it'll be helpful. I couldn't get it to work. 🤣

 

I was making some new demos today and saw that method which may work as one option to what I was trying to accomplish. I have other possibilities to achieve the same result, but wanted to familiarize myself with all available methods. I think mentioning the caching caveat in the docs will be fine. Now that I know about it, I can try the rest of my experiments and see how it goes. 

 

Thanks for the update. :)

 

  • Like 1
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...