2D Bin packing in JavaScript

As a first step of working on 2D bin packing mobile app, I've made a JavaScript implementaion of "2d rectangular bin packing" originally written in C++ by Jukka Jylänki: https://github.com/juj/RectangleBinPack

Algorithms in use: 

  • best short side fit,
  • best long side fit,
  • best area fit,
  • bottom left rule,
  • contact point rule.

My working code is here: https://github.com/xlawok/binpack

Demo of JavaScript implementation at: