//! This example illustrates the basic usage of an `ImageNode`.1//! `ImageNode` is UI Node that render an Image.23use bevy::prelude::*;45fn main() {6App::new()7.add_plugins(DefaultPlugins)8.add_systems(Startup, setup)9.run();10}1112fn setup(mut commands: Commands, asset_server: Res<AssetServer>) {13// Ui camera14commands.spawn(Camera2d);1516commands.spawn((17// This root Node serves as a container for the ImageNode.18// In this case, it will center the item on the screen.19Node {20width: percent(100),21height: percent(100),22align_items: AlignItems::Center,23justify_content: JustifyContent::Center,24..default()25},26// Child Nodes are added with the `children!` macro.27children![(28// Create a new `ImageNode` with the given texture.29ImageNode::new(asset_server.load("branding/icon.png")),30// Child Node control `ImageNode` size31Node {32width: px(256.),33height: px(256.),34..default()35}36)],37));38}394041