mirror of
https://github.com/bevyengine/bevy
synced 2024-11-21 20:23:28 +00:00
Fix some typos (#9934)
# Objective To celebrate the turning of the seasons, I took a small walk through the codebase guided by the "[code spell checker](https://marketplace.visualstudio.com/items?itemName=streetsidesoftware.code-spell-checker)" VS Code extension and fixed a few typos.
This commit is contained in:
parent
bc88f33e48
commit
7063c86ed4
16 changed files with 27 additions and 27 deletions
|
@ -817,7 +817,7 @@ impl AssetProcessor {
|
|||
break;
|
||||
}
|
||||
LogEntryError::UnfinishedTransaction(path) => {
|
||||
debug!("Asset {path:?} did not finish processing. Clearning state for that asset");
|
||||
debug!("Asset {path:?} did not finish processing. Clearing state for that asset");
|
||||
if let Err(err) = self.destination_writer().remove(&path).await {
|
||||
match err {
|
||||
AssetWriterError::Io(err) => {
|
||||
|
@ -991,7 +991,7 @@ pub(crate) struct ProcessorAssetInfo {
|
|||
/// * when processing assets in parallel, the processor might read an asset's process_dependencies when processing new versions of those dependencies
|
||||
/// * this second scenario almost certainly isn't possible with the current implementation, but its worth protecting against
|
||||
/// This lock defends against those scenarios by ensuring readers don't read while processed files are being written. And it ensures
|
||||
/// Because this lock is shared across meta and asset bytes, readers can esure they don't read "old" versions of metadata with "new" asset data.
|
||||
/// Because this lock is shared across meta and asset bytes, readers can ensure they don't read "old" versions of metadata with "new" asset data.
|
||||
pub(crate) file_transaction_lock: Arc<async_lock::RwLock<()>>,
|
||||
status_sender: async_broadcast::Sender<ProcessStatus>,
|
||||
status_receiver: async_broadcast::Receiver<ProcessStatus>,
|
||||
|
|
|
@ -1096,7 +1096,7 @@ mod tests {
|
|||
schedule.run(&mut world);
|
||||
assert_eq!(world.resource::<Counter>().0, 2);
|
||||
|
||||
// Run every other cycle oppsite to the last one
|
||||
// Run every other cycle opposite to the last one
|
||||
schedule.add_systems(increment_counter.run_if(not(every_other_time)));
|
||||
|
||||
schedule.run(&mut world);
|
||||
|
|
|
@ -59,7 +59,7 @@ pub type SystemConfig = NodeConfig<BoxedSystem>;
|
|||
|
||||
/// A collections of generic [`NodeConfig`]s.
|
||||
pub enum NodeConfigs<T> {
|
||||
/// Configuratin for a single node.
|
||||
/// Configuration for a single node.
|
||||
NodeConfig(NodeConfig<T>),
|
||||
/// Configuration for a tuple of nested `Configs` instances.
|
||||
Configs {
|
||||
|
|
|
@ -1570,7 +1570,7 @@ impl ScheduleGraph {
|
|||
message
|
||||
}
|
||||
|
||||
/// convert conflics to human readable format
|
||||
/// convert conflicts to human readable format
|
||||
pub fn conflicts_to_string<'a>(
|
||||
&'a self,
|
||||
ambiguities: &'a [(NodeId, NodeId, Vec<ComponentId>)],
|
||||
|
|
|
@ -1107,7 +1107,7 @@ impl<'w, 's, Q: WorldQuery, F: ReadOnlyWorldQuery> Query<'w, 's, Q, F> {
|
|||
|
||||
/// Returns a mutable reference to the component `T` of the given entity.
|
||||
///
|
||||
/// In case of a nonexisting entity, mismatched component or missing write acess, a [`QueryComponentError`] is returned instead.
|
||||
/// In case of a nonexisting entity, mismatched component or missing write access, a [`QueryComponentError`] is returned instead.
|
||||
///
|
||||
/// # Example
|
||||
///
|
||||
|
|
|
@ -149,7 +149,7 @@ pub struct GizmoConfig {
|
|||
pub line_width: f32,
|
||||
/// Apply perspective to gizmo lines.
|
||||
///
|
||||
/// This setting only affects 3D, non-orhographic cameras.
|
||||
/// This setting only affects 3D, non-orthographic cameras.
|
||||
///
|
||||
/// Defaults to `false`.
|
||||
pub line_perspective: bool,
|
||||
|
|
|
@ -592,7 +592,7 @@ impl<T: Reflect> FromType<T> for ReflectFromPtr {
|
|||
unsafe { ptr.deref::<T>() as &dyn Reflect }
|
||||
},
|
||||
from_ptr_mut: |ptr| {
|
||||
// SAFETY: same as above, but foor `as_reflect_mut`, `from_ptr_mut` and `deref_mut`.
|
||||
// SAFETY: same as above, but for `as_reflect_mut`, `from_ptr_mut` and `deref_mut`.
|
||||
unsafe { ptr.deref_mut::<T>() as &mut dyn Reflect }
|
||||
},
|
||||
}
|
||||
|
|
|
@ -784,7 +784,7 @@ pub fn sort_cameras(
|
|||
}
|
||||
}
|
||||
|
||||
/// A subpixel offset to jitter a perspective camera's fustrum by.
|
||||
/// A subpixel offset to jitter a perspective camera's frustum by.
|
||||
///
|
||||
/// Useful for temporal rendering techniques.
|
||||
///
|
||||
|
|
|
@ -116,7 +116,7 @@ impl ViewVisibility {
|
|||
/// This will be automatically reset to `false` every frame in [`VisibilityPropagate`] and then set
|
||||
/// to the proper value in [`CheckVisibility`].
|
||||
///
|
||||
/// You should only manaully set this if you are defining a custom visibility system,
|
||||
/// You should only manually set this if you are defining a custom visibility system,
|
||||
/// in which case the system should be placed in the [`CheckVisibility`] set.
|
||||
/// For normal user-defined entity visibility, see [`Visibility`].
|
||||
///
|
||||
|
@ -315,15 +315,15 @@ fn visibility_propagate_system(
|
|||
Some(parent) => visibility_query.get(parent.get()).unwrap().1.get(),
|
||||
},
|
||||
};
|
||||
let (_, mut inherited_visiblity) = visibility_query
|
||||
let (_, mut inherited_visibility) = visibility_query
|
||||
.get_mut(entity)
|
||||
.expect("With<InheritedVisibility> ensures this query will return a value");
|
||||
|
||||
// Only update the visibility if it has changed.
|
||||
// This will also prevent the visibility from propagating multiple times in the same frame
|
||||
// if this entity's visiblity has been updated recursively by its parent.
|
||||
if inherited_visiblity.get() != is_visible {
|
||||
inherited_visiblity.0 = is_visible;
|
||||
// if this entity's visibility has been updated recursively by its parent.
|
||||
if inherited_visibility.get() != is_visible {
|
||||
inherited_visibility.0 = is_visible;
|
||||
|
||||
// Recursively update the visibility of each child.
|
||||
for &child in children.into_iter().flatten() {
|
||||
|
@ -343,7 +343,7 @@ fn propagate_recursive(
|
|||
// We use a result here to use the `?` operator. Ideally we'd use a try block instead
|
||||
) -> Result<(), ()> {
|
||||
// Get the visibility components for the current entity.
|
||||
// If the entity does not have the requuired components, just return early.
|
||||
// If the entity does not have the required components, just return early.
|
||||
let (visibility, mut inherited_visibility) = visibility_query.get_mut(entity).map_err(drop)?;
|
||||
|
||||
let is_visible = match visibility {
|
||||
|
@ -458,7 +458,7 @@ pub fn check_visibility(
|
|||
let (entity, inherited_visibility, mut view_visibility, maybe_entity_mask) = query_item;
|
||||
|
||||
// Skip computing visibility for entities that are configured to be hidden.
|
||||
// ViewVisiblity has already been reset in `reset_view_visibility`.
|
||||
// `ViewVisibility` has already been reset in `reset_view_visibility`.
|
||||
if !inherited_visibility.get() {
|
||||
return;
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ mod test {
|
|||
}
|
||||
|
||||
#[test]
|
||||
fn visibility_progation_change_detection() {
|
||||
fn visibility_propagation_change_detection() {
|
||||
let mut world = World::new();
|
||||
let mut schedule = Schedule::default();
|
||||
schedule.add_systems(visibility_propagate_system);
|
||||
|
|
|
@ -230,7 +230,7 @@ pub fn prepare_windows(
|
|||
.entry(window.entity)
|
||||
.or_insert_with(|| unsafe {
|
||||
// NOTE: On some OSes this MUST be called from the main thread.
|
||||
// As of wgpu 0.15, only failable if the given window is a HTML canvas and obtaining a WebGPU or WebGL2 context fails.
|
||||
// As of wgpu 0.15, only fallible if the given window is a HTML canvas and obtaining a WebGPU or WebGL2 context fails.
|
||||
let surface = render_instance
|
||||
.create_surface(&window.handle.get_handle())
|
||||
.expect("Failed to create wgpu surface");
|
||||
|
|
|
@ -84,7 +84,7 @@ impl Default for Node {
|
|||
///
|
||||
/// - [MDN: Basic Concepts of Grid Layout](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout/Basic_Concepts_of_Grid_Layout)
|
||||
/// - [A Complete Guide To Flexbox](https://css-tricks.com/snippets/css/a-guide-to-flexbox/) by CSS Tricks. This is detailed guide with illustrations and comprehensive written explanation of the different Flexbox properties and how they work.
|
||||
/// - [Flexbox Froggy](https://flexboxfroggy.com/). An interactive tutorial/game that teaches the essential parts of Flebox in a fun engaging way.
|
||||
/// - [Flexbox Froggy](https://flexboxfroggy.com/). An interactive tutorial/game that teaches the essential parts of Flexbox in a fun engaging way.
|
||||
///
|
||||
/// ### CSS Grid
|
||||
///
|
||||
|
|
|
@ -62,11 +62,11 @@ impl Parse for AllTuples {
|
|||
/// }
|
||||
///
|
||||
/// all_tuples!(impl_wrapped_in_foo, 0, 15, T);
|
||||
/// // impl_wrapp_in_foo!();
|
||||
/// // impl_wrapp_in_foo!(P0);
|
||||
/// // impl_wrapp_in_foo!(P0, P1);
|
||||
/// // impl_wrapped_in_foo!();
|
||||
/// // impl_wrapped_in_foo!(P0);
|
||||
/// // impl_wrapped_in_foo!(P0, P1);
|
||||
/// // ..
|
||||
/// // impl_wrapp_in_foo!(P0 .. P14);
|
||||
/// // impl_wrapped_in_foo!(P0 .. P14);
|
||||
/// ```
|
||||
/// Multiple parameters.
|
||||
/// ```
|
||||
|
|
|
@ -312,7 +312,7 @@ mv optimized.wasm examples/wasm/target/lighting_bg.wasm
|
|||
```
|
||||
|
||||
For a small project with a basic 3d model and two lights,
|
||||
the generated file sizes are, as of Jully 2022 as following:
|
||||
the generated file sizes are, as of July 2022, as follows:
|
||||
|
||||
|profile | wasm-opt | no wasm-opt |
|
||||
|----------------------------------|----------|-------------|
|
||||
|
|
|
@ -160,7 +160,7 @@ fn spin(time: Res<Time>, mut query: Query<(&mut Transform, &Spin)>) {
|
|||
}
|
||||
}
|
||||
|
||||
// Camera positions to cycle through when left-clickig.
|
||||
// Camera positions to cycle through when left-clicking.
|
||||
const CAMERA_POSITIONS: &[Transform] = &[
|
||||
Transform {
|
||||
translation: Vec3::new(1.5, 1.5, 1.5),
|
||||
|
|
|
@ -613,7 +613,7 @@ mv optimized.wasm examples/wasm/target/lighting_bg.wasm
|
|||
```
|
||||
|
||||
For a small project with a basic 3d model and two lights,
|
||||
the generated file sizes are, as of Jully 2022 as following:
|
||||
the generated file sizes are, as of July 2022, as follows:
|
||||
|
||||
|profile | wasm-opt | no wasm-opt |
|
||||
|----------------------------------|----------|-------------|
|
||||
|
|
|
@ -156,7 +156,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
|||
|
||||
builder.spawn(TextBundle {
|
||||
text: Text::from_section(
|
||||
"Display::None\nVisibility::Hidden\nVisbility::Inherited",
|
||||
"Display::None\nVisibility::Hidden\nVisibility::Inherited",
|
||||
TextStyle { color: HIDDEN_COLOR, ..text_style.clone() }
|
||||
).with_alignment(TextAlignment::Center),
|
||||
..Default::default()
|
||||
|
|
Loading…
Reference in a new issue