code: function(set) {
              if (set.length < 2) return set;
  
              var i = set.length - 1;
              while (i--) {
                  // If current and next overlap, merge them together into the first, removing the second
                  if (this.overlap(set[i], set[i + 1])) {
                      this.merge(set[i], set[i + 1], set[i]);
                      set.splice(i + 1, 1);
                  }
              }
  
              return set;
          }
docs: @
  #Crafty.rectManager.mergeSet
  @comp Crafty.rectManager
  @kind Method
  
  @sign public Object Crafty.rectManager.mergeSet(Object set)
  @param set - an array of rectangular regions
  
  Merge any consecutive, overlapping rects into each other.
  Its an optimization for the redraw regions.
  
  The order of set isn't strictly meaningful,
  but overlapping objects will often cause each other to change,
  and so might be consecutive.