From 9778d9668f8b5d651aaed1f64414f7ed195d153d Mon Sep 17 00:00:00 2001 From: HampusM Date: Mon, 15 Apr 2024 23:09:11 +0200 Subject: feat(engine): add projection options to camera component --- engine/src/camera.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'engine/src/camera.rs') 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, pub global_up: Vec3, 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()), } } } -- cgit v1.2.3-18-g5258