Skip to content

Commit

Permalink
Revert "Update defaults for OrthographicProjection (bevyengine#9537)" (
Browse files Browse the repository at this point in the history
…bevyengine#9878)

# Objective

- Fixes bevyengine#9876

## Solution

- Reverted commit `5012a0fd57748ab6f146776368b4cf988bba1eaa` to restore
the previous default values for `OrthographicProjection`.

---

## Migration Guide

- Migration guide steps from bevyengine#9537 should be removed for next release.
  • Loading branch information
mnmaita authored and Ray Redondo committed Jan 9, 2024
1 parent 3f27787 commit 071d564
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 071d564

Please sign in to comment.