bevy/crates/bevy_gizmos/src
Bennett Lambert 37cc8ea33b
Add axes_2d gizmo. (#12334)
# Objective

This PR addresses #12222 (Fixes #12222). Simple addition to add a 2D
axes gizmo.

## Solution

- Add a new method axes_2d which takes a transform and a case length and
then draws two arrows in the XY plane.

The only thing I'm not sure about here is taking a 3D transform as an
argument. It says in the transform comments that for 2D the z-axis is
used for ordering, so I figured I'd keep it that way?

---

## Changelog

- Add method axes_2d.
- Update arrow_2d to also calculate the tip length depending on arrow
length as in arrow.
- Add axes_2d to examples 2d_gizmos.

---------

Co-authored-by: Ben Lambert <bennett-spencer.lambert@pierer-innovation.com>
2024-06-04 00:02:38 +00:00
..
primitives More gizmos builders (#13261) 2024-06-03 16:10:14 +00:00
aabb.rs Migrate from LegacyColor to bevy_color::Color (#12163) 2024-02-29 19:35:12 +00:00
arcs.rs Implemented GizmoPrimitive2d for Arc2d, CircularSegment, CircularSector, and make arc_2d use counter-clockwise angle. (#13610) 2024-06-01 12:30:34 +00:00
arrows.rs Add axes_2d gizmo. (#12334) 2024-06-04 00:02:38 +00:00
circles.rs More gizmos builders (#13261) 2024-06-03 16:10:14 +00:00
config.rs #12502 Remove limit on RenderLayers. (#13317) 2024-05-16 16:15:47 +00:00
gizmos.rs More gizmos builders (#13261) 2024-06-03 16:10:14 +00:00
grid.rs Contextually clearing gizmos (#10973) 2024-04-23 00:16:12 +00:00
lib.rs Add Rounded box gizmos (#11948) 2024-05-16 16:13:49 +00:00
light.rs Make gizmos take primitives by ref (#13534) 2024-05-27 13:48:47 +00:00
line_joints.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
lines.wgsl Normalise matrix naming (#13489) 2024-06-03 16:56:53 +00:00
pipeline_2d.rs Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
pipeline_3d.rs Make render phases render world resources instead of components. (#13277) 2024-05-21 18:23:04 +00:00
rounded_box.rs Inconsistent segments/resolution naming (#13438) 2024-05-21 18:42:59 +00:00