function animate() {
        // render
        controls.update();

        if (ready) {
            renderer.render(scene, camera);
        }

        stats.update();

        // request new frame
        requestAnimationFrame(function() {
            animate();
        });
    }
function animate() {
        
        controls.update();

        if (ready) {
            renderer.render(scene, camera);
        }

        stats.update();

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