From f5843e766f61259744eda25019565e6d9c0ef218 Mon Sep 17 00:00:00 2001 From: Rob Parrett Date: Wed, 13 Sep 2023 12:25:44 -0700 Subject: [PATCH] Fix animate_scale scaling z value in text2d example (#9769) # Objective I noticed this while testing #9733. It's not causing any problems, but we shouldn't teach users to scale 2d stuff in z. ## Solution Only scale in x and y. --- examples/2d/text2d.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/2d/text2d.rs b/examples/2d/text2d.rs index ad783173d1309..18a959bef1c2a 100644 --- a/examples/2d/text2d.rs +++ b/examples/2d/text2d.rs @@ -187,6 +187,9 @@ fn animate_scale( // rendered quad, resulting in a pixellated look. for mut transform in &mut query { transform.translation = Vec3::new(400.0, 0.0, 0.0); - transform.scale = Vec3::splat((time.elapsed_seconds().sin() + 1.1) * 2.0); + + let scale = (time.elapsed_seconds().sin() + 1.1) * 2.0; + transform.scale.x = scale; + transform.scale.y = scale; } }