soimy / maxrects-packer

A max rectangle 2d bin packer npm-module for packing glyphs or images into multiple sprite-sheet/atlas
https://soimy.github.io/maxrects-packer/
MIT License
186 stars 35 forks source link

feat: Non exclusive tag grouping #21

Closed soimy closed 4 years ago

soimy commented 4 years ago

New packer option exclusiveTag (Defaut: true) If exclusiveTag is set to true, packer will be identical to the older version which will pack each tagged rectangles into their own bins. If exclusiveTag is set to false, the newly implemented algorithm will test all existing bins and try to pack rectangles with the same tag into the same bin. If not, a new bin will be created. This is useful when you want to pack animation sequence / sprites into the same bin to save drawcalls. Note that if one bin cannot fit in all rectangles, THEY WILL NOT BE PACKED!

coveralls commented 4 years ago

Coverage Status

Coverage decreased (-0.7%) to 91.258% when pulling b4827b827b478990983886c567e8c2ef7afdc2cf on non-exclusive-tag into 0eeb7d14c9402caa5b29e50aecb6c7db368b5b8b on master.