Skip to content

Commit

Permalink
doc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
aevyrie committed Jun 17, 2024
1 parent 16af623 commit 877d239
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 16 deletions.
1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ documentation = "https://docs.rs/crate/big_space/latest"

[dependencies]
bevy_app = { version = "0.13", default_features = false }
bevy_derive = { version = "0.13", default_features = false }
bevy_ecs = { version = "0.13", default_features = false }
bevy_hierarchy = { version = "0.13", default_features = false }
bevy_log = { version = "0.13", default_features = false }
Expand Down
8 changes: 4 additions & 4 deletions src/bundles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use bevy_transform::prelude::*;

/// Minimal bundle needed to position an entity in floating origin space.
///
/// This is the floating origin equivalent of the [`bevy::prelude::SpatialBundle`].
/// This is the floating origin equivalent of the `bevy` `SpatialBundle`.
#[derive(Bundle, Default)]
pub struct BigSpatialBundle<P: GridPrecision> {
/// The visibility of the entity.
Expand All @@ -27,10 +27,10 @@ pub struct BigSpatialBundle<P: GridPrecision> {
pub cell: GridCell<P>,
}

/// A [`SpatialBundle`] that also has a reference frame, allowing other high precision spatial
/// bundles to be nested within that reference frame.
/// A `SpatialBundle` that also has a reference frame, allowing other high precision spatial bundles
/// to be nested within that reference frame.
///
/// This is the floating origin equivalent of the [`SpatialBundle`].
/// This is the floating origin equivalent of the `bevy` `SpatialBundle`.
#[derive(Bundle, Default)]
pub struct BigReferenceFrameBundle<P: GridPrecision> {
/// The visibility of the entity.
Expand Down
11 changes: 6 additions & 5 deletions src/floating_origins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ use bevy_utils::HashMap;

/// Marks the entity to use as the floating origin.
///
/// The [`GlobalTransform`] of all entities within this [`BigSpace`] will be computed relative to
/// this floating origin. There should always be exactly one entity marked with this component
/// within a [`BigSpace`].
/// The [`GlobalTransform`](bevy_transform::components::GlobalTransform) of all entities within this
/// [`BigSpace`] will be computed relative to this floating origin. There should always be exactly
/// one entity marked with this component within a [`BigSpace`].
#[derive(Component, Reflect)]
pub struct FloatingOrigin;

Expand All @@ -23,8 +23,9 @@ pub struct FloatingOrigin;
/// `ReferenceFrame`s, but only one `BigSpace`, at the root.
///
/// Your world can have multiple [`BigSpace`]s, and they will remain completely independent. Each
/// big space uses the floating origin contained within it to compute the [`GlobalTransform`] of all
/// spatial entities within that `BigSpace`.
/// big space uses the floating origin contained within it to compute the
/// [`GlobalTransform`](bevy_transform::components::GlobalTransform) of all spatial entities within
/// that `BigSpace`.
#[derive(Debug, Default, Component, Reflect)]
pub struct BigSpace {
/// Set the entity to use as the floating origin within this high precision hierarchy.
Expand Down
10 changes: 5 additions & 5 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! This [`bevy`] plugin makes it possible to build high-precision worlds that exceed the size of
//! the observable universe, with no added dependencies, while remaining largely compatible with the
//! This `bevy` plugin makes it possible to build high-precision worlds that exceed the size of the
//! observable universe, with no added dependencies, while remaining largely compatible with the
//! rest of the Bevy ecosystem.
//!
//! The next section explains the problem this solves in more detail, how this plugin works, and a
Expand Down Expand Up @@ -55,9 +55,9 @@
//! multiplayer - the server needs a source of truth for position that doesn't drift over time.
//! - Virtually limitless volume and scale; you can work at the scale of subatomic particles, across
//! the width of the observable universe. Double precision is downright suffocating in comparison.
//! - Uniform precision across the play area. Unlike double precision, the available precision
//! does not decrease as you move to the edge of the play area, it is instead relative to the
//! distance from the origin of the current grid cell.
//! - Uniform precision across the play area. Unlike double precision, the available precision does
//! not decrease as you move to the edge of the play area, it is instead relative to the distance
//! from the origin of the current grid cell.
//! - High precision coordinates are invisible if you don't need them. You can move objects using
//! their `Transform` alone, which results in decent ecosystem compatibility.
//! - High precision is completely opt-in. If you don't add the `GridCell` component to an entity,
Expand Down
2 changes: 1 addition & 1 deletion src/reference_frame/local_origin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ mod inner {
/// An isometry that describes the location of the floating origin's grid cell's origin, in the
/// local reference frame.
///
/// Used to compute the [`GlobalTransform`](bevy::transform::components::GlobalTransform) of
/// Used to compute the [`GlobalTransform`](bevy_transform::components::GlobalTransform) of
/// every entity within a reference frame. Because this tells us where the floating origin cell
/// is located in the local frame, we can compute the inverse transform once, then use it to
/// transform every entity relative to the floating origin.
Expand Down

0 comments on commit 877d239

Please sign in to comment.