       
   onBuildSpriteSheetComplete: (e, builder) ->
     return if @initializing
+    @asyncBuilder = null
     
     if builder.spriteSheet._images.length > 1
-      @resolutionFactor *= 0.9
-      console.debug('Sprite sheet is too large... re-rendering at', @resolutionFactor.toFixed(2))
+      total = 0
+      # get a rough estimate of how much smaller the spritesheet needs to be
+      for image, index in builder.spriteSheet._images
+        total += image.height / builder.maxHeight
+      @resolutionFactor /= (Math.max(1.1, Math.sqrt(total)))
       @_renderNewSpriteSheet(e.async)
       return
     

        @renderRasterThangType(thangType, builder)
        
    if async
      builder.buildAsync()
      builder.on 'complete', @onBuildSpriteSheetComplete, @, true, builder
    else
      sheet = builder.build()
      @onBuildSpriteSheetComplete({async:async}, builder)

    @_renderNewSpriteSheet()
    
  _renderNewSpriteSheet: (async) ->
    @asyncBuilder.stopAsync() if @asyncBuilder
      
    async ?= @buildAsync
    builder = new createjs.SpriteSheetBuilder()
    groups = _.groupBy(@toRenderBundles, ((bundle) -> @renderGroupingKey(bundle.thangType, '', bundle.colorConfig)), @)
