-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Fix TextureAtlasBuilder padding #10031
Fix TextureAtlasBuilder padding #10031
Conversation
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good. CI failures seem to be unrelated to this PR.
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
1 similar comment
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, I totally missed this.
Applying the padding in finish()
makes perfect sense.
# Objective - Fix TextureAtlasBuilder padding issue TextureAtlasBuilder padding is reserved during add_texture() but can still be changed afterwards. This means that changing padding after the textures will be wrongly applied, either distorting the textures or panicking if new padding is higher than texture+old padding. ## Solution - Delay applying padding until finish()
# Objective - Fix TextureAtlasBuilder padding issue TextureAtlasBuilder padding is reserved during add_texture() but can still be changed afterwards. This means that changing padding after the textures will be wrongly applied, either distorting the textures or panicking if new padding is higher than texture+old padding. ## Solution - Delay applying padding until finish()
# Objective - Fix TextureAtlasBuilder padding issue TextureAtlasBuilder padding is reserved during add_texture() but can still be changed afterwards. This means that changing padding after the textures will be wrongly applied, either distorting the textures or panicking if new padding is higher than texture+old padding. ## Solution - Delay applying padding until finish()
Objective
TextureAtlasBuilder padding is reserved during add_texture() but can still be changed afterwards. This means that changing padding after the textures will be wrongly applied, either distorting the textures or panicking if new padding is higher than texture+old padding.
Solution