How to implement renderer with respect to CPU capabilities
问题 I was wondering what is the best way to implement a renderer in JavaScript. It's not the content part of the rendering that's really important here - I would rather like to hear when and how to effectively run the renderer code. Currently, I have window.setInterval(renderFunc, 1000 / 20) , which will just render a frame each 50 ms (i.e., fps = 20). The point is that faster computers won't render more frames, moreover slower computers will not be able to catch up with 20 fps, so the function