mirror of
https://github.com/bevyengine/bevy
synced 2024-11-25 22:20:20 +00:00
b91945b54d
This is an adoption of #3775 This merges `TextureAtlas` `from_grid_with_padding` into `from_grid` , adding optional padding and optional offset. Since the orignal PR, the offset had already been added to from_grid_with_padding through #4836 ## Changelog - Added `padding` and `offset` arguments to `TextureAtlas::from_grid` - Removed `TextureAtlas::from_grid_with_padding` ## Migration Guide `TextureAtlas::from_grid_with_padding` was merged into `from_grid` which takes two additional parameters for padding and an offset. ``` // 0.8 TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1); // 0.9 TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1, None, None) // 0.8 TextureAtlas::from_grid_with_padding(texture_handle, Vec2::new(24.0, 24.0), 7, 1, Vec2::new(4.0, 4.0)); // 0.9 TextureAtlas::from_grid(texture_handle, Vec2::new(24.0, 24.0), 7, 1, Some(Vec2::new(4.0, 4.0)), None) ``` Co-authored-by: olefish <88390729+oledfish@users.noreply.github.com> |
||
---|---|---|
.. | ||
mesh2d.rs | ||
mesh2d_manual.rs | ||
mesh2d_vertex_color_texture.rs | ||
move_sprite.rs | ||
rotation.rs | ||
shapes.rs | ||
sprite.rs | ||
sprite_flipping.rs | ||
sprite_sheet.rs | ||
text2d.rs | ||
texture_atlas.rs | ||
transparency_2d.rs |