import { MaxRectanglesPacker } from "./MaxRectanglesPacker.js";

/**
 * Packs {@link AABB2} boxes into defined bounds
 *
 * @param {number} width
 * @param {number} height
 * @param {AABB2[]} boxes
 * @returns {boolean} true if packing was successful, false otherwise
 */
export function packMaxRectangles(width, height, boxes) {

    const packer = new MaxRectanglesPacker(width, height);

    return packer.addMany(boxes);
}