 redraw = -> dirty = true
 
 drawEverything = ->
+  context.clearRect 0, 0, canvas.width, canvas.height
+  context.save()
   s = Math.min( canvas.width, canvas.height ) / 2 #
-  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
   context.fillStyle = "black"

    return
    
  onInitialized: (n,m) ->
    if n is @tessellation.group.n and m is tessellation.group.m
      console.log "Worker initialized"
      @workerReady = true
      #now waiting for first rendered field.

    @cells = visibleNeighborhood @tessellation, @appendRewrite, @minCellSize
    @cellOffsets = (node2array(c) for c in @cells)
    @cellTransforms = (nodeMatrixRepr(c, @tessellation.group) for c in @cells)
    @drawEmpty = true
  rebuildAt: (newCenter) ->
    @center = newCenter
    @cells = for offset in @cellOffsets
