Jump to content
Search Community

horizontalLoop Helper Function - possible direction/speed glitch

drewhagni test
Moderator Tag

Recommended Posts

Hey GreenSock,

 

I've been working on using your horizontalLoop Helper Function with Draggable + InertiaPlugin and noticed a strange issue in testing. When on a touch device if you swipe quickly enough, repeatedly, the direction of the animation reverses. I think the speed also changes, but that's a bit tougher to verify. I started to strip down my code to narrow down the issue, but ended up with just the bare-bones helper function, so I tested your example on my phone and discovered the same issues.

 

I'm including a codepen which is essentially just an even more simplified fork of what you guys provided in the docs to hopefully see it a little clearer. I was able to replicate it on desktop as well if you can get the speed up fast enough, but it's much easier to encounter the issue with a touch screen.

 

Is this indeed a glitch or have I missed something in the documentation that would allow me to circumvent this behavior? I thought maybe I was accidentally swiping the wrong direction ever so briefly or something, but I've tested it enough times to verify that's not the case. Perhaps when you speed it up too fast and continue swiping the subsequent "throws" aren't faster than its current speed so it interprets it as the other direction? I don't know.

 

I recorded a video as well, if it helps. I can confirm that every movement you see is a swipe moving from right to left.

See the Pen zYmWmQw by reidgannah (@reidgannah) on CodePen

Link to comment
Share on other sites

Hi @drewhagni and welcome to the GreenSock forums!

 

Thanks for reporting and sharing the example. I'll pass this to upstairs so it's looked at. We'll ask a bit of patience since the helper functions are not really part of the official API, just (as the name states) helper methods to simplify some common tasks and workflows that pop into the forums with regularity.

 

Please stand by.

Happy Tweening!

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...