From 49dc55013f8aea87a4e8639217320708652c0f76 Mon Sep 17 00:00:00 2001 From: John Mitchell <6656977+StarArawn@users.noreply.github.com> Date: Sun, 15 Oct 2023 10:50:32 -0400 Subject: [PATCH 1/2] v0.11.1 release --- Cargo.toml | 2 +- README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ee65737f..3a52cefd 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "bevy_ecs_tilemap" description = "A tilemap rendering plugin for bevy which is more ECS friendly by having an entity per tile." -version = "0.11.0" +version = "0.11.1" authors = ["John Mitchell"] homepage = "https://github.com/StarArawn/bevy_ecs_tilemap" repository = "https://github.com/StarArawn/bevy_ecs_tilemap" diff --git a/README.md b/README.md index 09199e28..265da182 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ cargo run --target wasm32-unknown-unknown --example animation --release --featur |bevy|bevy_ecs_tilemap| |---|---| |`main`|`bevy-track`| -|0.11|0.11| +|0.11|0.11.*| |0.10|0.10| |0.9|0.9| |0.8|0.8| From 6abe872342b4f902c2c3309c49691c475eb83737 Mon Sep 17 00:00:00 2001 From: John Mitchell <6656977+StarArawn@users.noreply.github.com> Date: Sun, 15 Oct 2023 11:14:39 -0400 Subject: [PATCH 2/2] Fixed up docs --- src/helpers/filling.rs | 10 +++++----- src/helpers/hex_grid/axial.rs | 8 ++++---- src/helpers/projection.rs | 2 +- src/helpers/square_grid/diamond.rs | 2 +- src/helpers/square_grid/mod.rs | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/src/helpers/filling.rs b/src/helpers/filling.rs index cb252131..77cad55b 100644 --- a/src/helpers/filling.rs +++ b/src/helpers/filling.rs @@ -35,8 +35,8 @@ pub fn fill_tilemap( /// Fills a rectangular region with the given tile. /// -/// The rectangular region is defined by an `origin` in [`TilePos`](crate::tiles::TilePos), and a -/// `size` in tiles ([`TilemapSize`](crate::map::TilemapSize)). +/// The rectangular region is defined by an `origin` in [`TilePos`], and a +/// `size` in tiles ([`TilemapSize`]). pub fn fill_tilemap_rect( texture_index: TileTextureIndex, origin: TilePos, @@ -69,8 +69,8 @@ pub fn fill_tilemap_rect( /// Fills a rectangular region with colored versions of the given tile. /// -/// The rectangular region is defined by an `origin` in [`TilePos`](crate::tiles::TilePos), and a -/// `size` in tiles ([`TilemapSize`](crate::map::TilemapSize)). +/// The rectangular region is defined by an `origin` in [`TilePos`], and a +/// `size` in tiles ([`TilemapSize`]). pub fn fill_tilemap_rect_color( texture_index: TileTextureIndex, origin: TilePos, @@ -143,7 +143,7 @@ pub fn generate_hexagon(origin: AxialPos, radius: u32) -> Vec { /// Fills a hexagonal region with the given `tile_texture`. /// -/// The rectangular region is defined by an `origin` in [`TilePos`](crate::tiles::TilePos), and a +/// The rectangular region is defined by an `origin` in [`TilePos`], and a /// `radius`. /// /// Tiles that do not fit in the tilemap will not be created. diff --git a/src/helpers/hex_grid/axial.rs b/src/helpers/hex_grid/axial.rs index 27a9aea5..100c8fbc 100644 --- a/src/helpers/hex_grid/axial.rs +++ b/src/helpers/hex_grid/axial.rs @@ -177,7 +177,7 @@ impl From for AxialPos { } } -/// The matrix for mapping from [`AxialPos`](AxialPos), to world position when hexes are arranged +/// The matrix for mapping from [`AxialPos`], to world position when hexes are arranged /// in row format ("pointy top" per Red Blob Games). See /// [Size and Spacing](https://www.redblobgames.com/grids/hexagons/#size-and-spacing) /// at Red Blob Games for an interactive visual explanation, but note that: @@ -185,13 +185,13 @@ impl From for AxialPos { /// 2) our vectors have magnitude 1 (in order to allow for easy scaling based on grid-size) pub const ROW_BASIS: Mat2 = Mat2::from_cols(Vec2::new(1.0, 0.0), Vec2::new(0.5, HALF_SQRT_3)); -/// The inverse of [`ROW_BASIS`](ROW_BASIS). +/// The inverse of [`ROW_BASIS`]. pub const INV_ROW_BASIS: Mat2 = Mat2::from_cols( Vec2::new(1.0, 0.0), Vec2::new(-1.0 * INV_SQRT_3, DOUBLE_INV_SQRT_3), ); -/// The matrix for mapping from [`AxialPos`](AxialPos), to world position when hexes are arranged +/// The matrix for mapping from [`AxialPos`], to world position when hexes are arranged /// in column format ("flat top" per Red Blob Games). See /// [Size and Spacing](https://www.redblobgames.com/grids/hexagons/#size-and-spacing) /// at Red Blob Games for an interactive visual explanation, but note that: @@ -199,7 +199,7 @@ pub const INV_ROW_BASIS: Mat2 = Mat2::from_cols( /// 2) our vectors have magnitude 1 (in order to allow for easy scaling based on grid-size) pub const COL_BASIS: Mat2 = Mat2::from_cols(Vec2::new(HALF_SQRT_3, 0.5), Vec2::new(0.0, 1.0)); -/// The inverse of [`COL_BASIS`](COL_BASIS). +/// The inverse of [`COL_BASIS`]. pub const INV_COL_BASIS: Mat2 = Mat2::from_cols( Vec2::new(DOUBLE_INV_SQRT_3, -1.0 * INV_SQRT_3), Vec2::new(0.0, 1.0), diff --git a/src/helpers/projection.rs b/src/helpers/projection.rs index 48b48edb..01b31f04 100644 --- a/src/helpers/projection.rs +++ b/src/helpers/projection.rs @@ -10,7 +10,7 @@ use bevy::math::Vec2; impl TilePos { /// Get the center of this tile in world space. /// - /// The center is well defined for all [`TilemapType`](crate::map::TilemapType)s. + /// The center is well defined for all [`TilemapType`]s. pub fn center_in_world(&self, grid_size: &TilemapGridSize, map_type: &TilemapType) -> Vec2 { match map_type { TilemapType::Square { .. } => { diff --git a/src/helpers/square_grid/diamond.rs b/src/helpers/square_grid/diamond.rs index 6c2ee75a..fa54f108 100644 --- a/src/helpers/square_grid/diamond.rs +++ b/src/helpers/square_grid/diamond.rs @@ -13,7 +13,7 @@ use std::ops::{Add, Mul, Sub}; /// /// It is vector-like. In other words: it makes sense to add and subtract /// two `DiamondPos`, and it makes sense to multiply a `DiamondPos` by -/// an [`i32`](i32) scalar. +/// an [`i32`] scalar. /// /// A `DiamondPos` can be mapped to world space, and a world space position can be mapped to /// the tile with `DiamondPos` containing said world space position. diff --git a/src/helpers/square_grid/mod.rs b/src/helpers/square_grid/mod.rs index 1755ca90..786c5412 100644 --- a/src/helpers/square_grid/mod.rs +++ b/src/helpers/square_grid/mod.rs @@ -14,7 +14,7 @@ use std::ops::{Add, Mul, Sub}; /// /// It is vector-like. In other words: it makes sense to add and subtract /// two `SquarePos`, and it makes sense to multiply a `SquarePos` by -/// an [`i32`](i32) scalar. +/// an [`i32`] scalar. /// /// A `SquarePos` can be mapped to world space, and a world space position can be mapped to /// the tile with `SquarePos` containing said world space position.