bevy/crates/bevy_gizmos
Nicola Papale 7aa0a47607
Use a consistent seed for AABB gizmo colors (#9030)
# Objective

The bounding box colors are from bevy_gizmo are randomized between app
runs. This can get confusing for users.

## Solution

Use a fixed seed with `RandomState::with_seeds` rather than initializing
a `AHash`.
The random number was chose so that the first few colors are clearly
distinct.

According to the `RandomState::hash_one` documentation, it's also
faster.


![bevy_bounding_box_colors_2023-07-03](https://github.com/bevyengine/bevy/assets/26321040/676f0389-d00e-4edd-bd77-1fbf73a3d9fa)

---

## Changelog

* bevy_gizmo: Keep a consistent color for AABBs of identical entities
between runs
2023-07-03 20:46:50 +00:00
..
src Use a consistent seed for AABB gizmo colors (#9030) 2023-07-03 20:46:50 +00:00
Cargo.toml Instanced line rendering for gizmos based on bevy_polyline (#8427) 2023-06-13 06:49:47 +00:00