From b34495ae0e40f6bd14dfaf6564ae3d696c63efa4 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 20:37:48 +0200 Subject: [PATCH 01/11] fix links to `BuildChildren` --- crates/bevy_transform/src/commands.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs index 27bf3400c1d89..607ebcf446ad6 100644 --- a/crates/bevy_transform/src/commands.rs +++ b/crates/bevy_transform/src/commands.rs @@ -4,8 +4,6 @@ use bevy_ecs::{prelude::Entity, system::Command, system::EntityCommands, world::World}; use bevy_hierarchy::{AddChild, RemoveParent}; -#[cfg(doc)] -use bevy_hierarchy::BuildChildren; use crate::{GlobalTransform, Transform}; @@ -69,7 +67,7 @@ pub trait BuildChildrenTransformExt { /// Change this entity's parent while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`]. /// - /// See [`BuildChildren::set_parent`] for a method that doesn't update the + /// See [`BuildChildren::set_parent`](bevy_hierarchy::child_builder::BuildChildren::set_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute @@ -80,7 +78,7 @@ pub trait BuildChildrenTransformExt { /// Make this entity parentless while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`] to be equal to its current [`GlobalTransform`]. /// - /// See [`BuildChildren::remove_parent`] for a method that doesn't update the + /// See [`BuildChildren::remove_parent`](bevy_hierarchy::child_builder::BuildChildren::remove_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute From 5c5c4efa4cdff83a75bfaca31923ffbbd6fdf8cc Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 20:58:17 +0200 Subject: [PATCH 02/11] fix mod command doc string --- crates/bevy_transform/src/commands.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs index 607ebcf446ad6..4a7c7376a5687 100644 --- a/crates/bevy_transform/src/commands.rs +++ b/crates/bevy_transform/src/commands.rs @@ -1,4 +1,4 @@ -//! Extension to [`EntityCommands`] to modify [`bevy_hierarchy`] hierarchies +//! Extension to [`EntityCommands`] to modify `bevy_hierarchy` hierarchies //! while preserving [`GlobalTransform`]. use bevy_ecs::{prelude::Entity, system::Command, system::EntityCommands, world::World}; From 4b59717bc2c38b670f5a7c2c8bf9cbe777eafe1a Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 21:32:24 +0200 Subject: [PATCH 03/11] change `PlaybackMode` doc comment to be no question --- crates/bevy_audio/src/audio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_audio/src/audio.rs b/crates/bevy_audio/src/audio.rs index 546e158e3f906..0a39c4d6331cb 100644 --- a/crates/bevy_audio/src/audio.rs +++ b/crates/bevy_audio/src/audio.rs @@ -53,7 +53,7 @@ impl VolumeLevel { } } -/// How should Bevy manage the sound playback? +/// Playback mode controls #[derive(Debug, Clone, Copy)] pub enum PlaybackMode { /// Play the sound once. Do nothing when it ends. From 5465754807b59db3dad4ee56cc24ffea94a1ce22 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 21:37:09 +0200 Subject: [PATCH 04/11] fix typos in bevy_animation/lib --- crates/bevy_animation/src/lib.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index b84e871f042d8..459712dd91f63 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -178,8 +178,8 @@ pub struct AnimationPlayer { } impl AnimationPlayer { - /// Start playing an animation, resetting state of the player - /// This will use a linear blending between the previous and the new animation to make a smooth transition + /// Start playing an animation, resetting state of the player. + /// This will use a linear blending between the previous and the new animation to make a smooth transition. pub fn start(&mut self, handle: Handle) -> &mut Self { self.animation = PlayingAnimation { animation_clip: handle, @@ -193,8 +193,8 @@ impl AnimationPlayer { self } - /// Start playing an animation, resetting state of the player - /// This will use a linear blending between the previous and the new animation to make a smooth transition + /// Start playing an animation, resetting state of the player. + /// This will use a linear blending between the previous and the new animation to make a smooth transition. pub fn start_with_transition( &mut self, handle: Handle, @@ -208,7 +208,7 @@ impl AnimationPlayer { // Add the current transition. If other transitions are still ongoing, // this will keep those transitions running and cause a transition between - // the output of that previous transition to the new animation. + // the output of that previous transition to the new animation self.transitions.push(AnimationTransition { current_weight: 1.0, weight_decline_per_sec: 1.0 / transition_duration.as_secs_f32(), From 738b55255676fd1745237f54be3a072d09f147b2 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 21:49:03 +0200 Subject: [PATCH 05/11] fix link to Assets::get --- crates/bevy_asset/src/assets.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_asset/src/assets.rs b/crates/bevy_asset/src/assets.rs index 8a91fd701ad8b..b586acaeb56ff 100644 --- a/crates/bevy_asset/src/assets.rs +++ b/crates/bevy_asset/src/assets.rs @@ -146,7 +146,7 @@ impl Assets { /// Get mutable access to the asset for the given handle. /// /// This is the main method for mutably accessing asset data from an [Assets] collection. If you - /// do not need mutable access to the asset, you may also use [get](Assets::get). + /// do not need mutable access to the asset, you may also use [`get`](Assets::get). pub fn get_mut(&mut self, handle: &Handle) -> Option<&mut T> { let id: HandleId = handle.into(); self.events.send(AssetEvent::Modified { From 3cc8c90910d38fbf911761a054557bee81a9cd5c Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 21:57:02 +0200 Subject: [PATCH 06/11] change [`winit`] to `winit` --- crates/bevy_winit/src/lib.rs | 4 ++-- crates/bevy_winit/src/winit_windows.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_winit/src/lib.rs b/crates/bevy_winit/src/lib.rs index 8c79494dec350..8b923506766ab 100644 --- a/crates/bevy_winit/src/lib.rs +++ b/crates/bevy_winit/src/lib.rs @@ -63,10 +63,10 @@ use crate::web_resize::{CanvasParentResizeEventChannel, CanvasParentResizePlugin #[cfg(target_os = "android")] pub static ANDROID_APP: std::sync::OnceLock = std::sync::OnceLock::new(); -/// A [`Plugin`] that uses [`winit`] to create and manage windows, and receive window and input +/// A [`Plugin`] that uses `winit` to create and manage windows, and receive window and input /// events. /// -/// This plugin will add systems and resources that sync with the [`winit`] backend and also +/// This plugin will add systems and resources that sync with the `winit` backend and also /// replace the exising [`App`] runner with one that constructs an [event loop](EventLoop) to /// receive window and input events from the OS. #[derive(Default)] diff --git a/crates/bevy_winit/src/winit_windows.rs b/crates/bevy_winit/src/winit_windows.rs index 4c7f30df6fa82..a2d5b22c2c034 100644 --- a/crates/bevy_winit/src/winit_windows.rs +++ b/crates/bevy_winit/src/winit_windows.rs @@ -21,7 +21,7 @@ use crate::{ converters::{convert_enabled_buttons, convert_window_level, convert_window_theme}, }; -/// A resource mapping window entities to their [`winit`]-backend [`Window`](winit::window::Window) +/// A resource mapping window entities to their `winit`-backend [`Window`](winit::window::Window) /// states. #[derive(Debug, Default)] pub struct WinitWindows { From cc8a55dd5590d96794d8595d24f079f1c935b696 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 22:08:20 +0200 Subject: [PATCH 07/11] fix example link --- crates/bevy_audio/src/audio_source.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_audio/src/audio_source.rs b/crates/bevy_audio/src/audio_source.rs index 93b951e9f7b5e..367e36ecc2d73 100644 --- a/crates/bevy_audio/src/audio_source.rs +++ b/crates/bevy_audio/src/audio_source.rs @@ -68,7 +68,7 @@ impl AssetLoader for AudioLoader { /// in order to be registered. /// Types that implement this trait usually contain raw sound data that can be converted into an iterator of samples. /// This trait is implemented for [`AudioSource`]. -/// Check the example `audio/decodable` for how to implement this trait on a custom type. +/// Check the example [`decodable`](https://github.com/bevyengine/bevy/blob/latest/examples/audio/decodable.rs) for how to implement this trait on a custom type. pub trait Decodable: Send + Sync + 'static { /// The type of the audio samples. /// Usually a [`u16`], [`i16`] or [`f32`], as those implement [`rodio::Sample`]. From c9e1c0fc05483cb2575bf26092c4a0386c55e0c3 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 22:19:14 +0200 Subject: [PATCH 08/11] cargo fmt --- crates/bevy_transform/src/commands.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs index 4a7c7376a5687..cd8348818adfb 100644 --- a/crates/bevy_transform/src/commands.rs +++ b/crates/bevy_transform/src/commands.rs @@ -4,7 +4,6 @@ use bevy_ecs::{prelude::Entity, system::Command, system::EntityCommands, world::World}; use bevy_hierarchy::{AddChild, RemoveParent}; - use crate::{GlobalTransform, Transform}; /// Command similar to [`AddChild`], but updating the child transform to keep From d832745f9c06c1126ceb954857daa477e3337909 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 23:27:54 +0200 Subject: [PATCH 09/11] fix links --- crates/bevy_transform/src/commands.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/bevy_transform/src/commands.rs b/crates/bevy_transform/src/commands.rs index cd8348818adfb..abd1ab5d65440 100644 --- a/crates/bevy_transform/src/commands.rs +++ b/crates/bevy_transform/src/commands.rs @@ -60,13 +60,13 @@ impl Command for RemoveParentInPlace { update_transform(); } } -/// Collection of methods similar to [`BuildChildren`], but preserving each +/// Collection of methods similar to [`BuildChildren`](bevy_hierarchy::BuildChildren), but preserving each /// entity's [`GlobalTransform`]. pub trait BuildChildrenTransformExt { /// Change this entity's parent while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`]. /// - /// See [`BuildChildren::set_parent`](bevy_hierarchy::child_builder::BuildChildren::set_parent) for a method that doesn't update the + /// See [`BuildChildren::set_parent`](bevy_hierarchy::BuildChildren::set_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute @@ -77,7 +77,7 @@ pub trait BuildChildrenTransformExt { /// Make this entity parentless while preserving this entity's [`GlobalTransform`] /// by updating its [`Transform`] to be equal to its current [`GlobalTransform`]. /// - /// See [`BuildChildren::remove_parent`](bevy_hierarchy::child_builder::BuildChildren::remove_parent) for a method that doesn't update the + /// See [`BuildChildren::remove_parent`](bevy_hierarchy::BuildChildren::remove_parent) for a method that doesn't update the /// [`Transform`]. /// /// Note that both the hierarchy and transform updates will only execute From 81b784a55c49eeaebf12d296e8075977144f7465 Mon Sep 17 00:00:00 2001 From: Emi Date: Wed, 30 Aug 2023 23:31:52 +0200 Subject: [PATCH 10/11] Add point back --- crates/bevy_animation/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index 459712dd91f63..9f71c50af9e7b 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -208,7 +208,7 @@ impl AnimationPlayer { // Add the current transition. If other transitions are still ongoing, // this will keep those transitions running and cause a transition between - // the output of that previous transition to the new animation + // the output of that previous transition to the new animation. self.transitions.push(AnimationTransition { current_weight: 1.0, weight_decline_per_sec: 1.0 / transition_duration.as_secs_f32(), From 96959fa7847d8f8fecdc1bb0a4e1230df56288e1 Mon Sep 17 00:00:00 2001 From: Emi <95967983+EmiOnGit@users.noreply.github.com> Date: Thu, 31 Aug 2023 12:46:50 +0200 Subject: [PATCH 11/11] Update crates/bevy_audio/src/audio.rs Co-authored-by: Nicola Papale --- crates/bevy_audio/src/audio.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_audio/src/audio.rs b/crates/bevy_audio/src/audio.rs index 0a39c4d6331cb..c7d8cd6b82acb 100644 --- a/crates/bevy_audio/src/audio.rs +++ b/crates/bevy_audio/src/audio.rs @@ -53,7 +53,7 @@ impl VolumeLevel { } } -/// Playback mode controls +/// The way Bevy manages the sound playback. #[derive(Debug, Clone, Copy)] pub enum PlaybackMode { /// Play the sound once. Do nothing when it ends.