examples/3d/js/player.js
function(secs) {
    var states = game.controls.states;

    if (states.left) this.rotate(-Math.PI * secs);
    if (states.right) this.rotate(Math.PI * secs);
    if (states.front) this.walk(this.speed * secs);
    if (states.back) this.walk(-this.speed * secs);
  }
function(secs) {
    var states = game.controls.states;

    if (states.left) this.rotate(-Math.PI * secs);
    if (states.right) this.rotate(Math.PI * secs);
    if (states.front) this.walk(this.speed * secs);
    if (states.back) this.walk(-this.speed * secs);
  }
function ( secs ) { var states = game . controls . states ; if ( states . left ) this . rotate ( - Math . PI * secs ) ; if ( states . right ) this . rotate ( Math . PI * secs ) ; if ( states . front ) this . walk ( this . speed * secs ) ; if ( states . back ) this . walk ( - this . speed * secs ) ; }
Update the player position and rotation on each tick.
@param  {Number} secs Seconds since last update.
Update the player position and rotation on each tick .