function animationLoop()
    {
        let then = Date.now();
        let loop = () => {

            requestAnimationFrame(loop);

            let now   = Date.now(),
                delta = now - then;

            update();

            if (delta >= interval) {
                render();
                then = Date.now();
            }
        };

        loop();
    }
/* ------------------------------------------------------------------------
     * animationLoop:
     * ------------------------------------------------------------------------
     * Game loop implementation for updating logical coordinates of models and
     * rendering the scene.
     */


Game loop implementation for updating logical coordinates of models and
rendering the scene.
Game loop implementation for updating logical coordinates of models and rendering the scene .
function animationLoop()
    {
        let then = Date.now();
        let loop = () => {
            requestAnimationFrame(loop);
            let now   = Date.now(),
                delta = now - then;
            update();
            if (delta >= interval) {
                render();
                then = Date.now();
            }
        };
        loop();
    }
function animationLoop ( ) { let then = Date . now ( ) ; let loop = ( ) => { requestAnimationFrame ( loop ) ; let now = Date . now ( ) , delta = now - then ; update ( ) ; if ( delta >= interval ) { render ( ) ; then = Date . now ( ) ; } } ; loop ( ) ; }
animationLoop:
animationLoop :