examples/3d/js/game.js
function(time) {
    var ms = time - this.lastTime;
    this.lastTime = time;

    // Update the different components of the scene.
    this.map.update(ms / 1000);
    this.player.update(ms / 1000);
    this.camera.render(this.player, this.map);

    // Continue the game loop.
    requestAnimationFrame(this.tick.bind(this));
  }
function(time) {
    var ms = time - this.lastTime;
    this.lastTime = time;

    // Update the different components of the scene.
    this.map.update(ms / 1000);
    this.player.update(ms / 1000);
    this.camera.render(this.player, this.map);

    // Continue the game loop.
    requestAnimationFrame(this.tick.bind(this));
  }
function ( time ) { var ms = time - this . lastTime ; this . lastTime = time ; // Update the different components of the scene. this . map . update ( ms / 1000 ) ; this . player . update ( ms / 1000 ) ; this . camera . render ( this . player , this . map ) ; // Continue the game loop. requestAnimationFrame ( this . tick . bind ( this ) ) ; }
Main game loop that renders the full scene on each screen refresh.
@param  {Number} time
Main game loop that renders the full scene on each screen refresh .