code: function animate() {
          // render
          controls.update();
  
          if (ready) {
              renderer.render(scene, camera);
          }
  
          stats.update();
  
          // request new frame
          requestAnimationFrame(function() {
              animate();
          });
      }
docs: Rendering loop