amethyst / sheep

Modular and lightweight spritesheet packer 🐑
Other
89 stars 12 forks source link

Implement maxrects packer #10

Closed happenslol closed 5 years ago

happenslol commented 5 years ago

This implements the MAXRECTS algorithm (using the best short side fit heuristic), as detailed in the paper A thousand ways to pack the bin by Jukka Jylänki. Since this code was ported pretty much directly from the CPP version, there's probably still improvements that can be made here and there, both in readability and safety.

To facilitate more complicated algorithms, the interface has been changed to allow returning multiple sprite sheets instead of just one, and adding options for a packer. The simple packer will behave exactly the same, and will output an arbitrarily big spritesheet as the first element.

What's still missing:

happenslol commented 5 years ago

bors r+

bors[bot] commented 5 years ago

Build succeeded