@mapka/shelf-pack
v0.4.1
Published
A 2D rectangular bin packing data structure that uses the Shelf Best Height Fit heuristic.
Downloads
14
Readme
@mapka/shelf-pack
This is fork of Shelf pack library.
Usage
import ShelfPack from '@mapka/shelf-pack';
const sprite = new ShelfPack(64, 64, { autoResize: false });
sprite.pack([
{ id: 1, w: 12, h: 12 },
{ id: 2, w: 12, h: 16 },
{ id: 3, w: 12, h: 24 }
]);