Re:Breaking down a ripple animation in JavaScript
by franciscop on Friday August 20, 2021 @03:42PM
(#28250524)
This is the perfect example of why it says not to ask why you were downvoted in the FAQ, and the last time I try to help. You literally asked, I just tried to give a plausible explanation. Instead you rant back, scream and insult those literally answering your question. Not the right behavior for HN.
Re:Breaking down a ripple animation in JavaScript
by beebeepka on Friday August 20, 2021 @08:01PM
(#28252756)
I provided a real world example that you haven't considered before.
Your condescending responses are hardly genuine attempts at finding a plausible explanation for me being downvoted by people who can't think that pointing out thing A is better than thing B even though thing C exists and is the correct approach most of the time.
RAF also stops executing when tab is inactive. Sometimes we don't want our loop halted and that's where setTimeout comes in as the better alternative to setInterval.