# Objective Add a convenient immediate mode drawing API for visual debugging. Fixes #5619 Alternative to #1625 Partial alternative to #5734 Based off https://github.com/Toqozz/bevy_debug_lines with some changes: * Simultaneous support for 2D and 3D. * Methods for basic shapes; circles, spheres, rectangles, boxes, etc. * 2D methods. * Removed durations. Seemed niche, and can be handled by users. <details> <summary>Performance</summary> Stress tested using Bevy's recommended optimization settings for the dev profile with the following command. ```bash cargo run --example many_debug_lines \ --config "profile.dev.package.\"*\".opt-level=3" \ --config "profile.dev.opt-level=1" ``` I dipped to 65-70 FPS at 300,000 lines CPU: 3700x RAM Speed: 3200 Mhz GPU: 2070 super - probably not very relevant, mostly cpu/memory bound </details> <details> <summary>Fancy bloom screenshot</summary>  </details> ## Changelog * Added `GizmoPlugin` * Added `Gizmos` system parameter for drawing lines and wireshapes. ### TODO - [ ] Update changelog - [x] Update performance numbers - [x] Add credit to PR description ### Future work - Cache rendering primitives instead of constructing them out of line segments each frame. - Support for drawing solid meshes - Interactions. (See [bevy_mod_gizmos](https://github.com/LiamGallagher737/bevy_mod_gizmos)) - Fancier line drawing. (See [bevy_polyline](https://github.com/ForesightMiningSoftwareCorporation/bevy_polyline)) - Support for `RenderLayers` - Display gizmos for a certain duration. Currently everything displays for one frame (ie. immediate mode) - Changing settings per drawn item like drawing on top or drawing to different `RenderLayers` Co-Authored By: @lassade <felipe.jorge.pereira@gmail.com> Co-Authored By: @The5-1 <agaku@hotmail.de> Co-Authored By: @Toqozz <toqoz@hotmail.com> Co-Authored By: @nicopap <nico@nicopap.ch> --------- Co-authored-by: Robert Swain <robert.swain@gmail.com> Co-authored-by: IceSentry <c.giguere42@gmail.com> Co-authored-by: Carter Anderson <mcanders1@gmail.com>
		
			
				
	
	
		
			72 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			72 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Bash
		
	
	
	
	
	
# if crate A depends on crate B, B must come before A in this list
 | 
						|
crates=(
 | 
						|
    bevy_utils/macros
 | 
						|
    bevy_utils
 | 
						|
    bevy_ptr
 | 
						|
    bevy_macro_utils
 | 
						|
    bevy_derive
 | 
						|
    bevy_math
 | 
						|
    bevy_tasks
 | 
						|
    bevy_reflect/bevy_reflect_derive
 | 
						|
    bevy_reflect
 | 
						|
    bevy_ecs/macros
 | 
						|
    bevy_ecs
 | 
						|
    bevy_app
 | 
						|
    bevy_time
 | 
						|
    bevy_log
 | 
						|
    bevy_dynamic_plugin
 | 
						|
    bevy_asset
 | 
						|
    bevy_audio
 | 
						|
    bevy_core
 | 
						|
    bevy_diagnostic
 | 
						|
    bevy_hierarchy
 | 
						|
    bevy_transform
 | 
						|
    bevy_window
 | 
						|
    bevy_encase_derive
 | 
						|
    bevy_render/macros
 | 
						|
    bevy_mikktspace
 | 
						|
    bevy_render
 | 
						|
    bevy_core_pipeline
 | 
						|
    bevy_input
 | 
						|
    bevy_gilrs
 | 
						|
    bevy_animation
 | 
						|
    bevy_pbr
 | 
						|
    bevy_gltf
 | 
						|
    bevy_scene
 | 
						|
    bevy_sprite
 | 
						|
    bevy_gizmos
 | 
						|
    bevy_text
 | 
						|
    bevy_a11y
 | 
						|
    bevy_ui
 | 
						|
    bevy_winit
 | 
						|
    bevy_internal
 | 
						|
    bevy_dylib
 | 
						|
)
 | 
						|
 | 
						|
if [ -n "$(git status --porcelain)" ]; then
 | 
						|
    echo "You have local changes!"
 | 
						|
    exit 1
 | 
						|
fi
 | 
						|
 | 
						|
pushd crates
 | 
						|
 | 
						|
for crate in "${crates[@]}"
 | 
						|
do
 | 
						|
  echo "Publishing ${crate}"
 | 
						|
  cp ../LICENSE-MIT "$crate"
 | 
						|
  cp ../LICENSE-APACHE "$crate"
 | 
						|
  pushd "$crate"
 | 
						|
  git add LICENSE-MIT LICENSE-APACHE
 | 
						|
  cargo publish --no-verify --allow-dirty
 | 
						|
  popd
 | 
						|
  sleep 20
 | 
						|
done
 | 
						|
 | 
						|
popd
 | 
						|
 | 
						|
echo "Publishing root crate"
 | 
						|
cargo publish --allow-dirty
 | 
						|
 | 
						|
echo "Cleaning local state"
 | 
						|
git reset HEAD --hard
 |