Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula...
by telcy on Thursday August 30, 2018 @12:03AM
(#17874015)
What you mean is setInterval and does work well for synchronous execution. His approach is correct and would even work if the animate function is asynchronous as the next tick gets scheduled at the end of animate function execution.
[ Parent
| on HN ]
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula...
by Qwertie on Thursday August 30, 2018 @12:11AM
(#17874034)
Ah yes, you are right. Got those mixed up.
Re:Show HN: I'm 12, learning JS, and wrote Wolfram's cellula...
by derrikcurran on Thursday August 30, 2018 @12:52AM
(#17874172)
Recursive setTimeout is a great way to allow for easy timing/speed changes on the fly.