Fix non-crate typos (#18219)
# Objective Correct spelling ## Solution Fix typos, specifically ones that I found in folders other than /crates ## Testing CI --------- Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
This commit is contained in:
parent
f5210c54d2
commit
c3ff6d4136
@ -1835,7 +1835,7 @@ path = "examples/asset/multi_asset_sync.rs"
|
||||
doc-scrape-examples = true
|
||||
|
||||
[package.metadata.example.multi_asset_sync]
|
||||
name = "Mult-asset synchronization"
|
||||
name = "Multi-asset synchronization"
|
||||
description = "Demonstrates how to wait for multiple assets to be loaded."
|
||||
category = "Assets"
|
||||
wasm = true
|
||||
|
@ -2,7 +2,7 @@
|
||||
//! between the vertex and fragment shader. Also shows the custom vertex layout.
|
||||
|
||||
// First we import everything we need from bevy_pbr
|
||||
// A 2d shader would be vevry similar but import from bevy_sprite instead
|
||||
// A 2D shader would be very similar but import from bevy_sprite instead
|
||||
#import bevy_pbr::{
|
||||
mesh_functions,
|
||||
view_transformations::position_world_to_clip
|
||||
@ -45,4 +45,4 @@ fn vertex(vertex: Vertex) -> VertexOutput {
|
||||
fn fragment(in: VertexOutput) -> @location(0) vec4<f32> {
|
||||
// output the color directly
|
||||
return vec4(in.color, 1.0);
|
||||
}
|
||||
}
|
||||
|
@ -9,19 +9,19 @@
|
||||
#import bevy_core_pipeline::tonemapping::tone_mapping
|
||||
#endif
|
||||
|
||||
// Sweep across hues on y axis with value from 0.0 to +15EV across x axis
|
||||
// Sweep across hues on y axis with value from 0.0 to +15EV across x axis
|
||||
// quantized into 24 steps for both axis.
|
||||
fn color_sweep(uv_input: vec2<f32>) -> vec3<f32> {
|
||||
var uv = uv_input;
|
||||
let steps = 24.0;
|
||||
uv.y = uv.y * (1.0 + 1.0 / steps);
|
||||
let ratio = 2.0;
|
||||
|
||||
|
||||
let h = PI * 2.0 * floor(1.0 + steps * uv.y) / steps;
|
||||
let L = floor(uv.x * steps * ratio) / (steps * ratio) - 0.5;
|
||||
|
||||
|
||||
var color = vec3(0.0);
|
||||
if uv.y < 1.0 {
|
||||
if uv.y < 1.0 {
|
||||
color = cos(h + vec3(0.0, 1.0, 2.0) * PI * 2.0 / 3.0);
|
||||
let maxRGB = max(color.r, max(color.g, color.b));
|
||||
let minRGB = min(color.r, min(color.g, color.b));
|
||||
|
@ -79,7 +79,7 @@ pub fn build_schedule(criterion: &mut Criterion) {
|
||||
// Benchmark graphs of different sizes.
|
||||
for graph_size in [100, 500, 1000] {
|
||||
// Basic benchmark without constraints.
|
||||
group.bench_function(format!("{graph_size}_schedule_noconstraints"), |bencher| {
|
||||
group.bench_function(format!("{graph_size}_schedule_no_constraints"), |bencher| {
|
||||
bencher.iter(|| {
|
||||
let mut app = App::new();
|
||||
for _ in 0..graph_size {
|
||||
|
@ -251,7 +251,7 @@ Example | Description
|
||||
[Embedded Asset](../examples/asset/embedded_asset.rs) | Embed an asset in the application binary and load it
|
||||
[Extra asset source](../examples/asset/extra_source.rs) | Load an asset from a non-standard asset source
|
||||
[Hot Reloading of Assets](../examples/asset/hot_asset_reloading.rs) | Demonstrates automatic reloading of assets when modified on disk
|
||||
[Mult-asset synchronization](../examples/asset/multi_asset_sync.rs) | Demonstrates how to wait for multiple assets to be loaded.
|
||||
[Multi-asset synchronization](../examples/asset/multi_asset_sync.rs) | Demonstrates how to wait for multiple assets to be loaded.
|
||||
[Repeated texture configuration](../examples/asset/repeated_texture.rs) | How to configure the texture to repeat instead of the default clamp to edges
|
||||
|
||||
## Async Tasks
|
||||
|
@ -42,7 +42,7 @@ fn main() {
|
||||
.add_systems(OnEnter(GameState::GameOver), display_score)
|
||||
.add_systems(
|
||||
Update,
|
||||
gameover_keyboard.run_if(in_state(GameState::GameOver)),
|
||||
game_over_keyboard.run_if(in_state(GameState::GameOver)),
|
||||
)
|
||||
.run();
|
||||
}
|
||||
@ -378,7 +378,7 @@ fn scoreboard_system(game: Res<Game>, mut display: Single<&mut Text>) {
|
||||
}
|
||||
|
||||
// restart the game when pressing spacebar
|
||||
fn gameover_keyboard(
|
||||
fn game_over_keyboard(
|
||||
mut next_state: ResMut<NextState<GameState>>,
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
) {
|
||||
|
@ -72,7 +72,7 @@ impl Plugin for SteppingPlugin {
|
||||
/// Struct for maintaining stepping state
|
||||
#[derive(Resource, Debug)]
|
||||
struct State {
|
||||
// vector of schedule/nodeid -> text index offset
|
||||
// vector of schedule/node id -> text index offset
|
||||
systems: Vec<(InternedScheduleLabel, NodeId, usize)>,
|
||||
|
||||
// ui positioning
|
||||
|
@ -121,7 +121,7 @@ fn setup(
|
||||
|
||||
// Spawn the 2D heart
|
||||
commands.spawn((
|
||||
// We can use the methods defined on the meshbuilder to customize the mesh.
|
||||
// We can use the methods defined on the `MeshBuilder` to customize the mesh.
|
||||
Mesh3d(meshes.add(HEART.mesh().resolution(50))),
|
||||
MeshMaterial3d(materials.add(StandardMaterial {
|
||||
emissive: RED.into(),
|
||||
@ -134,7 +134,7 @@ fn setup(
|
||||
|
||||
// Spawn an extrusion of the heart.
|
||||
commands.spawn((
|
||||
// We can set a custom resolution for the round parts of the extrusion aswell.
|
||||
// We can set a custom resolution for the round parts of the extrusion as well.
|
||||
Mesh3d(meshes.add(EXTRUSION.mesh().resolution(50))),
|
||||
MeshMaterial3d(materials.add(StandardMaterial {
|
||||
base_color: RED.into(),
|
||||
@ -358,7 +358,7 @@ impl BoundedExtrusion for Heart {}
|
||||
|
||||
// You can use the `Meshable` trait to create a `MeshBuilder` for the primitive.
|
||||
impl Meshable for Heart {
|
||||
// The meshbuilder can be used to create the actual mesh for that primitive.
|
||||
// The `MeshBuilder` can be used to create the actual mesh for that primitive.
|
||||
type Output = HeartMeshBuilder;
|
||||
|
||||
fn mesh(&self) -> Self::Output {
|
||||
@ -369,7 +369,7 @@ impl Meshable for Heart {
|
||||
}
|
||||
}
|
||||
|
||||
// You can include any additional information needed for meshing the primitive in the meshbuilder.
|
||||
// You can include any additional information needed for meshing the primitive in the `MeshBuilder`.
|
||||
struct HeartMeshBuilder {
|
||||
heart: Heart,
|
||||
// The resolution determines the amount of vertices used for each wing of the heart
|
||||
@ -377,7 +377,7 @@ struct HeartMeshBuilder {
|
||||
}
|
||||
|
||||
// This trait is needed so that the configuration methods of the builder of the primitive are also available for the builder for the extrusion.
|
||||
// If you do not want to support these configuration options for extrusions you can just implement them for your 2D mesh builder.
|
||||
// If you do not want to support these configuration options for extrusions you can just implement them for your 2D `MeshBuilder`.
|
||||
trait HeartBuilder {
|
||||
/// Set the resolution for each of the wings of the heart.
|
||||
fn resolution(self, resolution: usize) -> Self;
|
||||
|
@ -47,7 +47,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
.with_children(|parent| {
|
||||
// header
|
||||
parent.spawn((
|
||||
Text::new("Horizontally Scrolling list (Ctrl + Mousewheel)"),
|
||||
Text::new("Horizontally Scrolling list (Ctrl + MouseWheel)"),
|
||||
TextFont {
|
||||
font: asset_server.load("fonts/FiraSans-Bold.ttf"),
|
||||
font_size: FONT_SIZE,
|
||||
|
@ -175,7 +175,7 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
},
|
||||
));
|
||||
p.spawn((
|
||||
TextSpan::new(" this text has zero fontsize"),
|
||||
TextSpan::new(" this text has zero font size"),
|
||||
TextFont {
|
||||
font: font.clone(),
|
||||
font_size: 0.0,
|
||||
@ -229,7 +229,7 @@ fn infotext_system(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
TextColor(BLUE.into()),
|
||||
));
|
||||
p.spawn((
|
||||
TextSpan::new(" this text has negative fontsize"),
|
||||
TextSpan::new(" this text has negative font size"),
|
||||
TextFont {
|
||||
font: font.clone(),
|
||||
font_size: -42.0,
|
||||
|
@ -1,8 +1,8 @@
|
||||
//! A simple example for debugging viewport coordinates
|
||||
//!
|
||||
//! This example creates two uinode trees, one using viewport coordinates and one using pixel coordinates,
|
||||
//! This example creates two UI node trees, one using viewport coordinates and one using pixel coordinates,
|
||||
//! and then switches between them once per second using the `Display` style property.
|
||||
//! If there are no problems both layouts should be identical, except for the color of the margin changing which is used to signal that the displayed uinode tree has changed
|
||||
//! If there are no problems both layouts should be identical, except for the color of the margin changing which is used to signal that the displayed UI node tree has changed
|
||||
//! (red for viewport, yellow for pixel).
|
||||
use bevy::{color::palettes::css::*, prelude::*};
|
||||
|
||||
|
@ -43,7 +43,7 @@ fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {
|
||||
},
|
||||
));
|
||||
}
|
||||
// A simple system to handle some keyboard input and toggle on/off the hittest.
|
||||
// A simple system to handle some keyboard input and toggle on/off the hit test.
|
||||
fn toggle_mouse_passthrough(
|
||||
keyboard_input: Res<ButtonInput<KeyCode>>,
|
||||
mut window: Single<&mut Window>,
|
||||
|
@ -94,7 +94,7 @@ fn update_winit(
|
||||
// Sending a `WakeUp` event is useful when you want the app to update the next
|
||||
// frame regardless of any user input. This can be used from outside Bevy, see example
|
||||
// `window/custom_user_event.rs` for an example usage from outside.
|
||||
// Note that in this example the Wakeup winit event will make the app run in the same
|
||||
// Note that in this example the `WakeUp` winit event will make the app run in the same
|
||||
// way as continuous
|
||||
let _ = event_loop_proxy.send_event(WakeUp);
|
||||
WinitSettings::desktop_app()
|
||||
|
@ -47,7 +47,7 @@ fn toggle_window_mode(mut qry_window: Query<&mut Window>) {
|
||||
|
||||
window.mode = match window.mode {
|
||||
WindowMode::Windowed => {
|
||||
//it takes a while for the window to change from windowed to fullscreen and back
|
||||
// it takes a while for the window to change from `Windowed` to `Fullscreen` and back
|
||||
std::thread::sleep(std::time::Duration::from_secs(4));
|
||||
WindowMode::Fullscreen(
|
||||
MonitorSelection::Entity(entity),
|
||||
|
@ -1,7 +1,7 @@
|
||||
fn main() -> compile_fail_utils::ui_test::Result<()> {
|
||||
// Run all tests in the tests/example_tests folder.
|
||||
// If we had more tests we could either call this function
|
||||
// on everysingle one or use test_multiple and past it an array
|
||||
// on every single one or use test_multiple and past it an array
|
||||
// of paths.
|
||||
//
|
||||
// Don't forget that when running tests the working directory
|
||||
|
Loading…
Reference in New Issue
Block a user