fix some typos (#12038)

# Objective

Split - containing only the fixed typos

-
https://github.com/bevyengine/bevy/pull/12036#pullrequestreview-1894738751


# Migration Guide
In `crates/bevy_mikktspace/src/generated.rs` 

```rs
// before
pub struct SGroup {
    pub iVertexRepresentitive: i32,
    ..
}

// after
pub struct SGroup {
    pub iVertexRepresentative: i32,
    ..
}
```

In `crates/bevy_core_pipeline/src/core_2d/mod.rs`

```rs
// before
Node2D::ConstrastAdaptiveSharpening

// after
Node2D::ContrastAdaptiveSharpening
```

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Co-authored-by: James Liu <contact@jamessliu.com>
Co-authored-by: François <mockersf@gmail.com>
This commit is contained in:
Ame 2024-02-22 12:55:22 -06:00 committed by GitHub
parent 5d3f66fbaf
commit 9d67edc3a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
34 changed files with 72 additions and 72 deletions

View file

@ -1005,8 +1005,8 @@ impl App {
/// (conflicting access but indeterminate order) with systems in `set`.
///
/// When possible, do this directly in the `.add_systems(Update, a.ambiguous_with(b))` call.
/// However, sometimes two independant plugins `A` and `B` are reported as ambiguous, which you
/// can only supress as the consumer of both.
/// However, sometimes two independent plugins `A` and `B` are reported as ambiguous, which you
/// can only suppress as the consumer of both.
#[track_caller]
pub fn ignore_ambiguity<M1, M2, S1, S2>(
&mut self,

View file

@ -87,7 +87,7 @@ pub enum ParseAssetPathError {
/// Error that occurs when the [`AssetPath::label`] section of a path string contains the [`AssetPath::source`] delimiter `://`. E.g. `source://file.test#bad://label`.
#[error("Asset label must not contain a `://` substring")]
InvalidLabelSyntax,
/// Error that occurs when a path string has an [`AssetPath::source`] delimiter `://` with no characters preceeding it. E.g. `://file.test`.
/// Error that occurs when a path string has an [`AssetPath::source`] delimiter `://` with no characters preceding it. E.g. `://file.test`.
#[error("Asset source must be at least one character. Either specify the source before the '://' or remove the `://`")]
MissingSource,
/// Error that occurs when a path string has an [`AssetPath::label`] delimiter `#` with no characters succeeding it. E.g. `file.test#`
@ -143,9 +143,9 @@ impl<'a> AssetPath<'a> {
let mut label_range = None;
// Loop through the characters of the passed in &str to accomplish the following:
// 1. Seach for the first instance of the `://` substring. If the `://` substring is found,
// 1. Search for the first instance of the `://` substring. If the `://` substring is found,
// store the range of indices representing everything before the `://` substring as the `source_range`.
// 2. Seach for the last instance of the `#` character. If the `#` character is found,
// 2. Search for the last instance of the `#` character. If the `#` character is found,
// store the range of indices representing everything after the `#` character as the `label_range`
// 3. Set the `path_range` to be everything in between the `source_range` and `label_range`,
// excluding the `://` substring and `#` character.
@ -165,7 +165,7 @@ impl<'a> AssetPath<'a> {
2 => {
// If we haven't found our first `AssetPath::source` yet, check to make sure it is valid and then store it.
if source_range.is_none() {
// If the `AssetPath::source` containes a `#` character, it is invalid.
// If the `AssetPath::source` contains a `#` character, it is invalid.
if label_range.is_some() {
return Err(ParseAssetPathError::InvalidSourceSyntax);
}
@ -833,7 +833,7 @@ mod tests {
#[test]
fn test_resolve_implicit_relative() {
// A path with no inital directory separator should be considered relative.
// A path with no initial directory separator should be considered relative.
let base = AssetPath::from("alice/bob#carol");
assert_eq!(
base.resolve("joe/next").unwrap(),

View file

@ -18,7 +18,7 @@ pub trait AssetTransformer: Send + Sync + 'static {
/// The type of [error](`std::error::Error`) which could be encountered by this transformer.
type Error: Into<Box<dyn std::error::Error + Send + Sync + 'static>>;
/// Transformes the given [`TransformedAsset`] to [`AssetTransformer::AssetOutput`].
/// Transforms the given [`TransformedAsset`] to [`AssetTransformer::AssetOutput`].
/// The [`TransformedAsset`]'s `labeled_assets` can be altered to add new Labeled Sub-Assets
/// The passed in `settings` can influence how the `asset` is transformed
fn transform<'a>(
@ -58,7 +58,7 @@ impl<A: Asset> TransformedAsset<A> {
}
None
}
/// Creates a new [`TransformedAsset`] from `asset`, transfering the `labeled_assets` from this [`TransformedAsset`] to the new one
/// Creates a new [`TransformedAsset`] from `asset`, transferring the `labeled_assets` from this [`TransformedAsset`] to the new one
pub fn replace_asset<B: Asset>(self, asset: B) -> TransformedAsset<B> {
TransformedAsset {
value: asset,

View file

@ -142,17 +142,17 @@ impl Plugin for CASPlugin {
}
{
render_app
.add_render_graph_node::<CASNode>(Core2d, Node2d::ConstrastAdaptiveSharpening)
.add_render_graph_node::<CASNode>(Core2d, Node2d::ContrastAdaptiveSharpening)
.add_render_graph_edge(
Core2d,
Node2d::Tonemapping,
Node2d::ConstrastAdaptiveSharpening,
Node2d::ContrastAdaptiveSharpening,
)
.add_render_graph_edges(
Core2d,
(
Node2d::Fxaa,
Node2d::ConstrastAdaptiveSharpening,
Node2d::ContrastAdaptiveSharpening,
Node2d::EndMainPassPostProcessing,
),
);

View file

@ -19,7 +19,7 @@ pub mod graph {
Tonemapping,
Fxaa,
Upscaling,
ConstrastAdaptiveSharpening,
ContrastAdaptiveSharpening,
EndMainPassPostProcessing,
}
}

View file

@ -4,7 +4,7 @@
use std::fmt;
/// An Error type for [`super::Identifier`], mostly for providing error
/// handling for convertions of an ID to a type abstracting over the ID bits.
/// handling for conversions of an ID to a type abstracting over the ID bits.
#[derive(Debug, PartialEq, Eq, Clone, Copy)]
#[non_exhaustive]
pub enum IdentifierError {

View file

@ -67,7 +67,7 @@ impl IdentifierMask {
let overflowed = lo >> 31;
// SAFETY:
// - Adding the overflow flag will offet overflows to start at 1 instead of 0
// - Adding the overflow flag will offset overflows to start at 1 instead of 0
// - The sum of `0x7FFF_FFFF` + `u32::MAX` + 1 (overflow) == `0x7FFF_FFFF`
// - If the operation doesn't overflow at 31 bits, no offsetting takes place
unsafe { NonZeroU32::new_unchecked(lo.wrapping_add(overflowed) & HIGH_MASK) }

View file

@ -210,7 +210,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> {
}
/// Transmute the existing builder adding required accesses.
/// This will maintain all exisiting accesses.
/// This will maintain all existing accesses.
///
/// If including a filter type see [`Self::transmute_filtered`]
pub fn transmute<NewD: QueryData>(&mut self) -> &mut QueryBuilder<'w, NewD> {
@ -233,7 +233,7 @@ impl<'w, D: QueryData, F: QueryFilter> QueryBuilder<'w, D, F> {
self.extend_access(access);
// SAFETY:
// - We have included all required acceses for NewQ and NewF
// - We have included all required accesses for NewQ and NewF
// - The layout of all QueryBuilder instances is the same
unsafe { std::mem::transmute(self) }
}

View file

@ -59,7 +59,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> QueryIter<'w, 's, D, F> {
Func: FnMut(D::Item<'w>),
{
// SAFETY: Caller assures that D::IS_DENSE and F::IS_DENSE are true, that table matches D and F
// and all indicies in rows are in range.
// and all indices in rows are in range.
unsafe {
self.fold_over_table_range((), &mut |_, item| func(item), table, rows);
}

View file

@ -1,5 +1,5 @@
//! Definitions for [`FromWorld`] reflection.
//! This allows creating instaces of types that are known only at runtime and
//! This allows creating instances of types that are known only at runtime and
//! require an `&mut World` to be initialized.
//!
//! This module exports two types: [`ReflectFromWorldFns`] and [`ReflectFromWorld`].

View file

@ -419,7 +419,7 @@ where
///
/// Ordering constraints will be applied between the successive elements.
///
/// If the preceeding node on a edge has deferred parameters, a [`apply_deferred`](crate::schedule::apply_deferred)
/// If the preceding node on a edge has deferred parameters, a [`apply_deferred`](crate::schedule::apply_deferred)
/// will be inserted on the edge. If this behavior is not desired consider using
/// [`chain_ignore_deferred`](Self::chain_ignore_deferred) instead.
fn chain(self) -> SystemConfigs {

View file

@ -161,7 +161,7 @@ fn make_executor(kind: ExecutorKind) -> Box<dyn SystemExecutor> {
/// Chain systems into dependencies
#[derive(PartialEq)]
pub enum Chain {
/// Run nodes in order. If there are deferred parameters in preceeding systems a
/// Run nodes in order. If there are deferred parameters in preceding systems a
/// [`apply_deferred`] will be added on the edge.
Yes,
/// Run nodes in order. This will not add [`apply_deferred`] between nodes.

View file

@ -1290,7 +1290,7 @@ impl<'w, 's, D: QueryData, F: QueryFilter> Query<'w, 's, D, F> {
/// ## Allowed Transmutes
///
/// Besides removing parameters from the query, you can also
/// make limited changes to the types of paramters.
/// make limited changes to the types of parameters.
///
/// * Can always add/remove `Entity`
/// * `Ref<T>` <-> `&T`

View file

@ -697,8 +697,8 @@ unsafe impl SystemParam for &'_ World {
/// # use bevy_ecs::system::assert_is_system;
/// struct Config(u32);
/// #[derive(Resource)]
/// struct Myu32Wrapper(u32);
/// fn reset_to_system(value: Config) -> impl FnMut(ResMut<Myu32Wrapper>) {
/// struct MyU32Wrapper(u32);
/// fn reset_to_system(value: Config) -> impl FnMut(ResMut<MyU32Wrapper>) {
/// move |mut val| val.0 = value.0
/// }
///

View file

@ -698,9 +698,9 @@ pub struct ConicalFrustum3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> {
// Center of conical frustum, half-way between the top and the bottom
position: Vec3,
// Rotation of the conical frustrum
// Rotation of the conical frustum
//
// default orientation is: conical frustrum base shape normals are aligned with `Vec3::Y` axis
// default orientation is: conical frustum base shape normals are aligned with `Vec3::Y` axis
rotation: Quat,
// Color of the conical frustum
color: Color,
@ -760,7 +760,7 @@ impl<T: GizmoConfigGroup> Drop for ConicalFrustum3dBuilder<'_, '_, '_, T> {
let half_height = *height * 0.5;
let normal = *rotation * Vec3::Y;
// draw the two circles of the conical frustrum
// draw the two circles of the conical frustum
[(*radius_top, half_height), (*radius_bottom, -half_height)]
.into_iter()
.for_each(|(radius, height)| {
@ -774,7 +774,7 @@ impl<T: GizmoConfigGroup> Drop for ConicalFrustum3dBuilder<'_, '_, '_, T> {
);
});
// connect the two circles of the conical frustrum
// connect the two circles of the conical frustum
circle_coordinates(*radius_top, *segments)
.map(move |p| Vec3::new(p.x, half_height, p.y))
.zip(
@ -802,7 +802,7 @@ pub struct Torus3dBuilder<'a, 'w, 's, T: GizmoConfigGroup> {
// Center of the torus
position: Vec3,
// Rotation of the conical frustrum
// Rotation of the conical frustum
//
// default orientation is: major circle normal is aligned with `Vec3::Y` axis
rotation: Quat,

View file

@ -16,7 +16,7 @@
// the W3C short notice apply to the `KeyCode` enums and their variants and the
// documentation attached to their variants.
// --------- BEGGINING OF W3C LICENSE --------------------------------------------------------------
// --------- BEGINNING OF W3C LICENSE --------------------------------------------------------------
//
// License
//
@ -51,7 +51,7 @@
//
// --------- END OF W3C LICENSE --------------------------------------------------------------------
// --------- BEGGINING OF W3C SHORT NOTICE ---------------------------------------------------------
// --------- BEGINNING OF W3C SHORT NOTICE ---------------------------------------------------------
//
// winit: https://github.com/rust-windowing/winit
//
@ -886,7 +886,7 @@ pub enum Key {
Standby,
/// The WakeUp key. (`KEYCODE_WAKEUP`)
WakeUp,
/// Initate the multi-candidate mode.
/// Initiate the multi-candidate mode.
AllCandidates,
/// The Alphanumeric key (on linux/web)
Alphanumeric,

View file

@ -103,7 +103,7 @@ impl BevyManifest {
///
/// # Panics
///
/// Will panic if the path is not able to be parsed. For a non-panicing option, see [`try_parse_str`]
/// Will panic if the path is not able to be parsed. For a non-panicking option, see [`try_parse_str`]
///
/// [`try_parse_str`]: Self::try_parse_str
pub fn parse_str<T: syn::parse::Parse>(path: &str) -> T {

View file

@ -133,7 +133,7 @@ impl STriInfo {
pub struct SGroup {
pub iNrFaces: i32,
pub pFaceIndices: *mut i32,
pub iVertexRepresentitive: i32,
pub iVertexRepresentative: i32,
pub bOrientPreservering: bool,
}
@ -142,7 +142,7 @@ impl SGroup {
Self {
iNrFaces: 0,
pFaceIndices: null_mut(),
iVertexRepresentitive: 0,
iVertexRepresentative: 0,
bOrientPreservering: false,
}
}
@ -560,7 +560,7 @@ unsafe fn GenerateTSpaces<I: Geometry>(
piTriListIn,
pTriInfos,
geometry,
(*pGroup).iVertexRepresentitive,
(*pGroup).iVertexRepresentative,
);
iUniqueSubGroups += 1
}
@ -634,7 +634,7 @@ unsafe fn EvalTspace<I: Geometry>(
mut piTriListIn: *const i32,
mut pTriInfos: *const STriInfo,
geometry: &mut I,
iVertexRepresentitive: i32,
iVertexRepresentative: i32,
) -> STSpace {
let mut res: STSpace = STSpace {
vOs: Vec3::new(0.0, 0.0, 0.0),
@ -675,11 +675,11 @@ unsafe fn EvalTspace<I: Geometry>(
let mut i0: i32 = -1i32;
let mut i1: i32 = -1i32;
let mut i2: i32 = -1i32;
if *piTriListIn.offset((3i32 * f + 0i32) as isize) == iVertexRepresentitive {
if *piTriListIn.offset((3i32 * f + 0i32) as isize) == iVertexRepresentative {
i = 0i32
} else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentitive {
} else if *piTriListIn.offset((3i32 * f + 1i32) as isize) == iVertexRepresentative {
i = 1i32
} else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentitive {
} else if *piTriListIn.offset((3i32 * f + 2i32) as isize) == iVertexRepresentative {
i = 2i32
}
index = *piTriListIn.offset((3i32 * f + i) as isize);
@ -831,7 +831,7 @@ unsafe fn Build4RuleGroups(
let ref mut fresh2 = (*pTriInfos.offset(f as isize)).AssignedGroup[i as usize];
*fresh2 = &mut *pGroups.offset(iNrActiveGroups as isize) as *mut SGroup;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize])
.iVertexRepresentitive = vert_index;
.iVertexRepresentative = vert_index;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).bOrientPreservering =
(*pTriInfos.offset(f as isize)).iFlag & 8i32 != 0i32;
(*(*pTriInfos.offset(f as isize)).AssignedGroup[i as usize]).iNrFaces = 0i32;
@ -897,7 +897,7 @@ unsafe fn AssignRecur(
let mut pMyTriInfo: *mut STriInfo =
&mut *psTriInfos.offset(iMyTriIndex as isize) as *mut STriInfo;
// track down vertex
let iVertRep: i32 = (*pGroup).iVertexRepresentitive;
let iVertRep: i32 = (*pGroup).iVertexRepresentative;
let mut pVerts: *const i32 =
&*piTriListIn.offset((3i32 * iMyTriIndex + 0i32) as isize) as *const i32;
let mut i: i32 = -1i32;

View file

@ -802,7 +802,7 @@ pub struct MaterialBindGroupId(Option<BindGroupId>);
pub struct AtomicMaterialBindGroupId(AtomicU32);
impl AtomicMaterialBindGroupId {
/// Stores a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarentee of ordering
/// Stores a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarantee of ordering
/// relative to other operations.
///
/// See also: [`AtomicU32::store`].
@ -815,7 +815,7 @@ impl AtomicMaterialBindGroupId {
self.0.store(id, Ordering::Relaxed);
}
/// Loads a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarentee of ordering
/// Loads a value atomically. Uses [`Ordering::Relaxed`] so there is zero guarantee of ordering
/// relative to other operations.
///
/// See also: [`AtomicU32::load`].

View file

@ -248,7 +248,7 @@ pub struct StandardMaterial {
/// | Flint Glass | 1.69 |
/// | Ruby | 1.71 |
/// | Glycerine | 1.74 |
/// | Saphire | 1.77 |
/// | Sapphire | 1.77 |
/// | Cubic Zirconia | 2.15 |
/// | Diamond | 2.42 |
/// | Moissanite | 2.65 |

View file

@ -407,7 +407,7 @@ impl FromIterator<StringExpr> for StringExpr {
}
}
/// Returns a [`syn::parse::Parser`] which parses a stream of zero or more occurences of `T`
/// Returns a [`syn::parse::Parser`] which parses a stream of zero or more occurrences of `T`
/// separated by punctuation of type `P`, with optional trailing punctuation.
///
/// This is functionally the same as [`Punctuated::parse_terminated`],

View file

@ -1917,7 +1917,7 @@ bevy_reflect::tests::Test {
}
#[test]
fn should_allow_custom_where_wtih_assoc_type() {
fn should_allow_custom_where_with_assoc_type() {
trait Trait {
type Assoc;
}

View file

@ -63,7 +63,7 @@ impl<'a> AccessError<'a> {
&self.kind
}
/// The returns the [`Access`] that this [`AccessError`] occured in.
/// The returns the [`Access`] that this [`AccessError`] occurred in.
pub const fn access(&self) -> &Access {
&self.access
}

View file

@ -27,11 +27,11 @@ pub enum ReflectPathError<'a> {
InvalidDowncast,
/// An error caused by an invalid path string that couldn't be parsed.
#[error("Encounted an error at offset {offset} while parsing `{path}`: {error}")]
#[error("Encountered an error at offset {offset} while parsing `{path}`: {error}")]
ParseError {
/// Position in `path`.
offset: usize,
/// The path that the error occured in.
/// The path that the error occurred in.
path: &'a str,
/// The underlying error.
error: ParseError<'a>,

View file

@ -189,7 +189,7 @@ mod test {
// Add system
app.add_systems(Update, calculate_bounds_2d);
// Add entites
// Add entities
let entity = app.world.spawn((Sprite::default(), image_handle)).id();
// Verify that the entity does not have an AABB
@ -227,7 +227,7 @@ mod test {
// Add system
app.add_systems(Update, calculate_bounds_2d);
// Add entites
// Add entities
let entity = app
.world
.spawn((

View file

@ -26,7 +26,7 @@ use thiserror::Error;
#[reflect(Component, Default)]
pub struct Node {
/// The order of the node in the UI layout.
/// Nodes with a higher stack index are drawn on top of and recieve interactions before nodes with lower stack indices.
/// Nodes with a higher stack index are drawn on top of and receive interactions before nodes with lower stack indices.
pub(crate) stack_index: u32,
/// The size of the node as width and height in logical pixels
///
@ -54,7 +54,7 @@ impl Node {
}
/// The order of the node in the UI layout.
/// Nodes with a higher stack index are drawn on top of and recieve interactions before nodes with lower stack indices.
/// Nodes with a higher stack index are drawn on top of and receive interactions before nodes with lower stack indices.
pub const fn stack_index(&self) -> u32 {
self.stack_index
}
@ -1835,10 +1835,10 @@ mod tests {
}
/// Indicates that this root [`Node`] entity should be rendered to a specific camera.
/// UI then will be layed out respecting the camera's viewport and scale factor, and
/// UI then will be laid out respecting the camera's viewport and scale factor, and
/// rendered to this camera's [`bevy_render::camera::RenderTarget`].
///
/// Setting this component on a non-root node will have no effect. It will be overriden
/// Setting this component on a non-root node will have no effect. It will be overridden
/// by the root node's component.
///
/// Optional if there is only one camera in the world. Required otherwise.

View file

@ -57,7 +57,7 @@ impl<T: Send> Parallel<Vec<T>> {
/// Collect all enqueued items from all threads and appends them to the end of a
/// single Vec.
///
/// The ordering is not guarenteed.
/// The ordering is not guaranteed.
pub fn drain_into(&mut self, out: &mut Vec<T>) {
let size = self
.locals

View file

@ -70,7 +70,7 @@ fn log_once_system() {
}
// you can also use the 'once!' macro directly, in situations you want do do
// something expensive only once within the context of a continous system.
// something expensive only once within the context of a continuous system.
once!({
info!("doing expensive things");
let mut a: u64 = 0;

View file

@ -3,7 +3,7 @@
//! In windowed *Bevy* applications, executing code below a call to `App::run()` is
//! not recommended because:
//! - `App::run()` will never return on iOS and Web.
//! - It is not possible to recreate a window afer the event loop has been terminated.
//! - It is not possible to recreate a window after the event loop has been terminated.
use bevy::{prelude::*, window::WindowPlugin};

View file

@ -30,7 +30,7 @@ pub enum GzAssetLoaderError {
/// An [IO](std::io) Error
#[error("Could not load asset: {0}")]
Io(#[from] std::io::Error),
/// An error caused when the asset path cannot be used ot determine the uncompressed asset type.
/// An error caused when the asset path cannot be used to determine the uncompressed asset type.
#[error("Could not determine file path of uncompressed asset")]
IndeterminateFilePath,
/// An error caused by the internal asset loader.

View file

@ -1,4 +1,4 @@
//! This example illustrates how to define custom `AssetLoader`s, `AssetTransfomers`, and `AssetSaver`s, how to configure them, and how to register asset processors.
//! This example illustrates how to define custom `AssetLoader`s, `AssetTransformer`s, and `AssetSaver`s, how to configure them, and how to register asset processors.
use bevy::{
asset::{

View file

@ -23,12 +23,12 @@ Enter a command with no parameters for usage.";
const COMPONENT_PROMPT: &str = "
comp, c Create new components
Enter a comma seperated list of type names optionally followed by a size in u64s.
Enter a comma separated list of type names optionally followed by a size in u64s.
e.g. CompA 3, CompB, CompC 2";
const ENTITY_PROMPT: &str = "
spawn, s Spawn entities
Enter a comma seperated list of components optionally followed by values.
Enter a comma separated list of components optionally followed by values.
e.g. CompA 0 1 0, CompB, CompC 1";
const QUERY_PROMPT: &str = "

View file

@ -12,7 +12,7 @@
//! 2. Use a [`Local`] [`ManualEventReader`] instead of an [`EventReader`], and use [`ResMut`] to access [`Events`].
//!
//! In the first case, you're being careful to only check out only one of the [`EventWriter`] or [`EventReader`] at a time.
//! By "temporally" seperating them, you avoid the overlap.
//! By "temporally" separating them, you avoid the overlap.
//!
//! In the second case, you only ever have one access to the underlying [`Events`] resource at a time.
//! But in exchange, you have to manually keep track of which events you've already read.

View file

@ -82,7 +82,7 @@ enum PrimitiveSelected {
Capsule,
Cylinder,
Cone,
ConicalFrustrum,
ConicalFrustum,
Torus,
}
@ -112,7 +112,7 @@ impl PrimitiveSelected {
Self::Capsule,
Self::Cylinder,
Self::Cone,
Self::ConicalFrustrum,
Self::ConicalFrustum,
Self::Torus,
];
@ -239,7 +239,7 @@ const CONE: Cone = Cone {
height: BIG_3D,
};
const CONICAL_FRUSTRUM: ConicalFrustum = ConicalFrustum {
const CONICAL_FRUSTUM: ConicalFrustum = ConicalFrustum {
radius_top: BIG_3D,
radius_bottom: SMALL_3D,
height: BIG_3D,
@ -432,7 +432,7 @@ fn draw_gizmos_2d(mut gizmos: Gizmos, state: Res<State<PrimitiveSelected>>, time
PrimitiveSelected::Capsule => gizmos.primitive_2d(CAPSULE_2D, POSITION, angle, color),
PrimitiveSelected::Cylinder => {}
PrimitiveSelected::Cone => {}
PrimitiveSelected::ConicalFrustrum => {}
PrimitiveSelected::ConicalFrustum => {}
PrimitiveSelected::Torus => {}
}
}
@ -474,7 +474,7 @@ fn spawn_primitive_2d(
Some(CAPSULE_2D.mesh().build()),
None, // cylinder
None, // cone
None, // conical frustrum
None, // conical frustum
None, // torus
]
.into_iter()
@ -520,7 +520,7 @@ fn spawn_primitive_3d(
Some(CAPSULE_3D.mesh().build()),
Some(CYLINDER.mesh().build()),
None, // cone
None, // conical frustrum
None, // conical frustum
Some(TORUS.mesh().build()),
]
.into_iter()
@ -648,8 +648,8 @@ fn draw_gizmos_3d(mut gizmos: Gizmos, state: Res<State<PrimitiveSelected>>, time
.primitive_3d(CONE, POSITION, rotation, color)
.segments(segments),
),
PrimitiveSelected::ConicalFrustrum => {
gizmos.primitive_3d(CONICAL_FRUSTRUM, POSITION, rotation, color);
PrimitiveSelected::ConicalFrustum => {
gizmos.primitive_3d(CONICAL_FRUSTUM, POSITION, rotation, color);
}
PrimitiveSelected::Torus => drop(