I am trying to integrate the code in this answer (run snippet in question's answer to see an example) with the rest of the script below to allow the user to scroll down the sideBut Solution 1: It's not about requestionAnimationFrame, but about your logic to calculate the scrolling(the scroll offset, the hitness for the hit zone). You must check your logic for calculation of the upperBoxHitTest and lowerBoxHitTest. Of course, your calculation inside mainloop is full of problem.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by var initialButton Type
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with var initialButton
Contact var initialButton, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack