1.0.1 • Published 9 years ago

sacados v1.0.1

Weekly downloads
1
License
MIT
Repository
-
Last release
9 years ago

backpack

A node module to pack boxes into a 2D space

Example:

var BackPack = require("sacados");

var boxes = [];
for(var i = 0; i<20; i++){
    var width = Math.floor(Math.random() * (20 - 5 + 1)) + 5;
    var height = Math.floor(Math.random() * (20 - 5 + 1)) + 5;
    boxes.push({'id': i, 'width': width, 'height': height});
}

backPack = new BackPack(40, 10000);