-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
enhancementNew feature or requestNew feature or request
Description
When padding is enabled the bin packer puts the padding around every rectangle. This wastes bin space, because we end up with double padding between rectangles. In 1D, with 2 insertions of size 1 and padding 1 we get _#__#_ where _ is padding and # is the inserted object. Whereas we could have _#_#_ or even #_# if padding at the edges isn't required. This can save a bunch of pixels for a font atlas.
For the implementation we can store padded rectangles, but when looking for a spot to place a rectangle, don't apply padding.
- Should make padding at edges optional (because it will be off by default with this technique).
- Should ignore overlap/OOB when inserting padded rectangle (padding of inserted rectangles will overlap with filled space in the bin or might fall outside bin).
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request