bevy/crates/bevy_sprite/src
ickshonpe 4d8bc6161b
Extract sprites into a Vec (#17619)
# Objective

Extract sprites into a `Vec` instead of a `HashMap`.

## Solution

Extract UI nodes into a `Vec` instead of an `EntityHashMap`.
Add an index into the `Vec` to `Transparent2d`.
Compare both the index and render entity in prepare so there aren't any
collisions.

## Showcase
yellow this PR, red main

```
cargo run --example many_sprites --release --features "trace_tracy"
```

`extract_sprites`
<img width="452" alt="extract_sprites"
src="https://github.com/user-attachments/assets/66c60406-7c2b-4367-907d-4a71d3630296"
/>

`queue_sprites`
<img width="463" alt="queue_sprites"
src="https://github.com/user-attachments/assets/54b903bd-4137-4772-9f87-e10e1e050d69"
/>

---------

Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
2025-03-18 00:48:33 +00:00
..
mesh2d Extract sprites into a Vec (#17619) 2025-03-18 00:48:33 +00:00
render Extract sprites into a Vec (#17619) 2025-03-18 00:48:33 +00:00
texture_slice Extract sprites into a Vec (#17619) 2025-03-18 00:48:33 +00:00
lib.rs Upgrade to Rust Edition 2024 (#17967) 2025-02-24 03:54:47 +00:00
picking_backend.rs bevy: Replace unnecessary tuple type registrations (#18369) 2025-03-17 20:20:17 +00:00
sprite.rs bevy_reflect: Add clone registrations project-wide (#18307) 2025-03-17 18:32:35 +00:00