diff options
author | HampusM <hampus@hampusmat.com> | 2024-08-20 19:45:03 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2024-08-20 19:45:03 +0200 |
commit | 5a55864c8c3448262932203e30055249494d96c8 (patch) | |
tree | e328a1cde1ab06a9e3673f37ebb72e54a359f5bb /src/main.rs | |
parent | 8b724c9f988289c69c46071f46260b6b7aebd812 (diff) |
fix: use camera active component
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs index a93efa1..d47bcb2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -3,7 +3,7 @@ use std::fs::read_to_string; use std::path::Path; use engine::camera::fly::{Extension as FlyCameraExtension, Options as FlyCameraOptions}; -use engine::camera::Camera; +use engine::camera::{Active as ActiveCamera, Camera}; use engine::color::Color; use engine::data_types::dimens::Dimens; use engine::ecs::sole::Single; @@ -90,10 +90,11 @@ fn main() -> Result<(), Box<dyn Error>> )); engine.spawn(( - Camera { current: true, ..Default::default() }, + Camera::default(), Position { position: Vec3 { x: 0.0, y: 0.0, z: 3.0 }, }, + ActiveCamera, )); engine.add_sole(GlobalLight::default())?; |