diff --git a/crates/avian2d/Cargo.toml b/crates/avian2d/Cargo.toml index 0d21cb30..0b951a35 100644 --- a/crates/avian2d/Cargo.toml +++ b/crates/avian2d/Cargo.toml @@ -72,6 +72,7 @@ bevy_math = { version = "0.14", features = ["approx"] } approx = "0.5" criterion = { version = "0.5", features = ["html_reports"] } insta = "1.0" +bevy_mod_debugdump = "0.11" [[example]] name = "dynamic_character_2d" @@ -117,6 +118,10 @@ required-features = ["2d", "default-collider"] name = "revolute_joint_2d" required-features = ["2d", "default-collider"] +[[example]] +name = "debugdump_2d" +required-features = ["2d"] + [[bench]] name = "pyramid" required-features = ["2d", "default-collider"] diff --git a/crates/avian2d/examples/debugdump_2d.rs b/crates/avian2d/examples/debugdump_2d.rs new file mode 100644 index 00000000..d8abf497 --- /dev/null +++ b/crates/avian2d/examples/debugdump_2d.rs @@ -0,0 +1,18 @@ +//! Run with: +//! `cargo run --example debugdump_2d > dump.dot && dot -Tsvg dump.dot > dump.svg` + +use avian2d::prelude::*; +use bevy::prelude::*; + +fn main() { + let mut app = App::new(); + + app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default())); + + // Schedules of interest: + // - PhysicsSchedule + // - SubstepSchedule + // - FixedPostUpdate + // - Update + bevy_mod_debugdump::print_schedule_graph(&mut app, PhysicsSchedule); +} diff --git a/crates/avian3d/Cargo.toml b/crates/avian3d/Cargo.toml index b451f408..c7c53432 100644 --- a/crates/avian3d/Cargo.toml +++ b/crates/avian3d/Cargo.toml @@ -82,7 +82,7 @@ bevy_math = { version = "0.14", features = ["approx"] } approx = "0.5" criterion = { version = "0.5", features = ["html_reports"] } insta = "1.0" - +bevy_mod_debugdump = "0.11" [[example]] name = "dynamic_character_3d" @@ -136,6 +136,10 @@ required-features = ["3d", "default-collider", "bevy_scene"] name = "collider_constructors" required-features = ["3d", "default-collider", "bevy_scene"] +[[example]] +name = "debugdump_3d" +required-features = ["3d"] + [[bench]] name = "cubes" required-features = ["3d", "default-collider"] diff --git a/crates/avian3d/examples/debugdump_3d.rs b/crates/avian3d/examples/debugdump_3d.rs new file mode 100644 index 00000000..acdc652e --- /dev/null +++ b/crates/avian3d/examples/debugdump_3d.rs @@ -0,0 +1,19 @@ +//! Run with: +//! `cargo run --example debugdump_3d > dump.dot && dot -Tsvg dump.dot > dump.svg` + +use avian3d::debug_render::PhysicsDebugPlugin; +use avian3d::prelude::*; +use bevy::prelude::*; + +fn main() { + let mut app = App::new(); + + app.add_plugins((PhysicsPlugins::default(), PhysicsDebugPlugin::default())); + + // Schedules of interest: + // - PhysicsSchedule + // - SubstepSchedule + // - FixedPostUpdate + // - Update + bevy_mod_debugdump::print_schedule_graph(&mut app, PhysicsSchedule); +} diff --git a/crates/examples_common_2d/Cargo.toml b/crates/examples_common_2d/Cargo.toml index f905cd0c..f3abb2eb 100644 --- a/crates/examples_common_2d/Cargo.toml +++ b/crates/examples_common_2d/Cargo.toml @@ -22,6 +22,6 @@ bevy = { version = "0.14", default-features = false, features = [ "ktx2", "zstd", "bevy_winit", - "x11", # github actions runners don't have libxkbcommon installed, so can't use wayland + "x11", # github actions runners don't have libxkbcommon installed, so can't use wayland ] } avian2d = { path = "../avian2d", default-features = false } diff --git a/crates/examples_common_3d/Cargo.toml b/crates/examples_common_3d/Cargo.toml index 85e38efb..b7109d58 100644 --- a/crates/examples_common_3d/Cargo.toml +++ b/crates/examples_common_3d/Cargo.toml @@ -24,6 +24,6 @@ bevy = { version = "0.14", default-features = false, features = [ "png", "zstd", "bevy_winit", - "x11", # github actions runners don't have libxkbcommon installed, so can't use wayland + "x11", # github actions runners don't have libxkbcommon installed, so can't use wayland ] } avian3d = { path = "../avian3d", default-features = false }