     @table.do rotate:{ x:45 }, around:{ y:height/2 }
 
     window.viewport = d3.select ".viewport"
-    draw()
-    @changePlayer()
+    setInterval (()-> draw()), 16
 
 
  # draw function

        .append("div")
        .attr("class", "table")
    d3table
        .transition()
        .duration(100)
        .ease("linear")
        .style("-webkit-transform", (d) -> d.absoluteMatrix())

    d3cards = viewport.selectAll(".card").data(@cards)        



    d3cards
        .style("-webkit-transform", (d) -> d.absoluteMatrix())
        .style("z-index", (d) -> 
            #todo compute distance and set z-index to fix chrome aparently missing z-buffer 
        )

    d3cards.exit()
        .style("opacity", 0)
        .remove()

$(document).keydown (e) -> 

    if not e.shiftKey and not e.altKey
        switch e.keyCode
            when 37  
                table.do({rotate:{z:180}, around:{x:width/2 , y:height/2} })
            when 38  
                table.do({rotate:{x:10}, around:{x:width/2 , y:height/2} })
            when 39  
                table.do({rotate:{z:-180}, around:{x:width/2 , y:height/2} })
            when 40  
                table.do({rotate:{x:-10}, around:{x:width/2 , y:height/2} })
    if not e.shiftKey and e.altKey
        switch e.keyCode
            when 37  
                camera.do({rotate:{z:180}, around:{x:width/2 , y:height/2} })
            when 38  
                camera.do({rotate:{x:10}, around:{x:width/2 , y:height/2} })
            when 39  
                camera.do({rotate:{z:-180}, around:{x:width/2 , y:height/2} })
            when 40  
                camera.do({rotate:{x:-10}, around:{x:width/2 , y:height/2} })
    if e.shiftKey and not e.altKey
        switch e.keyCode
            when 37  
                camera.do translate:{x:10}
