-
-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
experimentation with debugdump (#383)
# Objective - I appreciate graphs from [`bevy_mod_debugdump`](https://github.com/jakobhellermann/bevy_mod_debugdump), this PR merely starts a discussion on adding some "first party" interest to such graphs. - it can be useful to compare with bevy_rapier: dimforge/bevy_rapier#576 ## Solution - Add an example to generate those Run with: `cargo run --example debugdump_3d > avian.dot && dot -Tsvg avian.dot > avian.svg` ## Output for 3d <details><summary>PhysicsSchedule</summary> <p> ![dump_physics](https://github.com/user-attachments/assets/0ac6d299-0cb2-4f1f-987a-763afcc2f57c) </p> </details> <details><summary>SubstepSchedule</summary> <p> ![dump_substeps](https://github.com/user-attachments/assets/189a1141-95d8-459f-8d28-a4807f38ed4e) </p> </details> <details><summary>FixedPostUpdate</summary> <p> ![dump_fixed_update](https://github.com/user-attachments/assets/12488f54-932a-494c-a90b-929320c363aa) </p> </details> <details><summary>Update</summary> <p> ![dump_update](https://github.com/user-attachments/assets/051a4d79-a626-4a3c-905d-084d16afd798) </p> </details> --- ## Changelog - Add an example to generate systems ordering graphs. --------- Co-authored-by: Joona Aalto <[email protected]>
- Loading branch information
Showing
6 changed files
with
49 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters