Hi, Rodrigo!
Thank you so much for taking the time to reply.
Yes! The reason is that the original helper function, unfortunately, didn't work for my use case, for some reason. The problem is the same exact one that happens in the codepen above.
Since I couldn't understand anything that was going on at first, I removed every variable whose value was zero and never changed during any point of the execution just to simplify things, as well as stuff I knew I wouldn't use such as the toIndex function and related code. I didn't change any of the logic, just variable names. In other words, the codepen above is a minimal reproducible example.
I do believe I have a significantly better understanding now. However, I don't understand how a constant speed of 100 pixels per second is causing variable speed in actual practice, especially since I verified the calculations and the speed that is passed to GSAP is indeed 100px, as expected.
Below is my HTML structure with the original helper function. As you can see, the problem that occurs is the exact same. I would really, really appreciate any help at all you can give me, if you guys have the time. ❤️
https://codepen.io/ZeHgS/pen/XWGzEdj