From ae6053cc06956f233237d245b8f0c2fbd33ccdba Mon Sep 17 00:00:00 2001 From: rewin Date: Fri, 26 Jan 2024 23:57:25 +0300 Subject: [PATCH] fmt --- studio/src/camera_controller.rs | 1 - studio/src/lib.rs | 3 --- studio/src/scene.rs | 21 ++++++--------------- 3 files changed, 6 insertions(+), 19 deletions(-) diff --git a/studio/src/camera_controller.rs b/studio/src/camera_controller.rs index 5b08239..186f69d 100644 --- a/studio/src/camera_controller.rs +++ b/studio/src/camera_controller.rs @@ -180,7 +180,6 @@ fn process_focus_inputs( **velocity = Vec3::ZERO; info!("Setting focus to {:?}", target); - if q_interp_vel.get(ent).is_ok() { cmd.entity(ent).remove::(); diff --git a/studio/src/lib.rs b/studio/src/lib.rs index ea20d79..c59f6eb 100644 --- a/studio/src/lib.rs +++ b/studio/src/lib.rs @@ -187,7 +187,6 @@ pub fn start_editor( ); } - #[cfg_attr(feature = "wasm", wasm_bindgen(js_name = startBvhViewer))] pub fn start_bvh_viewer( bvh_path: &str, @@ -237,8 +236,6 @@ pub fn start( .run(); } - - // TODO: These `start_` functiions should be refactored to better support the // needs of the "reaodnly viewer" vs "full studio editor" use cases. See // notes in `studio-web/src/lib/viewer.element.ts` for more info. diff --git a/studio/src/scene.rs b/studio/src/scene.rs index e79c633..75d8b42 100644 --- a/studio/src/scene.rs +++ b/studio/src/scene.rs @@ -122,10 +122,9 @@ fn check_loading( ) { if !loading_queue.queue.is_empty() { //filter queue to only include notloaded assets - + let mut not_loaded_count = 0; - - + loading_queue.queue.retain(|h| { if let Some((load_state, dep_load_state, rec_load_state)) = asset_server.get_load_states(h.id()) @@ -146,8 +145,6 @@ fn check_loading( } }); - - info!("Loading {} assets", loading_queue.queue.len()); if loading_queue.queue.len() - not_loaded_count == 0 { @@ -252,10 +249,7 @@ fn spawn_test_bvh( } } -fn init_scene_loading( - mut cmd: Commands, - mut er: EventReader, -) { +fn init_scene_loading(mut cmd: Commands, mut er: EventReader) { if let Some(id) = er.read().last() { info!("Loading scene: {}", id.0); cmd.spawn(( @@ -270,7 +264,6 @@ fn init_scene_loading( } } - #[derive(Component)] pub struct NoMeshElement; @@ -284,14 +277,13 @@ fn tag_scene_elements( // leafy parts of a plant. Here we only want to tag the elements that a user // might want to individually address when arranging or animating a scene. q_named_non_primitives: Query< - (Entity, - &Children), + (Entity, &Children), ( With, With, Without>, Without, - Without + Without, ), >, q_skinned_meshes: Query<(Entity, &SkinnedMesh), Without>, @@ -313,8 +305,7 @@ fn tag_scene_elements( } } - for (ent, skinned_mesh) in q_skinned_meshes.iter() - { + for (ent, skinned_mesh) in q_skinned_meshes.iter() { cmd.entity(ent).insert(NoFrustumCulling); for &joint in skinned_mesh.joints.iter() {