@@ -15,12 +15,13 @@ use bevy::{
1515 window:: { CursorIcon , CustomCursor , CustomCursorImage } ,
1616} ;
1717
18- #[ cfg( feature = "3d" ) ]
19- use crate :: components:: sprite3d:: Sprite3d ;
2018use crate :: {
2119 animation:: AnimationId ,
2220 animator:: iterator:: { AnimationIterator , IteratorFrame } ,
23- components:: spritesheet_animation:: { AnimationProgress , SpritesheetAnimation } ,
21+ components:: {
22+ sprite3d:: Sprite3d ,
23+ spritesheet_animation:: { AnimationProgress , SpritesheetAnimation } ,
24+ } ,
2425 events:: AnimationEvent ,
2526 library:: AnimationLibrary ,
2627} ;
@@ -56,7 +57,6 @@ pub struct SpritesheetAnimationQuery {
5657 entity : Entity ,
5758 spritesheet_animation : & ' static mut SpritesheetAnimation ,
5859 sprite : Option < & ' static mut Sprite > ,
59- #[ cfg( feature = "3d" ) ]
6060 sprite3d : Option < & ' static mut Sprite3d > ,
6161 image_node : Option < & ' static mut ImageNode > ,
6262 cursor_icon : Option < & ' static mut CursorIcon > ,
@@ -233,7 +233,8 @@ impl Animator {
233233 atlas. index = frame. atlas_index ;
234234 }
235235
236- #[ cfg( feature = "3d" ) ]
236+ // 3D sprites
237+
237238 if let Some ( atlas) = item
238239 . sprite3d
239240 . as_deref_mut ( )
@@ -243,6 +244,8 @@ impl Animator {
243244 atlas. index = frame. atlas_index ;
244245 }
245246
247+ // Images
248+
246249 if let Some ( atlas) = item
247250 . image_node
248251 . as_deref_mut ( )
@@ -252,7 +255,7 @@ impl Animator {
252255 atlas. index = frame. atlas_index ;
253256 }
254257
255- // Custom cursor
258+ // Cursors
256259
257260 if let Some ( atlas) = item
258261 . cursor_icon
0 commit comments