From 5a55864c8c3448262932203e30055249494d96c8 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 20 Aug 2024 19:45:03 +0200 Subject: fix: use camera active component --- src/main.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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> )); 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())?; -- cgit v1.2.3-18-g5258