0.2.1 • Published 7 years ago

simple-bp3d-node v0.2.1

Weekly downloads
3
License
ISC
Repository
github
Last release
7 years ago

Inspiration

This package is a rewrite of https://github.com/gedex/bp3d. Though it only supports one bin, and not multiple.

Example

const bp3d = require('../bp3d.js');

const items = [
  { h: 2, w: 2, d: 1, pos: {}, rot: bp3d.ROTATION.HWD },
  { h: 2, w: 2, d: 1, pos: {}, rot: bp3d.ROTATION.HWD },
  { h: 2, w: 2, d: 3, pos: {}, rot: bp3d.ROTATION.HWD },
  { h: 3, w: 3, d: 2, pos: {}, rot: bp3d.ROTATION.HWD },
  { h: 2, w: 3, d: 2, pos: {}, rot: bp3d.ROTATION.HWD }
];

const unpackedBin = { h: 5, w: 5, d: 5, items: [] };

const {
  bin,
  unpacked
} = bp3d(unpackedBin, items);

console.log('bin', bin);
console.log('unpacked', unpacked);
0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago