All samples are using Ink.requireModules, please read how to use it at Ink.requireModules section

Ink.Util.BinPack namespace

Binary Packing algorithm implementation

Based on the work of Jake Gordon

see https://github.com/jakesgordon/bin-packing/

Functions
Function name Description
.binPack(o)

.binPack(o) method

Accepts

  • o

    Options
  • o.blocks

    Array of items with width and height integer attributes.
  • o.dimensions

    Flag to fix container dimensions
  • o.sorter

    Sorting function. One of: random, height, width, area, maxside