diff --git a/src/app/ldtk_int_cell.rs b/src/app/ldtk_int_cell.rs index c1012ede..4ba21acc 100644 --- a/src/app/ldtk_int_cell.rs +++ b/src/app/ldtk_int_cell.rs @@ -89,7 +89,7 @@ use std::{collections::HashMap, marker::PhantomData}; /// ``` /// /// ### `#[from_int_grid_cell]` -/// Indicates that a component or bundle that implements [From] should be created +/// Indicates that a component or bundle that implements [`From`] should be created /// using that conversion. /// This allows for more modular and custom component construction, and for different structs that /// contain the same component to have different constructions of that component, without having to diff --git a/src/ldtk/mod.rs b/src/ldtk/mod.rs index 9f4538d2..7a8fc32d 100644 --- a/src/ldtk/mod.rs +++ b/src/ldtk/mod.rs @@ -21,7 +21,7 @@ //! have been changed from vectors to [IVec2] and [Vec2]. //! 11. Some "color" fields on [LdtkJson], [EntityDefinition], [IntGridValueDefinition], and //! [Level] have been changed from [String]s to [Color]. -//! 12. [TilesetDefinition::rel_path]'s type changed from [String] to [Option]. +//! 12. [TilesetDefinition::rel_path]'s type changed from [String] to [`Option`]. //! 13. All urls in docs have been changed to hyperlinks with `<>` //! 14. `Reflect` has been derived for [Type]. diff --git a/src/lib.rs b/src/lib.rs index 104e6939..ec25db90 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -96,6 +96,22 @@ //! world. //! You can make them spawn according to their world location in LDtk by setting //! [LevelSpawnBehavior::UseWorldTranslation]. +//! +//! ### Feature flags +//! +//! This crate uses the following set of [feature flags]: +//! - `derive`: Enables the derive macros for [LdtkEntity] and [LdtkIntCell]. +//! - `render`: Enables rendering via [bevy_ecs_tilemap]'s `render` feature. Disable it if you want +//! to run in headless mode. +//! - `atlas`: Enables the `atlas` feature of [bevy_ecs_tilemap]. This is required for WASM support +//! and also for tile spacing to work on Tile and AutoTile layers. +//! +//! The `derive` and `render` features are enabled by default. +//! +//! [feature flags]: https://doc.rust-lang.org/cargo/reference/features.html#the-features-section +//! [LdtkEntity]: app::LdtkEntity +//! [LdtkIntCell]: app::LdtkEntity +//! [bevy_ecs_tilemap]: https://docs.rs/bevy_ecs_tilemap use bevy::prelude::*; diff --git a/src/utils.rs b/src/utils.rs index 78bf967e..d237b037 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -15,7 +15,7 @@ use bevy_ecs_tilemap::{ use std::{collections::HashMap, hash::Hash}; -/// The `int_grid_csv` field of a [LayerInstance] is a 1-dimensional [Vec]. +/// The `int_grid_csv` field of a [LayerInstance] is a 1-dimensional [`Vec`]. /// This function can map the indices of this [Vec] to a corresponding [GridCoords]. /// /// Will return [None] if the resulting [GridCoords] is out of the bounds implied by the width and