bevy/crates/bevy_gizmos/src
Robert Walter 565324daa3
Improve the gizmo for Plane3d, reusing grid (#14650)
# Objective

With the current implementation of `Plane3d` gizmos, it's really hard to
get a good feeling for big planes. Usually I tend to add more axes as a
user but that doesn't scale well and is pretty wasteful. It's hard to
recognize the plane in the distance here. Especially if there would've
been other rendered objects in the scene


![image](https://github.com/user-attachments/assets/b65b7015-c08c-46d7-aa27-c7c0d49b2021)

## Solution

- Since we got grid gizmos in the mean time, I went ahead and just
reused them here.

## Testing

I added an instance of the new `Plane3D` to the `3d_gizmos.rs` example.
If you want to look at it you need to look around a bit. I didn't
position it in the center since that was too crowded already.

---

## Showcase


![image](https://github.com/user-attachments/assets/e4982afe-7296-416c-9801-7dd85cd975c1)

## Migration Guide

The optional builder methods on 

```rust

gizmos.primitive_3d(&Plane3d { }, ...);

```

changed from

- `segment_length`
- `segment_count`
- `axis_count`

to 

- `cell_count`
- `spacing`
2024-08-29 15:51:36 +00:00
..
primitives Improve the gizmo for Plane3d, reusing grid (#14650) 2024-08-29 15:51:36 +00:00
aabb.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
arcs.rs Gizmos: arc_2d utility helpers (#14932) 2024-08-28 11:33:11 +00:00
arrows.rs Fix Gizmos warnings and doc errors when a subset of features are selected (#14887) 2024-08-23 16:19:06 +00:00
circles.rs Use Isometry in bevy_gizmos wherever we can (#14676) 2024-08-28 01:37:19 +00:00
config.rs Fix Gizmos warnings and doc errors when a subset of features are selected (#14887) 2024-08-23 16:19:06 +00:00
cross.rs Use Isometry in bevy_gizmos wherever we can (#14676) 2024-08-28 01:37:19 +00:00
gizmos.rs Use Isometry in bevy_gizmos wherever we can (#14676) 2024-08-28 01:37:19 +00:00
grid.rs Improve the gizmo for Plane3d, reusing grid (#14650) 2024-08-29 15:51:36 +00:00
lib.rs Fix Gizmo joint rendering in webgpu (#14721) 2024-08-25 14:52:03 +00:00
light.rs Use Isometry in bevy_gizmos wherever we can (#14676) 2024-08-28 01:37:19 +00:00
line_joints.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
lines.wgsl view.inverse_clip_from_world should be world_from_clip (#13756) 2024-06-09 14:40:14 +00:00
pipeline_2d.rs Make TrackedRenderPass::set_vertex_buffer aware of slice size (#14916) 2024-08-28 11:41:42 +00:00
pipeline_3d.rs Make TrackedRenderPass::set_vertex_buffer aware of slice size (#14916) 2024-08-28 11:41:42 +00:00
rounded_box.rs Use Isometry in bevy_gizmos wherever we can (#14676) 2024-08-28 01:37:19 +00:00