diff --git a/Cargo.toml b/Cargo.toml index eade847..3a3a7e2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,17 +22,12 @@ salva3d = { path = "./build/salva3d" } #rapier_testbed2d = { git = "https://github.com/dimforge/rapier", branch = "split_geom" } #rapier_testbed3d = { git = "https://github.com/dimforge/rapier", branch = "split_geom" } -rapier2d = { git = "https://github.com/dimforge/rapier" } -rapier3d = { git = "https://github.com/dimforge/rapier" } -rapier_testbed2d = { git = "https://github.com/dimforge/rapier" } +# rapier2d = { git = "https://github.com/dimforge/rapier" } +# rapier3d = { git = "https://github.com/dimforge/rapier" } +# rapier_testbed2d = { git = "https://github.com/dimforge/rapier" } rapier_testbed3d = { git = "https://github.com/dimforge/rapier" } -# rapier2d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" } -# rapier3d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" } -# rapier_testbed2d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" } -# rapier_testbed3d = { git = "https://github.com/dimforge/rapier", rev = "3b0d256" } - -# rapier2d = { path = "../rapier/crates/rapier2d" } +rapier2d = { path = "../rapier/crates/rapier2d" } # rapier3d = { path = "../rapier/crates/rapier3d" } -# rapier_testbed2d = { path = "../rapier/crates/rapier_testbed2d" } +rapier_testbed2d = { path = "../rapier/crates/rapier_testbed2d" } # rapier_testbed3d = { path = "../rapier/crates/rapier_testbed3d" } diff --git a/src/integrations/rapier/testbed_plugin.rs b/src/integrations/rapier/testbed_plugin.rs index 8699dd1..f2b1b9c 100644 --- a/src/integrations/rapier/testbed_plugin.rs +++ b/src/integrations/rapier/testbed_plugin.rs @@ -2,6 +2,7 @@ use crate::math::{Isometry, Point, Real, Rotation, Translation, Vector}; use crate::object::{BoundaryHandle, FluidHandle}; use bevy::math::Quat; use bevy::prelude::{Assets, Commands, Mesh, Query, Transform}; +use bevy_egui::egui; use bevy_egui::{egui::ComboBox, egui::Window, EguiContexts}; #[cfg(feature = "dim3")] use na::Quaternion; @@ -487,7 +488,18 @@ impl TestbedPlugin for FluidsTestbedPlugin { || changed; } }); - + let counters = self.fluids_pipeline.liquid_world.counters; + let _ = egui::CollapsingHeader::new(format!( + "Total: {:.2}ms - {} fps", + counters.step_time.time(), + (1000.0 / counters.step_time.time()).round() + )) + .id_source("total_fluids") + .show(ui, |ui| { + let _ = ui.label(format!("{}", counters)); + // // Ideally: + // p.profiling_ui(ui); + }); if changed { // FIXME: not too sure what to do here for color // let fluid_handle = self