I tried fixing #11 by trying to understand the logic in matrix.ts, but I wasn't able to fix it. Doing a quick search, I found this tool: https://github.com/twolfson/spritesmith, which details its layout algorithms here. The default binary-tree algorithm uses the bin-pack module, which seems to work pretty well when integrated in sprite-one.
I also added a couple unit tests for matrix.ts, and added snapshot tests (by comparing the MD5 hashes of the outputs) to tests/lib/index.test.ts
I tried fixing #11 by trying to understand the logic in
matrix.ts
, but I wasn't able to fix it. Doing a quick search, I found this tool: https://github.com/twolfson/spritesmith, which details its layout algorithms here. The default binary-tree algorithm uses the bin-pack module, which seems to work pretty well when integrated in sprite-one.I also added a couple unit tests for
matrix.ts
, and added snapshot tests (by comparing the MD5 hashes of the outputs) totests/lib/index.test.ts
Fixes #11