✏️ Fix typos across bevy (#16702)

# Objective

Fixes typos in bevy project, following suggestion in
https://github.com/bevyengine/bevy-website/pull/1912#pullrequestreview-2483499337

## Solution

I used https://github.com/crate-ci/typos to find them.

I included only the ones that feel undebatable too me, but I am not in
game engine so maybe some terms are expected.

I left out the following typos:
- `reparametrize` => `reparameterize`: There are a lot of occurences, I
believe this was expected
- `semicircles` => `hemicircles`: 2 occurences, may mean something
specific in geometry
- `invertation` => `inversion`: may mean something specific
- `unparented` => `parentless`: may mean something specific
- `metalness` => `metallicity`: may mean something specific

## Testing

- Did you test these changes? If so, how? I did not test the changes,
most changes are related to raw text. I expect the others to be tested
by the CI.
- Are there any parts that need more testing? I do not think
- How can other people (reviewers) test your changes? Is there anything
specific they need to know? To me there is nothing to test
- If relevant, what platforms did you test these changes on, and are
there any important ones you can't test?

---

## Migration Guide

> This section is optional. If there are no breaking changes, you can
delete this section.

(kept in case I include the `reparameterize` change here)

- If this PR is a breaking change (relative to the last release of
Bevy), describe how a user might need to migrate their code to support
these changes
- Simply adding new functionality is not a breaking change.
- Fixing behavior that was definitely a bug, rather than a questionable
design choice is not a breaking change.

## Questions

- [x] Should I include the above typos? No
(https://github.com/bevyengine/bevy/pull/16702#issuecomment-2525271152)
- [ ] Should I add `typos` to the CI? (I will check how to configure it
properly)

This project looks awesome, I really enjoy reading the progress made,
thanks to everyone involved.
This commit is contained in:
homersimpsons 2024-12-08 02:18:39 +01:00 committed by GitHub
parent 48fb4aa6d5
commit 0707c0717b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 44 additions and 44 deletions

View file

@ -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;

View file

@ -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

View file

@ -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
///

View file

@ -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<OrderIndependentTransparencySettings>>)
}
/// 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 {

View file

@ -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.

View file

@ -144,7 +144,7 @@ impl<T> ThinArrayPtr<T> {
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<T> ThinArrayPtr<T> {
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<T> ThinArrayPtr<T> {
#[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) }

View file

@ -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)

View file

@ -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 {

View file

@ -284,7 +284,7 @@ pub struct GltfSkin {
pub name: String,
/// All the nodes that form this skin.
pub joints: Vec<Handle<GltfNode>>,
/// Inverse-bind matricy of this skin.
/// Inverse-bind matrices of this skin.
pub inverse_bind_matrices: Handle<SkinnedMeshInverseBindposes>,
/// Additional data.
pub extras: Option<GltfExtras>,

View file

@ -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());
}
}

View file

@ -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,

View file

@ -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();

View file

@ -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.");
}

View file

@ -289,7 +289,7 @@ fn sample_triangle_interior<P: NormedVectorSpace, R: Rng + ?Sized>(
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);

View file

@ -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,
}

View file

@ -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.

View file

@ -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)) {

View file

@ -18,7 +18,7 @@
//! .observe(|mut trigger: Trigger<Pointer<Click>>| {
//! // Get the underlying event type
//! let click_event: &Pointer<Click> = 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)]

View file

@ -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}`")]

View file

@ -331,7 +331,7 @@ mod tests {
.get::<Parent>()
.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"
);
}

View file

@ -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(

View file

@ -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 {

View file

@ -158,7 +158,7 @@ adb uninstall org.bevyengine.example
In its examples, Bevy targets the minimum Android API that Play Store <!-- markdown-link-check-disable -->
[requires](https://developer.android.com/distribute/best-practices/develop/target-sdk) to upload and update apps. <!-- markdown-link-check-enable -->
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:

View file

@ -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).

View file

@ -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,

View file

@ -102,7 +102,7 @@ fn cycle_scenes(
mut scene_id: Local<usize>,
) {
if keyboard_input.just_pressed(KeyCode::KeyC) {
// depsawn current scene
// despawn current scene
for e in &q {
commands.entity(e).despawn_recursive();
}

View file

@ -626,7 +626,7 @@ adb uninstall org.bevyengine.example
In its examples, Bevy targets the minimum Android API that Play Store <!-- markdown-link-check-disable -->
[requires](https://developer.android.com/distribute/best-practices/develop/target-sdk) to upload and update apps. <!-- markdown-link-check-enable -->
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:

View file

@ -275,12 +275,12 @@ fn simulate_particles(
time: Res<Time>,
) {
for (entity, mut transform, mut particle) in &mut query {
if particle.lifeteime_timer.tick(time.delta()).just_finished() {
if particle.lifetime_timer.tick(time.delta()).just_finished() {
commands.entity(entity).despawn();
} else {
transform.translation += particle.velocity * time.delta_secs();
transform.scale =
Vec3::splat(particle.size.lerp(0.0, particle.lifeteime_timer.fraction()));
Vec3::splat(particle.size.lerp(0.0, particle.lifetime_timer.fraction()));
particle
.velocity
.smooth_nudge(&Vec3::ZERO, 4.0, time.delta_secs());
@ -299,7 +299,7 @@ fn spawn_particle<M: Material>(
move |world: &mut World| {
world.spawn((
Particle {
lifeteime_timer: Timer::from_seconds(lifetime, TimerMode::Once),
lifetime_timer: Timer::from_seconds(lifetime, TimerMode::Once),
size,
velocity,
},
@ -316,7 +316,7 @@ fn spawn_particle<M: Material>(
#[derive(Component)]
struct Particle {
lifeteime_timer: Timer,
lifetime_timer: Timer,
size: f32,
velocity: Vec3,
}

View file

@ -60,7 +60,7 @@ fn setup(mut commands: Commands) {
// As such, we cannot use curves in these spaces.
// However, we can still mix these colors and animate that way. In fact, mixing colors works in any color space.
// Spawn a spritre using the provided colors for mixing.
// Spawn a sprite using the provided colors for mixing.
spawn_mixed_sprite(&mut commands, -75., colors.map(Hsla::from));
spawn_mixed_sprite(&mut commands, -175., colors.map(Srgba::from));
@ -110,7 +110,7 @@ fn animate_mixed<T: MixedColor>(
// For four colors, there are three intervals between those colors;
let intervals = (mixed.0.len() - 1) as f32;
// Next we determine the index of the first of the two colorts to mix.
// Next we determine the index of the first of the two colors to mix.
let start_i = (t * intervals).floor().min(intervals - 1.);
// Lastly we determine the 'local' value of t in this interval.

View file

@ -154,7 +154,7 @@ type DrawSpecializedPipelineCommands = (
/// rendered entity.
type WithCustomRenderedEntity = With<CustomRenderedEntity>;
// This contains the state needed to speciazlize a mesh pipeline
// This contains the state needed to specialize a mesh pipeline
#[derive(Resource)]
struct CustomMeshPipeline {
/// The base mesh pipeline defined by bevy

View file

@ -505,7 +505,7 @@ header_message = \"Examples (WebGL2)\"
continue;
}
// This beautifys the category name
// This beautifies the category name
// to make it a good looking URL
// rather than having weird whitespace
// and other characters that don't