From 26813d97322941daf5d6ab16d4bfa9669cdce543 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Mockers?= Date: Wed, 9 Oct 2024 00:40:40 +0200 Subject: [PATCH] easing_functions example: draw point closer to its curve (#15744) # Objective - After #15711 which added a column to the example, the point of a curve was too close to the next curve ## Solution - Make it closer to its own --- examples/animation/easing_functions.rs | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/examples/animation/easing_functions.rs b/examples/animation/easing_functions.rs index 42ef33d6c6..5854e75b6a 100644 --- a/examples/animation/easing_functions.rs +++ b/examples/animation/easing_functions.rs @@ -88,7 +88,7 @@ fn setup(mut commands: Commands) { color, ..default() }, - transform: Transform::from_xyz(110.0, 15.0, 0.0), + transform: Transform::from_xyz(SIZE_PER_FUNCTION + 5.0, 15.0, 0.0), ..default() }); p.spawn(SpriteBundle { @@ -113,6 +113,8 @@ fn setup(mut commands: Commands) { ); } +const SIZE_PER_FUNCTION: f32 = 95.0; + fn display_curves( mut gizmos: Gizmos, ease_functions: Query<(&SelectedEaseFunction, &Transform, &Children)>, @@ -121,7 +123,6 @@ fn display_curves( time: Res