Taylan Posted November 16, 2020 Share Posted November 16, 2020 Click next button multiple times. Whenever end value goes from -0.9 to -1.2, from -1.8 to -2.1, from -2.9999 to -3.3 etc. the element moves to its default position. This is not expected right? See the Pen eYzXzKg by taylankasap (@taylankasap) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted November 16, 2020 Share Posted November 16, 2020 Hey Taylan. Currently MotionPathPlugin only works with looping in the positive direction. So if you changed end to const end = start + distance; and reversed the direction of your path it'd work as you'd expect. We'll discuss whether or not MotionPathPlugin should support looping in the negative direction and get back to you. Side note: Make sure you're using the latest version of GSAP. That demo is using an old version 2 Link to comment Share on other sites More sharing options...
Taylan Posted November 16, 2020 Author Share Posted November 16, 2020 Unfortunately I need to loop in both directions because I'm making a carousel with next & prev functionality. Thanks for considering this functionality. Link to comment Share on other sites More sharing options...
Solution GreenSock Posted November 17, 2020 Solution Share Posted November 17, 2020 Sorry about that - I believe it's fixed in the upcoming release which you can preview at https://assets.codepen.io/16327/MotionPathPlugin.min.js Better? 4 Link to comment Share on other sites More sharing options...
Taylan Posted November 17, 2020 Author Share Posted November 17, 2020 It works as expected now. Thank you Jack. 1 1 Link to comment Share on other sites More sharing options...
Taylan Posted December 4, 2020 Author Share Posted December 4, 2020 On 11/17/2020 at 8:34 AM, GreenSock said: https://assets.codepen.io/16327/MotionPathPlugin.min.js Hello again, I think you guys are actively working on the script on this URL? I, unfortunately used that URL as CDN and now there is a bug (that wasn't there at the time of this post). Bug is mainly about sometimes element not animating at all when start and end values are different in integer level (I mean when it's moving from 1.8 to 2.1, -1.9 to -2.3 etc. You can see it on the original post's codepen. (Uncaught TypeError: Cannot read property 'samples' of undefined) See the Pen NWRxMgG by taylankasap (@taylankasap) on CodePen Of course this might be caused by me using MotionPathPlugin 3.6 with GSAP 3.5.1. Is there a GSAP 3.6 preview I can test? Or maybe MotionPathPlugin's old version so I can revert back to the working version for now (and by old I don't mean 3.5.1, I mean the one you sent me the first time under this topic)? 1 Link to comment Share on other sites More sharing options...
GreenSock Posted December 4, 2020 Share Posted December 4, 2020 Sorry about that, @Taylan. Yeah, that's sort of a beta file that we update fairly regularly and I was still working a few things out. It should be resolved now: https://assets.codepen.io/16327/MotionPathPlugin.min.js Better? 2 Link to comment Share on other sites More sharing options...
Taylan Posted December 5, 2020 Author Share Posted December 5, 2020 I've downloaded it this time ^^ Thanks Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now