use bevy::diagnostic::FrameTimeDiagnosticsPlugin; use bevy::diagnostic::LogDiagnosticsPlugin; use bevy::prelude::*; use bevy_mod_2d_hierarchy::prelude::*; pub fn spawn(mut commands: Commands, asset_server: Res) { let texture = asset_server.load("sprite.png"); commands.spawn(Camera2dBundle2::default()); for x in 0..100 { for y in 0..100 { commands .spawn(SpriteBundle2 { texture: texture.clone(), transform2: Transform2::from_xy(x as f32 * 16., y as f32 * 16.), ..Default::default() }) .with_children(|builder| { builder.spawn(SpriteBundle2 { sprite: Sprite { color: Color::YELLOW, ..Default::default() }, texture: texture.clone(), transform2: Transform2::from_xy(0., 32.), ..Default::default() }); }); } } } pub fn update(time: Res