I need an algorithm (better if already in Javascript) to pack different sizes rectangles into a bigger rectangle with fix size. The sizes of the small rectangles can be adap