Function bevy_sprite::calculate_bounds_2d
source ยท pub fn calculate_bounds_2d(
commands: Commands<'_, '_>,
meshes: Res<'_, Assets<Mesh>>,
images: Res<'_, Assets<Image>>,
atlases: Res<'_, Assets<TextureAtlasLayout>>,
meshes_without_aabb: Query<'_, '_, (Entity, &Mesh2dHandle), (Without<Aabb>, Without<NoFrustumCulling>)>,
sprites_to_recalculate_aabb: Query<'_, '_, (Entity, &Sprite, &Handle<Image>, Option<&TextureAtlas>), (Or<(Without<Aabb>, Changed<Sprite>, Changed<TextureAtlas>)>, Without<NoFrustumCulling>)>,
)
Expand description
System calculating and inserting an Aabb
component to entities with either:
- a
Mesh2dHandle
component, - a
Sprite
andHandle<Image>
components, and without aNoFrustumCulling
component.
Used in system set VisibilitySystems::CalculateBounds
.