Skip to content

Commit

Permalink
Merge pull request #6 from nerdachse/main
Browse files Browse the repository at this point in the history
Update to 0.11
  • Loading branch information
MrGVSV authored Jul 22, 2023
2 parents 4624ab0 + 63a175d commit 75759d8
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 14 deletions.
18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "bevy_tile_atlas"
version = "0.6.0"
version = "0.7.0"
edition = "2021"
authors = ["Gino Valente <[email protected]>"]
description = "A TextureAtlas builder for ordered tilesets"
Expand All @@ -11,17 +11,17 @@ readme = "README.md"
exclude = ["assets/**/*", ".github/**/*"]

[dependencies]
bevy_asset = { version = "0.10", default-features = false }
bevy_ecs = { version = "0.10", default-features = false }
bevy_log = { version = "0.10", default-features = false, optional = true }
bevy_math = { version = "0.10", default-features = false }
bevy_render = { version = "0.10", default-features = false }
bevy_sprite = { version = "0.10", default-features = false }
bevy_utils = { version = "0.10", default-features = false }
bevy_asset = { version = "0.11", default-features = false }
bevy_ecs = { version = "0.11", default-features = false }
bevy_log = { version = "0.11", default-features = false, optional = true }
bevy_math = { version = "0.11", default-features = false }
bevy_render = { version = "0.11", default-features = false }
bevy_sprite = { version = "0.11", default-features = false }
bevy_utils = { version = "0.11", default-features = false }
thiserror = "1.0.30"

[dev-dependencies]
bevy = "0.10"
bevy = "0.11"

[features]
default = ["debug"]
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This crate is essentially an augmentation of Bevy's own `TextureAtlasBuilder`.
Add to your `[dependencies]` list in `Cargo.toml`:

```toml
bevy_tile_atlas = "0.6.0"
bevy_tile_atlas = "0.7.0"
```

## Usage
Expand Down Expand Up @@ -58,6 +58,7 @@ fn build_tileset(handles: Vec<Handle<Image>>, textures: &mut Assets<Image>) -> T

| bevy | bevy_tile_atlas |
|------|-----------------|
| 0.11 | 0.7.0 |
| 0.10 | 0.6.0 |
| 0.9 | 0.5.0 |
| 0.8 | 0.4.0 |
Expand All @@ -77,4 +78,4 @@ I didn't have to enforce the tile restriction, but I didn't see this being used

**Is the order guaranteed for whole folders of textures?**

If you load from a whole folder, the order of insertion will depend on how Bevy chooses to load the files (which I think can vary, though I'm not sure). Therefore, it's recommended to either manually place the tile handles into a `Vec` or array, or use some other mechanism to automatically order them (i.e. a [config file).](https://github.com/MrGVSV/bevy_tileset)
If you load from a whole folder, the order of insertion will depend on how Bevy chooses to load the files (which I think can vary, though I'm not sure). Therefore, it's recommended to either manually place the tile handles into a `Vec` or array, or use some other mechanism to automatically order them (i.e. a [config file).](https://github.com/MrGVSV/bevy_tileset)
6 changes: 3 additions & 3 deletions examples/atlas.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ fn main() {
.init_resource::<TileHandles>()
.init_resource::<MyAtlas>()
.add_state::<AppState>()
.add_system(load_tiles.in_schedule(OnEnter(AppState::LoadTileset)))
.add_system(display_atlas.in_schedule(OnEnter(AppState::DisplayTileset)))
.add_system(create_atlas.in_set(OnUpdate(AppState::CreateTileset)))
.add_systems(OnEnter(AppState::LoadTileset), load_tiles)
.add_systems(OnEnter(AppState::DisplayTileset), display_atlas)
.add_systems(Update, create_atlas.run_if(in_state(AppState::CreateTileset)))
.run();
}

Expand Down

0 comments on commit 75759d8

Please sign in to comment.