bevy
bevy copied to clipboard
More idiomatic texture atlas builder
Objective
- TextureAtlasBuilder has some non-idiomatic methods.
Solution
- Refactor non-idiomatic methods
Changelog
- Renamed TextureAtlasBuilder.finish() to build()
- TextureAtlasBuilder.with_texture() now consumes self and returns Self
Migration Guide
- texture_atlas_builder.add_texture(Some(id), texture);
+ texture_atlas_builder = texture_atlas_builder.add_texture(Some(id), texture);
- let (texture_atlas_layout, texture) = texture_atlas_builder.finish().unwrap();
+ let (texture_atlas_layout, texture) = texture_atlas_builder.build().unwrap();