From 8118c1198094968fc163f36e359ac4dff0f20d80 Mon Sep 17 00:00:00 2001 From: Aevyrie Date: Mon, 23 Oct 2023 00:44:07 -0700 Subject: [PATCH] New formatting fix --- examples/demo.rs | 12 ++++++++---- examples/error.rs | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/examples/demo.rs b/examples/demo.rs index 0af374c..443df92 100644 --- a/examples/demo.rs +++ b/examples/demo.rs @@ -44,11 +44,11 @@ fn setup( ..default() }, GridCell::::default(), // All spatial entities need this component - FloatingOrigin, // Important: marks this as the entity to use as the floating origin + FloatingOrigin, // Important: marks this as the entity to use as the floating origin when propagating transforms for rendering. CameraController::default() // Built-in camera controller .with_max_speed(10e35) .with_smoothness(0.95, 0.9) - .with_speed(1.5), + .with_speed(1.0), )); let mesh_handle = meshes.add( @@ -143,8 +143,12 @@ fn highlight_nearest_sphere( objects: Query<&GlobalTransform>, mut gizmos: Gizmos, ) { - let Some((entity, _)) = cameras.single().nearest_object() else { return }; - let Ok(transform) = objects.get(entity) else { return }; + let Some((entity, _)) = cameras.single().nearest_object() else { + return; + }; + let Ok(transform) = objects.get(entity) else { + return; + }; let (scale, rotation, translation) = transform.to_scale_rotation_translation(); gizmos .sphere(translation, rotation, scale.x * 0.505, Color::RED) diff --git a/examples/error.rs b/examples/error.rs index 31078c5..6740648 100644 --- a/examples/error.rs +++ b/examples/error.rs @@ -73,7 +73,7 @@ fn toggle_plugin( .join(",") // separator }; - text.single_mut().sections[0].value = + text.single_mut().sections[0].value = format!("Press Spacebar to toggle: {msg}\nCamera distance to floating origin: {}\nCubes distance from origin: {}", thousands(dist), thousands(DISTANCE)) }