 
 drawEverything = ->
   s = Math.min( canvas.width, canvas.height ) / 2 #
-  context.clearRect 0, 0, canvas.width, canvas.height
+  context.fillStyle="white"
+  #context.clearRect 0, 0, canvas.width, canvas.height
+  context.fillRect 0, 0, canvas.width, canvas.height
   context.save()
   context.scale s, s
   context.translate 1, 1

  return rval

lastTime = Date.now()
fpsMax = 60
dtMax = 1000.0/fpsMax #
redrawLoop = ->
  if dirty
    t = Date.now()
    if t - lastTime > dtMax
      if drawEverything()
        dirty = false
      lastTime = t
  requestAnimationFrame redrawLoop

    for cell, i in @cells
      if cells.get cell
        runCommands context, @cellShapes[i]
        null
    context.fill()
    return true
    
