From b19e3004b873398cba5dc2afe4c5144760950237 Mon Sep 17 00:00:00 2001 From: Carter Anderson Date: Mon, 6 Apr 2020 14:20:53 -0700 Subject: [PATCH] rework marco modules, crate-ify ui --- Cargo.toml | 1 + {src/ecs => bevy_app/src}/entity_archetype.rs | 0 bevy_app/src/lib.rs | 4 +- bevy_core/src/lib.rs | 1 + .../src/transform/hierarchy.rs | 7 - bevy_core/src/transform/mod.rs | 5 + .../src/transform}/world_builder.rs | 3 +- bevy_derive/src/lib.rs | 155 ++++++++++++++---- .../src/entity.rs | 18 +- bevy_render/src/lib.rs | 1 + .../src/shader/uniforms/standard_material.rs | 4 +- bevy_render/src/vertex.rs | 2 +- bevy_ui/Cargo.toml | 19 +++ {src/ui => bevy_ui/src}/anchors.rs | 0 bevy_ui/src/entity.rs | 8 + src/ui/mod.rs => bevy_ui/src/lib.rs | 3 +- {src/ui => bevy_ui/src}/margins.rs | 0 {src/ui => bevy_ui/src}/node.rs | 13 +- .../src}/ui_resource_provider.rs | 23 ++- {src/ui => bevy_ui/src}/ui_update_system.rs | 13 +- src/lib.rs | 13 +- src/prelude.rs | 15 +- 22 files changed, 211 insertions(+), 97 deletions(-) rename {src/ecs => bevy_app/src}/entity_archetype.rs (100%) rename src/ecs/mod.rs => bevy_core/src/transform/hierarchy.rs (95%) create mode 100644 bevy_core/src/transform/mod.rs rename {src/ecs => bevy_core/src/transform}/world_builder.rs (98%) rename src/ecs/default_archetypes.rs => bevy_render/src/entity.rs (79%) create mode 100644 bevy_ui/Cargo.toml rename {src/ui => bevy_ui/src}/anchors.rs (100%) create mode 100644 bevy_ui/src/entity.rs rename src/ui/mod.rs => bevy_ui/src/lib.rs (85%) rename {src/ui => bevy_ui/src}/margins.rs (100%) rename {src/ui => bevy_ui/src}/node.rs (93%) rename {src/ui => bevy_ui/src}/ui_resource_provider.rs (91%) rename {src/ui => bevy_ui/src}/ui_update_system.rs (73%) diff --git a/Cargo.toml b/Cargo.toml index f91340b064..9d402782c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,6 +17,7 @@ bevy_diagnostic = { path = "bevy_diagnostic" } bevy_input = { path = "bevy_input" } bevy_render = { path = "bevy_render" } bevy_transform = { path = "bevy_transform" } +bevy_ui = { path = "bevy_ui" } bevy_window = { path = "bevy_window" } bevy_wgpu = { path = "bevy_wgpu", optional = true } bevy_winit = { path = "bevy_winit", optional = true } diff --git a/src/ecs/entity_archetype.rs b/bevy_app/src/entity_archetype.rs similarity index 100% rename from src/ecs/entity_archetype.rs rename to bevy_app/src/entity_archetype.rs diff --git a/bevy_app/src/lib.rs b/bevy_app/src/lib.rs index 152b503744..7e8ed038be 100644 --- a/bevy_app/src/lib.rs +++ b/bevy_app/src/lib.rs @@ -1,5 +1,6 @@ mod app; mod app_builder; +mod entity_archetype; mod event; mod plugin; pub mod schedule_plan; @@ -8,5 +9,6 @@ pub mod stage; pub use app::*; pub use app_builder::*; -pub use plugin::*; +pub use entity_archetype::*; pub use event::*; +pub use plugin::*; diff --git a/bevy_core/src/lib.rs b/bevy_core/src/lib.rs index 1d7ee1af7a..5a039fb92f 100644 --- a/bevy_core/src/lib.rs +++ b/bevy_core/src/lib.rs @@ -1,5 +1,6 @@ pub mod bytes; pub mod time; +pub mod transform; use bevy_app::{stage, AppBuilder, AppPlugin}; use bevy_transform::transform_system_bundle; diff --git a/src/ecs/mod.rs b/bevy_core/src/transform/hierarchy.rs similarity index 95% rename from src/ecs/mod.rs rename to bevy_core/src/transform/hierarchy.rs index 9451ed28a2..9fc89fefbe 100644 --- a/src/ecs/mod.rs +++ b/bevy_core/src/transform/hierarchy.rs @@ -1,10 +1,3 @@ -pub mod default_archetypes; -mod entity_archetype; -mod world_builder; - -pub use entity_archetype::*; -pub use world_builder::*; - use bevy_transform::prelude::Children; use legion::{ prelude::{Entity, World}, diff --git a/bevy_core/src/transform/mod.rs b/bevy_core/src/transform/mod.rs new file mode 100644 index 0000000000..ad3cf82a8c --- /dev/null +++ b/bevy_core/src/transform/mod.rs @@ -0,0 +1,5 @@ +mod hierarchy; +mod world_builder; + +pub use hierarchy::*; +pub use world_builder::*; \ No newline at end of file diff --git a/src/ecs/world_builder.rs b/bevy_core/src/transform/world_builder.rs similarity index 98% rename from src/ecs/world_builder.rs rename to bevy_core/src/transform/world_builder.rs index ca028fb3a7..58b2d57014 100644 --- a/src/ecs/world_builder.rs +++ b/bevy_core/src/transform/world_builder.rs @@ -1,4 +1,4 @@ -use crate::ecs::EntityArchetype; +use bevy_app::EntityArchetype; use bevy_transform::components::{LocalToParent, Parent}; use legion::{ filter::{ChunksetFilterData, Filter}, @@ -26,6 +26,7 @@ pub struct WorldBuilder<'a> { parent_entity: Option, } +// TODO: make this a non-consuming builder impl<'a> WorldBuilder<'a> { pub fn build_entity(mut self) -> Self { let entity = *self.world.insert((), vec![()]).first().unwrap(); diff --git a/bevy_derive/src/lib.rs b/bevy_derive/src/lib.rs index d3bcd01bae..bb3e15397b 100644 --- a/bevy_derive/src/lib.rs +++ b/bevy_derive/src/lib.rs @@ -4,7 +4,7 @@ use darling::FromMeta; use inflector::Inflector; use proc_macro::TokenStream; use quote::{format_ident, quote}; -use syn::{parse_macro_input, Data, DataStruct, DeriveInput, Field, Fields, Ident, Type, Path}; +use syn::{parse_macro_input, Data, DataStruct, DeriveInput, Field, Fields, Ident, Path, Type}; #[derive(FromMeta, Debug, Default)] struct EntityArchetypeAttributeArgs { @@ -12,7 +12,112 @@ struct EntityArchetypeAttributeArgs { pub tag: Option, } -#[proc_macro_derive(EntityArchetype, attributes(tag))] +#[derive(FromMeta, Debug)] +struct ModuleAttributeArgs { + #[darling(default)] + pub bevy_render: Option, + #[darling(default)] + pub bevy_asset: Option, + #[darling(default)] + pub bevy_core: Option, + #[darling(default)] + pub bevy_app: Option, + #[darling(default)] + pub legion: Option, + + /// If true, it will use the meta "bevy" crate for dependencies by default (ex: bevy:app). If this is set to false, the individual bevy crates + /// will be used (ex: "bevy_app"). Defaults to "true" + #[darling(default)] + pub meta: bool, +} + +struct Modules { + pub bevy_render: String, + pub bevy_asset: String, + pub bevy_core: String, + pub bevy_app: String, + pub legion: String, +} + +impl Modules { + pub fn meta() -> Modules { + Modules { + bevy_asset: "bevy::asset".to_string(), + bevy_render: "bevy::render".to_string(), + bevy_core: "bevy::core".to_string(), + bevy_app: "bevy::app".to_string(), + legion: "bevy".to_string(), + } + } + + pub fn external() -> Modules { + Modules { + bevy_asset: "bevy_asset".to_string(), + bevy_render: "bevy_render".to_string(), + bevy_core: "bevy_core".to_string(), + bevy_app: "bevy_app".to_string(), + legion: "legion".to_string(), + } + } +} + +impl Default for ModuleAttributeArgs { + fn default() -> Self { + ModuleAttributeArgs { + bevy_asset: None, + bevy_render: None, + bevy_core: None, + bevy_app: None, + legion: None, + meta: true, + } + } +} + +static MODULE_ATTRIBUTE_NAME: &'static str = "module"; + +fn get_modules(ast: &DeriveInput) -> Modules { + let module_attribute_args = ast.attrs + .iter() + .find(|a| a.path.get_ident().as_ref().unwrap().to_string() == MODULE_ATTRIBUTE_NAME) + .map(|a| { + ModuleAttributeArgs::from_meta(&a.parse_meta().unwrap()) + .unwrap_or_else(|_err| ModuleAttributeArgs::default()) + }); + if let Some(module_attribute_args) = module_attribute_args { + let mut modules = if module_attribute_args.meta { + Modules::meta() + } else { + Modules::external() + }; + + if let Some(path) = module_attribute_args.bevy_asset { + modules.bevy_asset = path; + } + + if let Some(path) = module_attribute_args.bevy_render { + modules.bevy_render = path; + } + + if let Some(path) = module_attribute_args.bevy_core { + modules.bevy_core = path; + } + + if let Some(path) = module_attribute_args.bevy_app { + modules.bevy_app = path; + } + + modules + } else { + Modules::meta() + } +} + +fn get_path(path_str: &str) -> Path { + syn::parse(path_str.parse::().unwrap()).unwrap() +} + +#[proc_macro_derive(EntityArchetype, attributes(tag, module))] pub fn derive_entity_archetype(input: TokenStream) -> TokenStream { let ast = parse_macro_input!(input as DeriveInput); let fields = match &ast.data { @@ -23,6 +128,10 @@ pub fn derive_entity_archetype(input: TokenStream) -> TokenStream { _ => panic!("expected a struct with named fields"), }; + let modules = get_modules(&ast); + let bevy_app_path = get_path(&modules.bevy_app); + let legion_path = get_path(&modules.legion); + let tag_fields = fields .iter() .filter(|f| { @@ -51,8 +160,8 @@ pub fn derive_entity_archetype(input: TokenStream) -> TokenStream { let struct_name = &ast.ident; TokenStream::from(quote! { - impl #impl_generics bevy::prelude::EntityArchetype for #struct_name#ty_generics { - fn insert(self, world: &mut bevy::prelude::World) -> Entity { + impl #impl_generics #bevy_app_path::EntityArchetype for #struct_name#ty_generics { + fn insert(self, world: &mut #legion_path::prelude::World) -> #legion_path::prelude::Entity { *world.insert((#(self.#tag_fields,)*), vec![( #(self.#component_fields,)* @@ -60,7 +169,7 @@ pub fn derive_entity_archetype(input: TokenStream) -> TokenStream { ]).first().unwrap() } - fn insert_command_buffer(self, command_buffer: &mut bevy::prelude::CommandBuffer) -> Entity { + fn insert_command_buffer(self, command_buffer: &mut #legion_path::prelude::CommandBuffer) -> #legion_path::prelude::Entity { *command_buffer.insert((#(self.#tag_fields,)*), vec![( #(self.#component_fields,)* @@ -90,39 +199,15 @@ struct UniformAttributeArgs { pub bevy_core_path: Option, } -#[proc_macro_derive(Uniforms, attributes(uniform))] +static UNIFORM_ATTRIBUTE_NAME: &'static str = "uniform"; +#[proc_macro_derive(Uniforms, attributes(uniform, module))] pub fn derive_uniforms(input: TokenStream) -> TokenStream { - static UNIFORM_ATTRIBUTE_NAME: &'static str = "uniform"; let ast = parse_macro_input!(input as DeriveInput); - let mut bevy_render_path_name = "bevy::render".to_string(); - let mut bevy_core_path_name = "bevy::core".to_string(); - let mut bevy_asset_path_name = "bevy::asset".to_string(); - let struct_attribute_args = ast - .attrs - .iter() - .find(|a| a.path.get_ident().as_ref().unwrap().to_string() == UNIFORM_ATTRIBUTE_NAME) - .map(|a| { - UniformAttributeArgs::from_meta(&a.parse_meta().unwrap()) - .unwrap_or_else(|_err| UniformAttributeArgs::default()) - }); + let modules = get_modules(&ast); - if let Some(struct_attribute_args) = struct_attribute_args { - if let Some(value) = struct_attribute_args.bevy_render_path { - bevy_render_path_name = value.to_string(); - } - if let Some(value) = struct_attribute_args.bevy_core_path { - bevy_core_path_name = value.to_string(); - } - if let Some(value) = struct_attribute_args.bevy_asset_path { - bevy_asset_path_name = value.to_string(); - } - } - - // let bevy_render_path = Ident::new(&bevy_render_path_name, Span::call_site()); - // let bevy_render_path = Path::parse(&bevy_render_path_name).unwrap(); - let bevy_render_path: Path = syn::parse(bevy_render_path_name.parse::().unwrap()).unwrap(); - let bevy_core_path: Path = syn::parse(bevy_core_path_name.parse::().unwrap()).unwrap(); - let bevy_asset_path: Path = syn::parse(bevy_asset_path_name.parse::().unwrap()).unwrap(); + let bevy_render_path: Path = get_path(&modules.bevy_render); + let bevy_core_path: Path = get_path(&modules.bevy_core); + let bevy_asset_path: Path = get_path(&modules.bevy_asset); let fields = match &ast.data { Data::Struct(DataStruct { diff --git a/src/ecs/default_archetypes.rs b/bevy_render/src/entity.rs similarity index 79% rename from src/ecs/default_archetypes.rs rename to bevy_render/src/entity.rs index aaea893d0b..adc1bd92e7 100644 --- a/src/ecs/default_archetypes.rs +++ b/bevy_render/src/entity.rs @@ -1,9 +1,10 @@ -use crate::{prelude::*, render::Renderable}; - -use crate as bevy; // for macro imports use bevy_derive::EntityArchetype; +use bevy_asset::Handle; +use crate::{shader::uniforms::StandardMaterial, mesh::Mesh, Renderable, Light, Camera, ActiveCamera, ActiveCamera2d, CameraType}; +use bevy_transform::components::{Translation, LocalToWorld, Rotation, Scale}; #[derive(EntityArchetype, Default)] +#[module(meta = false)] pub struct MeshEntity { // #[tag] pub mesh: Handle, @@ -17,6 +18,7 @@ pub struct MeshEntity { } #[derive(EntityArchetype, Default)] +#[module(meta = false)] pub struct MeshMaterialEntity { pub mesh: Handle, pub material: Handle, @@ -28,6 +30,7 @@ pub struct MeshMaterialEntity { } #[derive(EntityArchetype, Default)] +#[module(meta = false)] pub struct LightEntity { pub light: Light, pub local_to_world: LocalToWorld, @@ -36,6 +39,7 @@ pub struct LightEntity { } #[derive(EntityArchetype, Default)] +#[module(meta = false)] pub struct CameraEntity { pub camera: Camera, pub active_camera: ActiveCamera, @@ -43,6 +47,7 @@ pub struct CameraEntity { } #[derive(EntityArchetype)] +#[module(meta = false)] pub struct Camera2dEntity { pub camera: Camera, pub active_camera_2d: ActiveCamera2d, @@ -55,9 +60,4 @@ impl Default for Camera2dEntity { active_camera_2d: ActiveCamera2d, } } -} - -#[derive(EntityArchetype)] -pub struct UiEntity { - pub node: Node, -} +} \ No newline at end of file diff --git a/bevy_render/src/lib.rs b/bevy_render/src/lib.rs index ee9ed109e7..d85b4be40c 100644 --- a/bevy_render/src/lib.rs +++ b/bevy_render/src/lib.rs @@ -3,6 +3,7 @@ mod camera; pub mod mesh; pub mod render_graph; pub mod shader; +pub mod entity; mod color; mod light; diff --git a/bevy_render/src/shader/uniforms/standard_material.rs b/bevy_render/src/shader/uniforms/standard_material.rs index 5ca534f7a3..490674fa3e 100644 --- a/bevy_render/src/shader/uniforms/standard_material.rs +++ b/bevy_render/src/shader/uniforms/standard_material.rs @@ -2,11 +2,11 @@ use crate::{texture::Texture, Color}; use bevy_asset::Handle; use bevy_derive::Uniforms; -use bevy_core; use bevy_asset; +use bevy_core; #[derive(Uniforms)] -#[uniform(bevy_render_path = "crate", bevy_core_path = "bevy_core", bevy_asset_path = "bevy_asset")] +#[module(meta = false, bevy_render = "crate")] pub struct StandardMaterial { #[uniform(instance)] pub albedo: Color, diff --git a/bevy_render/src/vertex.rs b/bevy_render/src/vertex.rs index efccb3b046..2dcadd2042 100644 --- a/bevy_render/src/vertex.rs +++ b/bevy_render/src/vertex.rs @@ -7,7 +7,7 @@ use bevy_asset; #[repr(C)] #[derive(Clone, Copy, AsBytes, FromBytes, Uniforms)] -#[uniform(bevy_render_path = "crate", bevy_asset_path = "bevy_asset", bevy_core_path = "bevy_core")] +#[module(meta = false, bevy_render = "crate")] pub struct Vertex { #[uniform(vertex)] pub position: [f32; 4], diff --git a/bevy_ui/Cargo.toml b/bevy_ui/Cargo.toml new file mode 100644 index 0000000000..514d297638 --- /dev/null +++ b/bevy_ui/Cargo.toml @@ -0,0 +1,19 @@ +[package] +name = "bevy_ui" +version = "0.1.0" +authors = ["Carter Anderson "] +edition = "2018" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] + +bevy_app = { path = "../bevy_app" } +bevy_core = { path = "../bevy_core" } +bevy_derive = { path = "../bevy_derive" } +bevy_transform = { path = "../bevy_transform" } +bevy_render = { path = "../bevy_render" } +bevy_window = { path = "../bevy_window" } + +legion = { path = "../bevy_legion", features = ["serialize"] } +glam = "0.8.6" \ No newline at end of file diff --git a/src/ui/anchors.rs b/bevy_ui/src/anchors.rs similarity index 100% rename from src/ui/anchors.rs rename to bevy_ui/src/anchors.rs diff --git a/bevy_ui/src/entity.rs b/bevy_ui/src/entity.rs new file mode 100644 index 0000000000..fb4680b0b9 --- /dev/null +++ b/bevy_ui/src/entity.rs @@ -0,0 +1,8 @@ +use bevy_derive::EntityArchetype; +use super::Node; + +#[derive(EntityArchetype)] +#[module(meta = false)] +pub struct UiEntity { + pub node: Node, +} diff --git a/src/ui/mod.rs b/bevy_ui/src/lib.rs similarity index 85% rename from src/ui/mod.rs rename to bevy_ui/src/lib.rs index 356f8c19b6..8d9f9421f8 100644 --- a/src/ui/mod.rs +++ b/bevy_ui/src/lib.rs @@ -1,4 +1,5 @@ mod anchors; +pub mod entity; mod margins; mod node; mod ui_update_system; @@ -8,7 +9,7 @@ pub use margins::*; pub use node::*; pub use ui_update_system::*; -use crate::{app::AppBuilder, prelude::AppPlugin}; +use bevy_app::{AppBuilder, AppPlugin}; #[derive(Default)] pub struct UiPlugin; diff --git a/src/ui/margins.rs b/bevy_ui/src/margins.rs similarity index 100% rename from src/ui/margins.rs rename to bevy_ui/src/margins.rs diff --git a/src/ui/node.rs b/bevy_ui/src/node.rs similarity index 93% rename from src/ui/node.rs rename to bevy_ui/src/node.rs index f755a87e6a..d66005cf69 100644 --- a/src/ui/node.rs +++ b/bevy_ui/src/node.rs @@ -1,9 +1,6 @@ -use crate::{ - math, - math::Vec2, - prelude::Color, - ui::{Anchors, Margins}, -}; +use super::{Anchors, Margins}; +use bevy_render::Color; +use glam::{self, Vec2}; #[derive(Debug, Clone)] enum GrowDirection { @@ -67,8 +64,8 @@ impl Node { parent_dimensions.y(), ); - self.size = math::vec2(rect_width, rect_height); - self.global_position = math::vec2(rect_x, rect_y) + parent_position; + self.size = glam::vec2(rect_width, rect_height); + self.global_position = glam::vec2(rect_x, rect_y) + parent_position; } fn compute_dimension_properties( diff --git a/src/ui/ui_resource_provider.rs b/bevy_ui/src/ui_resource_provider.rs similarity index 91% rename from src/ui/ui_resource_provider.rs rename to bevy_ui/src/ui_resource_provider.rs index b9721d05e0..83332a8e66 100644 --- a/src/ui/ui_resource_provider.rs +++ b/bevy_ui/src/ui_resource_provider.rs @@ -1,17 +1,14 @@ -use crate::{ - ecs, - render::{ - pipeline::VertexBufferDescriptors, - render_resource::{ - resource_name, BufferArrayInfo, BufferInfo, BufferUsage, RenderResource, - RenderResourceAssignments, ResourceProvider, - }, - renderer::Renderer, - shader::AsUniforms, - }, -}; - +use bevy_core::ecs; use bevy_derive::Uniforms; +use bevy_render::{ + pipeline::VertexBufferDescriptors, + render_resource::{ + resource_name, BufferArrayInfo, BufferInfo, BufferUsage, RenderResource, + RenderResourceAssignments, ResourceProvider, + }, + renderer::Renderer, + shader::AsUniforms, +}; use bevy_transform::prelude::Parent; use legion::prelude::*; use zerocopy::{AsBytes, FromBytes}; diff --git a/src/ui/ui_update_system.rs b/bevy_ui/src/ui_update_system.rs similarity index 73% rename from src/ui/ui_update_system.rs rename to bevy_ui/src/ui_update_system.rs index dd071ef051..b7c69a0f20 100644 --- a/src/ui/ui_update_system.rs +++ b/bevy_ui/src/ui_update_system.rs @@ -1,4 +1,9 @@ -use crate::prelude::*; +use super::Node; +use bevy_core::transform::run_on_hierarchy_subworld_mut; +use bevy_transform::prelude::{Children, Parent}; +use bevy_window::Windows; +use glam::Vec2; +use legion::{prelude::*, systems::SubWorld}; pub fn ui_update_system() -> Box { SystemBuilder::new("ui_update") @@ -8,10 +13,10 @@ pub fn ui_update_system() -> Box { .read_component::() .build(move |_, world, windows, node_query| { let window = windows.get_primary().unwrap(); - let parent_size = math::vec2(window.width as f32, window.height as f32); - let parent_position = math::vec2(0.0, 0.0); + let parent_size = glam::vec2(window.width as f32, window.height as f32); + let parent_position = glam::vec2(0.0, 0.0); for (entity, _) in node_query.iter_entities_mut(world) { - ecs::run_on_hierarchy_subworld_mut( + run_on_hierarchy_subworld_mut( world, entity, (parent_size, parent_position), diff --git a/src/lib.rs b/src/lib.rs index c14d9e7b2b..b623ec5bc9 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,17 +1,16 @@ #![feature(specialization)] -pub mod ecs; pub mod prelude; pub mod serialization; -pub mod ui; -pub use bevy_transform as transform; +pub use bevy_app as app; +pub use bevy_asset as asset; pub use bevy_core as core; pub use bevy_diagnostic as diagnostic; -pub use bevy_asset as asset; -pub use bevy_render as render; -pub use bevy_app as app; -pub use bevy_window as window; pub use bevy_input as input; +pub use bevy_render as render; +pub use bevy_transform as transform; +pub use bevy_ui as ui; +pub use bevy_window as window; pub use glam as math; pub use legion; diff --git a/src/prelude.rs b/src/prelude.rs index 41e531ae86..c2b7d43bfb 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -1,14 +1,13 @@ pub use crate::{ - app::{AppPlugin, App, AppBuilder, EventReader, Events, GetEventReader}, + app::{App, AppBuilder, AppPlugin, EntityArchetype, EventReader, Events, GetEventReader}, asset::{Asset, AssetStorage, Handle}, - core::time::Time, - diagnostic::DiagnosticsPlugin, - ecs, - ecs::{ - default_archetypes::*, CommandBufferBuilderSource, EntityArchetype, WorldBuilder, - WorldBuilderSource, + core::{ + time::Time, + transform::{CommandBufferBuilderSource, WorldBuilder, WorldBuilderSource}, }, + diagnostic::DiagnosticsPlugin, render::{ + entity::*, mesh::{Mesh, MeshType}, pipeline::PipelineDescriptor, render_graph::RenderGraph, @@ -19,7 +18,7 @@ pub use crate::{ texture::{Texture, TextureType}, ActiveCamera, ActiveCamera2d, Camera, CameraType, Color, ColorSource, Light, Renderable, }, - ui::{Anchors, Margins, Node}, + ui::{entity::*, Anchors, Margins, Node}, window::{Window, WindowDescriptor, WindowPlugin, Windows}, AddDefaultPlugins, };