Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document feature flags in crate-level docs #164

Merged
merged 3 commits into from
Feb 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/app/ldtk_int_cell.rs
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ use std::{collections::HashMap, marker::PhantomData};
/// ```
///
/// ### `#[from_int_grid_cell]`
/// Indicates that a component or bundle that implements [From<IntGridCell>] should be created
/// Indicates that a component or bundle that implements [`From<IntGridCell>`] 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
Expand Down
2 changes: 1 addition & 1 deletion src/ldtk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<String>].
//! 12. [TilesetDefinition::rel_path]'s type changed from [String] to [`Option<String>`].
//! 13. All urls in docs have been changed to hyperlinks with `<>`
//! 14. `Reflect` has been derived for [Type].

Expand Down
16 changes: 16 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::*;

Expand Down
2 changes: 1 addition & 1 deletion src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32>].
/// The `int_grid_csv` field of a [LayerInstance] is a 1-dimensional [`Vec<i32>`].
/// 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
Expand Down