summaryrefslogtreecommitdiff
path: root/engine/src/camera.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2024-04-15 23:09:11 +0200
committerHampusM <hampus@hampusmat.com>2024-04-15 23:09:11 +0200
commit9778d9668f8b5d651aaed1f64414f7ed195d153d (patch)
treee7c67bec8e03816e75aad7b1dd89730912908c8d /engine/src/camera.rs
parentb748977205eea249dc61e6f755bd6ff86c8f535b (diff)
feat(engine): add projection options to camera component
Diffstat (limited to 'engine/src/camera.rs')
-rw-r--r--engine/src/camera.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/engine/src/camera.rs b/engine/src/camera.rs
index 5347e83..640c1f4 100644
--- a/engine/src/camera.rs
+++ b/engine/src/camera.rs
@@ -1,5 +1,6 @@
use ecs::Component;
+use crate::projection::{Perspective, Projection};
use crate::vector::Vec3;
#[derive(Debug, Component)]
@@ -9,6 +10,7 @@ pub struct Camera
pub target: Vec3<f32>,
pub global_up: Vec3<f32>,
pub current: bool,
+ pub projection: Projection,
}
impl Default for Camera
@@ -20,6 +22,7 @@ impl Default for Camera
target: Vec3::default(),
global_up: Vec3::UP,
current: false,
+ projection: Projection::Perspective(Perspective::default()),
}
}
}