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.
This commit is contained in:
Rob Parrett 2023-09-13 12:25:44 -07:00 committed by GitHub
parent ca46d7c357
commit 8681d1cb04
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}
}