bevy/crates/bevy_gizmos/src
Lynn ee0fa7d1c2
Gizmo 3d grids (#12430)
# Objective

- Adds 3d grids, suggestion of #9400

## Solution

- Added 3d grids (grids spanning all three dimensions, not flat grids)
to bevy_gizmos

---

## Changelog

- `gizmos.grid(...)` and `gizmos.grid_2d(...)` now return a
`GridBuilder2d`.
- Added `gizmos.grid_3d(...)` which returns a `GridBuilder3d`.
- The difference between them is basically only that `GridBuilder3d`
exposes some methods for configuring the z axis while the 2d version
doesn't.
- Allowed for drawing the outer edges along a specific axis by calling
`.outer_edges_x()`, etc. on the builder.

## Additional information
Please note that I have not added the 3d grid to any example as not to
clutter them.
Here is an image of what the 3d grid looks like:
<img width="1440" alt="Screenshot 2024-03-12 at 02 19 55"
src="https://github.com/bevyengine/bevy/assets/62256001/4cd3b7de-cf2c-4f05-8a79-920a4dd804b8">

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2024-03-13 18:51:53 +00:00
..
primitives Add basic light gizmos (#12228) 2024-03-03 18:50:46 +00:00
aabb.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
arcs.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
arrows.rs Add coordinate axes gizmo (#12211) 2024-02-29 23:52:05 +00:00
circles.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
config.rs Gizmo line joints (#12252) 2024-03-11 19:21:32 +00:00
gizmos.rs Gizmos: Replace PositionItem with Vec3 (#12401) 2024-03-11 19:28:05 +00:00
grid.rs Gizmo 3d grids (#12430) 2024-03-13 18:51:53 +00:00
lib.rs Gizmos: Replace PositionItem with Vec3 (#12401) 2024-03-11 19:28:05 +00:00
light.rs Add basic light gizmos (#12228) 2024-03-03 18:50:46 +00:00
line_joints.wgsl Gizmo line joints (#12252) 2024-03-11 19:21:32 +00:00
lines.wgsl Fix float precision issue in the gizmo shader (#10408) 2023-11-14 22:36:02 +00:00
pipeline_2d.rs Gizmo line joints (#12252) 2024-03-11 19:21:32 +00:00
pipeline_3d.rs Gizmo line joints (#12252) 2024-03-11 19:21:32 +00:00