SmoothScrollingImageEffects
SmoothScrollingImageEffects copied to clipboard
update SmoothScroll render function to loop only when user is scrolling
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):

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