     @sockets.update(@controlsCamera)
     @controls.update(delta, height) if @state.pointerLocked
     @renderer.render(@scene, @camera)
-    @prevTime = time
 
   ###
   Animate all frames.

  Render single frame.
  ###
  renderFrame: ->
    time = performance.now()
    delta = (time - @prevTime) / 1000
    mapX = Math.floor(@controlsCamera.position.x) + (@props.heightMap.width / 2)
    mapZ = Math.floor(@controlsCamera.position.z) + (@props.heightMap.height / 2)
    height = helpers.getPixel(@props.heightMap, mapX, mapZ).r

{canvas, div} = React.DOM

Game = React.createClass
  players: {}
  textures: {}
  clock: new THREE.Clock
  stats: new Stats

  getInitialState: ->
    frameCount: 0
