Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Non exclusive tag grouping #21

Merged
merged 6 commits into from
Sep 16, 2020
Merged

feat: Non exclusive tag grouping #21

merged 6 commits into from
Sep 16, 2020

Conversation

soimy
Copy link
Owner

@soimy soimy commented Sep 16, 2020

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!

@soimy soimy merged commit cf28fc5 into master Sep 16, 2020
@coveralls
Copy link

Coverage Status

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

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants