fit() {
    if (this.blocks.length === 0) {
      return [];
    }

    this.root.width = this.blocks[0].width;
    this.root.height = this.blocks[0].height;

    for (const { index, width, height } of this.blocks) {
      const node = this._findNode(this.root, width, height);
      const { x, y } = node ? this._splitNode(node, width, height) : this._growNode(width, height);
      this.positions[index] = { x, y };
    }

    return this.positions;
  }
Fit and return the shapes

@returns {Array} shapes       Packed shapes