diff --git a/crates/bevy_animation/src/lib.rs b/crates/bevy_animation/src/lib.rs index 69d036415e..b782c8d709 100644 --- a/crates/bevy_animation/src/lib.rs +++ b/crates/bevy_animation/src/lib.rs @@ -658,7 +658,7 @@ impl ActiveAnimation { /// /// Note that any events between the current time and `seek_time` /// will be triggered on the next update. - /// Use [`set_seek_time`](Self::set_seek_time) if this is undisered. + /// Use [`set_seek_time`](Self::set_seek_time) if this is undesired. pub fn seek_to(&mut self, seek_time: f32) -> &mut Self { self.last_seek_time = Some(self.seek_time); self.seek_time = seek_time; @@ -669,7 +669,7 @@ impl ActiveAnimation { /// /// Note that any events between the current time and `0.0` /// will be triggered on the next update. - /// Use [`set_seek_time`](Self::set_seek_time) if this is undisered. + /// Use [`set_seek_time`](Self::set_seek_time) if this is undesired. pub fn rewind(&mut self) -> &mut Self { self.last_seek_time = Some(self.seek_time); self.seek_time = 0.0; diff --git a/crates/bevy_asset/src/server/mod.rs b/crates/bevy_asset/src/server/mod.rs index fc97ad775e..4365eeb1b3 100644 --- a/crates/bevy_asset/src/server/mod.rs +++ b/crates/bevy_asset/src/server/mod.rs @@ -1384,7 +1384,7 @@ impl AssetServer { /// asset from being dropped. /// If you have access to an asset's strong [`Handle`], you should prefer to call /// [`AssetServer::wait_for_asset`] - /// or [`wait_for_assest_untyped`](Self::wait_for_asset_untyped) to ensure the asset finishes + /// or [`wait_for_asset_untyped`](Self::wait_for_asset_untyped) to ensure the asset finishes /// loading. /// /// # Errors diff --git a/crates/bevy_core_pipeline/src/core_3d/camera_3d.rs b/crates/bevy_core_pipeline/src/core_3d/camera_3d.rs index 3b60d8fde6..2053b96882 100644 --- a/crates/bevy_core_pipeline/src/core_3d/camera_3d.rs +++ b/crates/bevy_core_pipeline/src/core_3d/camera_3d.rs @@ -42,7 +42,7 @@ pub struct Camera3d { /// /// Roughly corresponds to how many “layers of transparency” are rendered for screen space /// specular transmissive objects. Each step requires making one additional - /// texture copy, so it's recommended to keep this number to a resonably low value. Defaults to `1`. + /// texture copy, so it's recommended to keep this number to a reasonably low value. Defaults to `1`. /// /// ### Notes /// diff --git a/crates/bevy_core_pipeline/src/oit/mod.rs b/crates/bevy_core_pipeline/src/oit/mod.rs index 754b67a2a7..c01b2a286e 100644 --- a/crates/bevy_core_pipeline/src/oit/mod.rs +++ b/crates/bevy_core_pipeline/src/oit/mod.rs @@ -31,7 +31,7 @@ use crate::core_3d::{ Camera3d, }; -/// Module that defines the necesasry systems to resolve the OIT buffer and render it to the screen. +/// Module that defines the necessary systems to resolve the OIT buffer and render it to the screen. pub mod resolve; /// Shader handle for the shader that draws the transparent meshes to the OIT layers buffer. @@ -186,7 +186,7 @@ fn check_msaa(cameras: Query<&Msaa, With>) } /// Holds the buffers that contain the data of all OIT layers. -/// We use one big buffer for the entire app. Each camaera will reuse it so it will +/// We use one big buffer for the entire app. Each camera will reuse it so it will /// always be the size of the biggest OIT enabled camera. #[derive(Resource)] pub struct OitBuffers { diff --git a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs index 3585d74e0e..8ee9c3575b 100644 --- a/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs +++ b/crates/bevy_ecs/src/schedule/executor/multi_threaded.rs @@ -298,7 +298,7 @@ impl<'scope, 'env: 'scope, 'sys> Context<'scope, 'env, 'sys> { fn tick_executor(&self) { // Ensure that the executor handles any events pushed to the system_completion queue by this thread. - // If this thread acquires the lock, the exector runs after the push() and they are processed. + // If this thread acquires the lock, the executor runs after the push() and they are processed. // If this thread does not acquire the lock, then the is_empty() check on the other thread runs // after the lock is released, which is after try_lock() failed, which is after the push() // on this thread, so the is_empty() check will see the new events and loop. diff --git a/crates/bevy_ecs/src/storage/thin_array_ptr.rs b/crates/bevy_ecs/src/storage/thin_array_ptr.rs index a4d25265e0..e6ed11774b 100644 --- a/crates/bevy_ecs/src/storage/thin_array_ptr.rs +++ b/crates/bevy_ecs/src/storage/thin_array_ptr.rs @@ -144,7 +144,7 @@ impl ThinArrayPtr { let ptr = unsafe { self.data.as_ptr().add(index) }; // SAFETY: // - The pointer is properly aligned - // - It is derefrancable (all in the same allocation) + // - It is dereferenceable (all in the same allocation) // - `index` < `len` and the element is safe to write to, so its valid // - We have a reference to self, so no other mutable accesses to the element can occur unsafe { @@ -166,7 +166,7 @@ impl ThinArrayPtr { let ptr = unsafe { self.data.as_ptr().add(index) }; // SAFETY: // - The pointer is properly aligned - // - It is derefrancable (all in the same allocation) + // - It is dereferenceable (all in the same allocation) // - `index` < `len` and the element is safe to write to, so its valid // - We have a mutable reference to `self` unsafe { @@ -294,7 +294,7 @@ impl ThinArrayPtr { #[inline] pub unsafe fn as_slice(&self, slice_len: usize) -> &[T] { // SAFETY: - // - the data is valid - allocated with the same allocater + // - the data is valid - allocated with the same allocator // - non-null and well-aligned // - we have a shared reference to self - the data will not be mutated during 'a unsafe { core::slice::from_raw_parts(self.data.as_ptr(), slice_len) } diff --git a/crates/bevy_ecs/src/world/reflect.rs b/crates/bevy_ecs/src/world/reflect.rs index f0f9829265..71dc7a5222 100644 --- a/crates/bevy_ecs/src/world/reflect.rs +++ b/crates/bevy_ecs/src/world/reflect.rs @@ -164,7 +164,7 @@ impl World { }; // HACK: Only required for the `None`-case/`else`-branch, but it borrows `self`, which will - // already be mutablyy borrowed by `self.get_mut_by_id()`, and I didn't find a way around it. + // already be mutably borrowed by `self.get_mut_by_id()`, and I didn't find a way around it. let component_name = self .components() .get_name(component_id) diff --git a/crates/bevy_gizmos/src/primitives/helpers.rs b/crates/bevy_gizmos/src/primitives/helpers.rs index 66e171c6c9..f6cdfcf0d3 100644 --- a/crates/bevy_gizmos/src/primitives/helpers.rs +++ b/crates/bevy_gizmos/src/primitives/helpers.rs @@ -4,7 +4,7 @@ use bevy_math::{ops, Vec2}; /// Calculates the `nth` coordinate of a circle. /// -/// Given a circle's radiu and its resolution, this function computes the position +/// Given a circle's radius and its resolution, this function computes the position /// of the `nth` point along the circumference of the circle. The rotation starts at `(0.0, radius)` /// and proceeds counter-clockwise. pub(crate) fn single_circle_coordinate(radius: f32, resolution: u32, nth_point: u32) -> Vec2 { diff --git a/crates/bevy_gltf/src/lib.rs b/crates/bevy_gltf/src/lib.rs index 46f9ad3ae9..b96d49c12d 100644 --- a/crates/bevy_gltf/src/lib.rs +++ b/crates/bevy_gltf/src/lib.rs @@ -284,7 +284,7 @@ pub struct GltfSkin { pub name: String, /// All the nodes that form this skin. pub joints: Vec>, - /// Inverse-bind matricy of this skin. + /// Inverse-bind matrices of this skin. pub inverse_bind_matrices: Handle, /// Additional data. pub extras: Option, diff --git a/crates/bevy_image/src/image_texture_conversion.rs b/crates/bevy_image/src/image_texture_conversion.rs index 8d7c7b514f..7956e810cb 100644 --- a/crates/bevy_image/src/image_texture_conversion.rs +++ b/crates/bevy_image/src/image_texture_conversion.rs @@ -229,7 +229,7 @@ mod test { let image = Image::from_dynamic(initial.clone(), true, RenderAssetUsages::RENDER_WORLD); - // NOTE: Fails if `is_srbg = false` or the dynamic image is of the type rgb8. + // NOTE: Fails if `is_srgb = false` or the dynamic image is of the type rgb8. assert_eq!(initial, image.try_into_dynamic().unwrap()); } } diff --git a/crates/bevy_image/src/ktx2.rs b/crates/bevy_image/src/ktx2.rs index 27c5007f43..ff89a95ef2 100644 --- a/crates/bevy_image/src/ktx2.rs +++ b/crates/bevy_image/src/ktx2.rs @@ -1502,7 +1502,7 @@ mod tests { #[test] fn test_ktx_levels() { - // R8UnormSrgb textture with 4x4 pixels data and 3 levels of mipmaps + // R8UnormSrgb texture with 4x4 pixels data and 3 levels of mipmaps let buffer = vec![ 0xab, 0x4b, 0x54, 0x58, 0x20, 0x32, 0x30, 0xbb, 0x0d, 10, 0x1a, 10, 0x0f, 0, 0, 0, 1, 0, 0, 0, 4, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, diff --git a/crates/bevy_math/src/bounding/bounded3d/extrusion.rs b/crates/bevy_math/src/bounding/bounded3d/extrusion.rs index f70101bdd0..5403fa176e 100644 --- a/crates/bevy_math/src/bounding/bounded3d/extrusion.rs +++ b/crates/bevy_math/src/bounding/bounded3d/extrusion.rs @@ -223,7 +223,7 @@ pub trait BoundedExtrusion: Primitive2d + Bounded2d { let line_normal = (conjugate_rot * intersect_line).yx(); let angle = line_normal.to_angle(); - // Since the plane containing the caps of the extrusion is not guaranteed to be orthgonal to the `ax` plane, only a certain "scale" factor + // Since the plane containing the caps of the extrusion is not guaranteed to be orthogonal to the `ax` plane, only a certain "scale" factor // of the `Aabb2d` will actually go towards the dimensions of the `Aabb3d` let scale = cap_normal.reject_from(ax).length(); diff --git a/crates/bevy_math/src/direction.rs b/crates/bevy_math/src/direction.rs index d427a24261..5e11d1434b 100644 --- a/crates/bevy_math/src/direction.rs +++ b/crates/bevy_math/src/direction.rs @@ -936,7 +936,7 @@ mod tests { // `dir_a` should've gotten denormalized, meanwhile `dir_b` should stay normalized. assert!( !dir_a.is_normalized(), - "Dernormalization doesn't work, test is faulty" + "Denormalization doesn't work, test is faulty" ); assert!(dir_b.is_normalized(), "Renormalisation did not work."); } @@ -1007,7 +1007,7 @@ mod tests { // `dir_a` should've gotten denormalized, meanwhile `dir_b` should stay normalized. assert!( !dir_a.is_normalized(), - "Dernormalization doesn't work, test is faulty" + "Denormalization doesn't work, test is faulty" ); assert!(dir_b.is_normalized(), "Renormalisation did not work."); } @@ -1078,7 +1078,7 @@ mod tests { // `dir_a` should've gotten denormalized, meanwhile `dir_b` should stay normalized. assert!( !dir_a.is_normalized(), - "Dernormalization doesn't work, test is faulty" + "Denormalization doesn't work, test is faulty" ); assert!(dir_b.is_normalized(), "Renormalisation did not work."); } diff --git a/crates/bevy_math/src/sampling/shape_sampling.rs b/crates/bevy_math/src/sampling/shape_sampling.rs index 8489a88f19..68d77cd1d7 100644 --- a/crates/bevy_math/src/sampling/shape_sampling.rs +++ b/crates/bevy_math/src/sampling/shape_sampling.rs @@ -289,7 +289,7 @@ fn sample_triangle_interior( let ab = b - a; let ac = c - a; - // Generate random points on a parallelipiped and reflect so that + // Generate random points on a parallelepiped and reflect so that // we can use the points that lie outside the triangle let u = rng.gen_range(0.0..=1.0); let v = rng.gen_range(0.0..=1.0); diff --git a/crates/bevy_pbr/src/light/mod.rs b/crates/bevy_pbr/src/light/mod.rs index 0b93c93c67..a5d6fcf5d0 100644 --- a/crates/bevy_pbr/src/light/mod.rs +++ b/crates/bevy_pbr/src/light/mod.rs @@ -514,7 +514,7 @@ pub enum SimulationLightSystems { UpdateDirectionalLightCascades, UpdateLightFrusta, /// System order ambiguities between systems in this set are ignored: - /// the order of systems within this set is irrelevant, as the various visibility-checking systesms + /// the order of systems within this set is irrelevant, as the various visibility-checking systems /// assumes that their operations are irreversible during the frame. CheckLightVisibility, } diff --git a/crates/bevy_pbr/src/pbr_material.rs b/crates/bevy_pbr/src/pbr_material.rs index fffbaebc92..1a679c08fa 100644 --- a/crates/bevy_pbr/src/pbr_material.rs +++ b/crates/bevy_pbr/src/pbr_material.rs @@ -185,7 +185,7 @@ pub struct StandardMaterial { /// The amount of light transmitted _diffusely_ through the material (i.e. “translucency”) /// /// Implemented as a second, flipped [Lambertian diffuse](https://en.wikipedia.org/wiki/Lambertian_reflectance) lobe, - /// which provides an inexpensive but plausible approximation of translucency for thin dieletric objects (e.g. paper, + /// which provides an inexpensive but plausible approximation of translucency for thin dielectric objects (e.g. paper, /// leaves, some fabrics) or thicker volumetric materials with short scattering distances (e.g. porcelain, wax). /// /// For specular transmission usecases with refraction (e.g. glass) use the [`StandardMaterial::specular_transmission`] and @@ -231,7 +231,7 @@ pub struct StandardMaterial { /// /// ## Performance /// - /// Specular transmission is implemented as a relatively expensive screen-space effect that allows ocluded objects to be seen through the material, + /// Specular transmission is implemented as a relatively expensive screen-space effect that allows occluded objects to be seen through the material, /// with distortion and blur effects. /// /// - [`Camera3d::screen_space_specular_transmission_steps`](bevy_core_pipeline::core_3d::Camera3d::screen_space_specular_transmission_steps) can be used to enable transmissive objects @@ -463,7 +463,7 @@ pub struct StandardMaterial { /// /// Note that, if a clearcoat normal map isn't specified, the main normal /// map, if any, won't be applied to the clearcoat. If you want a normal map - /// that applies to both the main materal and to the clearcoat, specify it + /// that applies to both the main material and to the clearcoat, specify it /// in both [`StandardMaterial::normal_map_texture`] and this field. /// /// As this is a non-color map, it must not be loaded as sRGB. diff --git a/crates/bevy_picking/src/events.rs b/crates/bevy_picking/src/events.rs index 0be935985e..aea4995818 100644 --- a/crates/bevy_picking/src/events.rs +++ b/crates/bevy_picking/src/events.rs @@ -322,7 +322,7 @@ impl PointerState { .or_default() } - /// Clears all the data assoceated with all of the buttons on a pointer. Does not free the underlying memory. + /// Clears all the data associated with all of the buttons on a pointer. Does not free the underlying memory. pub fn clear(&mut self, pointer_id: PointerId) { for button in PointerButton::iter() { if let Some(state) = self.pointer_buttons.get_mut(&(pointer_id, button)) { diff --git a/crates/bevy_picking/src/lib.rs b/crates/bevy_picking/src/lib.rs index b77fab9b37..1933bd7a7a 100644 --- a/crates/bevy_picking/src/lib.rs +++ b/crates/bevy_picking/src/lib.rs @@ -18,7 +18,7 @@ //! .observe(|mut trigger: Trigger>| { //! // Get the underlying event type //! let click_event: &Pointer = trigger.event(); -//! // Stop the event from bubbling up the entity hierarchjy +//! // Stop the event from bubbling up the entity hierarchy //! trigger.propagate(false); //! }); //! ``` @@ -288,7 +288,7 @@ impl PluginGroup for DefaultPickingPlugins { /// This plugin sets up the core picking infrastructure. It receives input events, and provides the shared /// types used by other picking plugins. /// -/// This plugin contains several settings, and is added to the wrold as a resource after initialization. You +/// This plugin contains several settings, and is added to the world as a resource after initialization. You /// can configure picking settings at runtime through the resource. #[derive(Copy, Clone, Debug, Resource, Reflect)] #[reflect(Resource, Default, Debug)] diff --git a/crates/bevy_reflect/src/reflect.rs b/crates/bevy_reflect/src/reflect.rs index f3642d66b3..2bc12e0662 100644 --- a/crates/bevy_reflect/src/reflect.rs +++ b/crates/bevy_reflect/src/reflect.rs @@ -38,7 +38,7 @@ pub enum ApplyError { }, #[error("attempted to apply type with {from_size} size to a type with {to_size} size")] - /// Attempted to apply to types with mismatched sizez, e.g. a [u8; 4] to [u8; 3]. + /// Attempted to apply to types with mismatched sizes, e.g. a [u8; 4] to [u8; 3]. DifferentSize { from_size: usize, to_size: usize }, #[error("variant with name `{variant_name}` does not exist on enum `{enum_name}`")] diff --git a/crates/bevy_scene/src/dynamic_scene.rs b/crates/bevy_scene/src/dynamic_scene.rs index 123ebf93ae..babc45f7f1 100644 --- a/crates/bevy_scene/src/dynamic_scene.rs +++ b/crates/bevy_scene/src/dynamic_scene.rs @@ -331,7 +331,7 @@ mod tests { .get::() .expect("something is wrong with this test, and the scene components don't have a parent/child relationship") .get(), - "something is wrong with the this test or the code reloading scenes since the relationship between scene entities is broken" + "something is wrong with this test or the code reloading scenes since the relationship between scene entities is broken" ); } diff --git a/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs b/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs index 4c53e321ae..87245d463f 100644 --- a/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs +++ b/crates/bevy_sprite/src/dynamic_texture_atlas_builder.rs @@ -38,7 +38,7 @@ impl DynamicTextureAtlasBuilder { /// /// # Arguments /// - /// * `altas_layout` - The atlas layout to add the texture to. + /// * `atlas_layout` - The atlas layout to add the texture to. /// * `texture` - The source texture to add to the atlas. /// * `atlas_texture` - The destination atlas texture to copy the source texture to. pub fn add_texture( diff --git a/crates/bevy_ui/src/layout/ui_surface.rs b/crates/bevy_ui/src/layout/ui_surface.rs index 8f464abedb..2cb06eca60 100644 --- a/crates/bevy_ui/src/layout/ui_surface.rs +++ b/crates/bevy_ui/src/layout/ui_surface.rs @@ -275,7 +275,7 @@ impl UiSurface { /// Get the layout geometry for the taffy node corresponding to the ui node [`Entity`]. /// Does not compute the layout geometry, `compute_window_layouts` should be run before using this function. - /// On success returns a pair consisiting of the final resolved layout values after rounding + /// On success returns a pair consisting of the final resolved layout values after rounding /// and the size of the node after layout resolution but before rounding. pub fn get_layout(&mut self, entity: Entity) -> Result<(taffy::Layout, Vec2), LayoutError> { let Some(taffy_node) = self.entity_to_taffy.get(&entity) else { diff --git a/docs-template/EXAMPLE_README.md.tpl b/docs-template/EXAMPLE_README.md.tpl index 94e7c07dab..6a821362d1 100644 --- a/docs-template/EXAMPLE_README.md.tpl +++ b/docs-template/EXAMPLE_README.md.tpl @@ -158,7 +158,7 @@ adb uninstall org.bevyengine.example In its examples, Bevy targets the minimum Android API that Play Store [requires](https://developer.android.com/distribute/best-practices/develop/target-sdk) to upload and update apps. -Users of older phones may want to use an older API when testing. By default, Bevy uses [`GameAvtivity`](https://developer.android.com/games/agdk/game-activity), which only works for Android API level 31 and higher, so if you want to use older API, you need to switch to `NativeActivity`. +Users of older phones may want to use an older API when testing. By default, Bevy uses [`GameActivity`](https://developer.android.com/games/agdk/game-activity), which only works for Android API level 31 and higher, so if you want to use older API, you need to switch to `NativeActivity`. To use `NativeActivity`, you need to edit it in `cargo.toml` manually like this: diff --git a/docs/linters.md b/docs/linters.md index d53a4c59cd..67c9db830f 100644 --- a/docs/linters.md +++ b/docs/linters.md @@ -44,4 +44,4 @@ Currently, this is not needed as the extension already disables the rule `MD013` ### Other Linters provided by [super-linter](https://github.com/github/super-linter) -All other linters not mentioned in the this file are not activated and can be seen [here](https://github.com/github/super-linter#supported-linters). +All other linters not mentioned in this file are not activated and can be seen [here](https://github.com/github/super-linter#supported-linters). diff --git a/examples/3d/irradiance_volumes.rs b/examples/3d/irradiance_volumes.rs index b3da971e36..39e097f895 100644 --- a/examples/3d/irradiance_volumes.rs +++ b/examples/3d/irradiance_volumes.rs @@ -469,7 +469,7 @@ fn handle_mouse_clicks( }; let plane_intersection = ray.origin + ray.direction.normalize() * ray_distance; - // Move all the main objeccts. + // Move all the main objects. for mut transform in main_objects.iter_mut() { transform.translation = vec3( plane_intersection.x, diff --git a/examples/3d/order_independent_transparency.rs b/examples/3d/order_independent_transparency.rs index 03590eb21b..74e8edc4d1 100644 --- a/examples/3d/order_independent_transparency.rs +++ b/examples/3d/order_independent_transparency.rs @@ -102,7 +102,7 @@ fn cycle_scenes( mut scene_id: Local, ) { if keyboard_input.just_pressed(KeyCode::KeyC) { - // depsawn current scene + // despawn current scene for e in &q { commands.entity(e).despawn_recursive(); } diff --git a/examples/README.md b/examples/README.md index 1ddb014c97..af1df35e07 100644 --- a/examples/README.md +++ b/examples/README.md @@ -626,7 +626,7 @@ adb uninstall org.bevyengine.example In its examples, Bevy targets the minimum Android API that Play Store [requires](https://developer.android.com/distribute/best-practices/develop/target-sdk) to upload and update apps. -Users of older phones may want to use an older API when testing. By default, Bevy uses [`GameAvtivity`](https://developer.android.com/games/agdk/game-activity), which only works for Android API level 31 and higher, so if you want to use older API, you need to switch to `NativeActivity`. +Users of older phones may want to use an older API when testing. By default, Bevy uses [`GameActivity`](https://developer.android.com/games/agdk/game-activity), which only works for Android API level 31 and higher, so if you want to use older API, you need to switch to `NativeActivity`. To use `NativeActivity`, you need to edit it in `cargo.toml` manually like this: diff --git a/examples/animation/animated_fox.rs b/examples/animation/animated_fox.rs index 537e83a3bc..fe9528ec35 100644 --- a/examples/animation/animated_fox.rs +++ b/examples/animation/animated_fox.rs @@ -275,12 +275,12 @@ fn simulate_particles( time: Res