Explain OrthographicProjection.scale (#11023)

Alternative to https://github.com/bevyengine/bevy/pull/11022.

(Also remove "in world units", it is probably a mistake.)
This commit is contained in:
Stepan Koltsov 2024-01-08 22:22:03 +00:00 committed by GitHub
parent da485c29b3
commit 38ef170b86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,11 +255,16 @@ pub struct OrthographicProjection {
/// ///
/// Defaults to `ScalingMode::WindowSize(1.0)` /// Defaults to `ScalingMode::WindowSize(1.0)`
pub scaling_mode: ScalingMode, pub scaling_mode: ScalingMode,
/// Scales the projection in world units. /// Scales the projection.
/// ///
/// As scale increases, the apparent size of objects decreases, and vice versa. /// As scale increases, the apparent size of objects decreases, and vice versa.
/// ///
/// Defaults to `1.0` /// Note: scaling can be set by [`scaling_mode`](Self::scaling_mode) as well.
/// This parameter scales on top of that.
///
/// This property is particularly useful in implementing zoom functionality.
///
/// Defaults to `1.0`.
pub scale: f32, pub scale: f32,
/// The area that the projection covers relative to `viewport_origin`. /// The area that the projection covers relative to `viewport_origin`.
/// ///