SmoothScrollingImageEffects icon indicating copy to clipboard operation
SmoothScrollingImageEffects copied to clipboard

update SmoothScroll render function to loop only when user is scrolling

Open annafractuous opened this issue 5 years ago • 0 comments

using a console.log statement in the SmoothScroll render() function that outputs the timestamp (hh:mm:ss) and the current value of scrollingSpeed to illustrate the difference in how often the function runs:

before (runs 60x per second, even before the user has started scrolling): before

after (runs only while the user is scrolling; stops when they stop scrolling and starts again when they scroll again): after

annafractuous avatar Jan 29 '20 21:01 annafractuous