diff --git a/examples/testbed/src/main.rs b/examples/testbed/src/main.rs index 4a74aa7..14b79fd 100644 --- a/examples/testbed/src/main.rs +++ b/examples/testbed/src/main.rs @@ -1,8 +1,6 @@ -use std::ops::DerefMut; +use lyra_engine::{math, ecs::{World, components::{transform::TransformComponent, camera::CameraComponent, model::ModelComponent}, EventQueue}, math::Transform, input::{KeyCode, InputButtons, MouseMotion}, game::Game}; -use lyra_engine::{math, ecs::{World, components::{mesh::MeshComponent, transform::TransformComponent, camera::CameraComponent, model::ModelComponent}, atomicell::{Ref, RefMut}, EventQueue}, render::{mesh::Mesh, material::Material, vertex::Vertex, window::{CursorGrabMode, WindowOptions}}, math::Transform, input::{KeyCode, InputButtons, MouseMotion}, game::Game, change_tracker::Ct}; - -use lyra_engine::assets::{ResourceManager, Texture, Model}; +use lyra_engine::assets::{ResourceManager, Model}; use tracing::debug; @@ -20,50 +18,6 @@ pub const INDICES: &[u16] = &[ 2, 3, 4, ]; -#[derive(Debug, Default)] -struct Point2d { - x: i32, - y: i32, -} - -impl std::fmt::Display for Point2d { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "(x={}, y={})", self.x, self.y) - } -} - -impl Point2d { - pub fn new(x: i32, y: i32) -> Self { - Self { - x, - y, - } - } -} - -#[derive(Debug, Default)] -struct Point3d { - x: i32, - y: i32, - z: i32, -} - -impl std::fmt::Display for Point3d { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - write!(f, "(x={}, y={}, z={})", self.x, self.y, self.z) - } -} - -impl Point3d { - pub fn new(x: i32, y: i32, z: i32) -> Self { - Self { - x, - y, - z, - } - } -} - #[async_std::main] async fn main() { let setup_sys = |world: &mut World| -> anyhow::Result<()> { @@ -74,9 +28,9 @@ async fn main() { } */ let mut resman = world.get_resource_mut::().unwrap(); - let diffuse_texture = resman.request::("assets/happy-tree.png").unwrap(); + //let diffuse_texture = resman.request::("assets/happy-tree.png").unwrap(); let antique_camera_model = resman.request::("assets/AntiqueCamera.glb").unwrap(); - let cube_model = resman.request::("assets/texture-sep/texture-sep.gltf").unwrap(); + //let cube_model = resman.request::("assets/texture-sep/texture-sep.gltf").unwrap(); drop(resman); /* world.spawn(( @@ -98,7 +52,7 @@ async fn main() { Ok(()) }; - let fps_system = |world: &mut World| -> anyhow::Result<()> { + /* let fps_system = |world: &mut World| -> anyhow::Result<()> { let mut counter: RefMut = world.get_resource_mut().unwrap(); let fps = counter.tick(); @@ -112,7 +66,7 @@ async fn main() { world.insert_resource(fps_counter::FPSCounter::new()); game.with_system("fps", fps_system, &["input"]); - }; + }; */ let jiggle_system = |world: &mut World| -> anyhow::Result<()> { let keys = world.get_resource::>();