use crate::{light::Light, material::StandardMaterial, render_graph::FORWARD_PIPELINE_HANDLE}; use bevy_asset::Handle; use bevy_ecs::Bundle; use bevy_render::{ draw::Draw, mesh::Mesh, pipeline::{RenderPipeline, RenderPipelines}, prelude::Visible, render_graph::base::MainPass, }; use bevy_transform::prelude::{GlobalTransform, Transform}; /// A component bundle for "pbr mesh" entities #[derive(Bundle)] pub struct PbrBundle { pub mesh: Handle, pub material: Handle, pub main_pass: MainPass, pub draw: Draw, pub visible: Visible, pub render_pipelines: RenderPipelines, pub transform: Transform, pub global_transform: GlobalTransform, } impl Default for PbrBundle { fn default() -> Self { Self { render_pipelines: RenderPipelines::from_pipelines(vec![RenderPipeline::new( FORWARD_PIPELINE_HANDLE.typed(), )]), mesh: Default::default(), visible: Default::default(), material: Default::default(), main_pass: Default::default(), draw: Default::default(), transform: Default::default(), global_transform: Default::default(), } } } /// A component bundle for "light" entities #[derive(Debug, Bundle, Default)] pub struct LightBundle { pub light: Light, pub transform: Transform, pub global_transform: GlobalTransform, }