pbr: simplify imports

This commit is contained in:
Carter Anderson 2020-07-16 19:27:19 -07:00
parent e2d2b41c67
commit 2a6e75a27e
5 changed files with 12 additions and 5 deletions

View file

@ -5,6 +5,10 @@ pub mod system;
pub use input::*; pub use input::*;
pub mod prelude {
pub use crate::{keyboard::KeyCode, mouse::MouseButton, Input};
}
use bevy_app::prelude::*; use bevy_app::prelude::*;
use keyboard::{keyboard_input_system, KeyCode, KeyboardInput, KeyboardInputState}; use keyboard::{keyboard_input_system, KeyCode, KeyboardInput, KeyboardInputState};
use mouse::{ use mouse::{

View file

@ -3,9 +3,11 @@ pub mod light;
pub mod material; pub mod material;
pub mod nodes; pub mod nodes;
pub mod pipelines; pub mod pipelines;
pub mod render_graph;
mod forward_pbr_render_graph; pub mod prelude {
pub use forward_pbr_render_graph::*; pub use crate::{entity::*, light::Light, material::StandardMaterial};
}
use bevy_app::prelude::*; use bevy_app::prelude::*;
use bevy_asset::AddAsset; use bevy_asset::AddAsset;
@ -14,6 +16,7 @@ use bevy_render::{render_graph::RenderGraph, shader};
use bevy_type_registry::RegisterType; use bevy_type_registry::RegisterType;
use light::Light; use light::Light;
use material::StandardMaterial; use material::StandardMaterial;
use render_graph::ForwardPbrRenderGraphBuilder;
/// NOTE: this isn't PBR yet. consider this name "aspirational" :) /// NOTE: this isn't PBR yet. consider this name "aspirational" :)
#[derive(Default)] #[derive(Default)]

View file

@ -1,6 +1,6 @@
use crate::{ use crate::{
light::{Light, LightRaw}, light::{Light, LightRaw},
uniform, render_graph::uniform,
}; };
use bevy_core::{AsBytes, Byteable}; use bevy_core::{AsBytes, Byteable};
use bevy_ecs::{Commands, IntoQuerySystem, Local, Query, Res, ResMut, Resources, System, World}; use bevy_ecs::{Commands, IntoQuerySystem, Local, Query, Res, ResMut, Resources, System, World};

View file

@ -4,9 +4,9 @@ pub use crate::{
audio::prelude::*, audio::prelude::*,
core::prelude::*, core::prelude::*,
ecs::prelude::*, ecs::prelude::*,
input::{keyboard::KeyCode, mouse::MouseButton, Input}, input::prelude::*,
math::prelude::*, math::prelude::*,
pbr::{entity::*, light::Light, material::StandardMaterial}, pbr::prelude::*,
property::{DynamicProperties, Properties, PropertiesVal, Property, PropertyVal}, property::{DynamicProperties, Properties, PropertiesVal, Property, PropertyVal},
render::prelude::*, render::prelude::*,
scene::{Scene, SceneSpawner}, scene::{Scene, SceneSpawner},