Don't examine every entity when extracting SpriteSources. (#12957)

`ExtractComponentPlugin` doesn't check to make sure the component is
actually present unless it's in the `QueryFilter`. This meant we placed
it everywhere. This regressed performance on many examples, such as
`many_cubes`.

Fixes #12956.
This commit is contained in:
Patrick Walton 2024-04-13 17:25:37 -05:00 committed by GitHub
parent 60e400b22f
commit 363210f8fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -214,7 +214,7 @@ pub fn calculate_bounds_2d(
impl ExtractComponent for SpriteSource {
type QueryData = ();
type QueryFilter = ();
type QueryFilter = With<SpriteSource>;
type Out = SpriteSource;