Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "Update defaults for OrthographicProjection (#9537)" #9878

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions crates/bevy_render/src/camera/projection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,16 +197,14 @@ pub enum ScalingMode {
///
/// Note that the scale of the projection and the apparent size of objects are inversely proportional.
/// As the size of the projection increases, the size of objects decreases.
///
/// Note also that the view frustum is centered at the origin.
#[derive(Component, Debug, Clone, Reflect)]
#[reflect(Component, Default)]
pub struct OrthographicProjection {
/// The distance of the near clipping plane in world units.
///
/// Objects closer than this will not be rendered.
///
/// Defaults to `-1000.0`
/// Defaults to `0.0`
pub near: f32,
/// The distance of the far clipping plane in world units.
///
Expand Down Expand Up @@ -317,7 +315,7 @@ impl Default for OrthographicProjection {
fn default() -> Self {
OrthographicProjection {
scale: 1.0,
near: -1000.0,
near: 0.0,
far: 1000.0,
viewport_origin: Vec2::new(0.5, 0.5),
scaling_mode: ScalingMode::WindowSize(1.0),
Expand Down