Skip to content

maxrects-packerMaxRects 2D bin packing

Packs rectangles into few bins within maxWidth × maxHeight — a heuristic, not a minimiser. A rect that cannot fit at all gets a placeholder bin of its own.

An atlas packed from two bitmap fonts

Where to go next ​

  • User guide — options, packing, rotation and tags, repacking, persistence, and the troubleshooting page with the sharp edges.
  • API reference — every exported class, interface and enumeration, generated from the source and its JSDoc.
  • Contributing — development setup, testing, architecture, behaviour contracts and compatibility.
  • Releases — the release history and how a release is cut.