Skip to content

Commit

Permalink
Workaround for Bevy AtlasImage rendering bug
Browse files Browse the repository at this point in the history
  • Loading branch information
rparrett committed Jan 5, 2024
1 parent 4d6bc26 commit cc1ce82
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/tilemap.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,14 +356,16 @@ fn queue_load(
let texture_handle = asset_server.load("urizen_onebit_tileset__v1d0.png");
loading_assets.0.push(texture_handle.clone().into());

let atlas = TextureAtlas::from_grid(
let mut atlas = TextureAtlas::from_grid(
texture_handle,
Vec2::new(12.0, 12.0),
103,
50,
Some(Vec2::splat(1.)),
Some(Vec2::splat(1.)),
);
// Workaround for https://github.com/bevyengine/bevy/issues/11219
atlas.size = Vec2::new(1340., 651.);

let atlas_handle = atlases.add(atlas);

Expand Down

0 comments on commit cc1ce82

Please sign in to comment.