bevy/crates/bevy_pbr/src/entity.rs
2020-04-24 17:57:20 -07:00

28 lines
782 B
Rust

use crate::{light::Light, material::StandardMaterial};
use bevy_asset::Handle;
use bevy_render::{mesh::Mesh, Renderable};
use bevy_transform::prelude::{LocalToWorld, Rotation, Scale, Translation};
use bevy_derive::EntityArchetype;
#[derive(EntityArchetype, Default)]
#[module(meta = false)]
pub struct MeshEntity {
// #[tag]
pub mesh: Handle<Mesh>,
// #[tag]
pub material: Handle<StandardMaterial>,
pub renderable: Renderable,
pub local_to_world: LocalToWorld,
pub translation: Translation,
pub rotation: Rotation,
pub scale: Scale,
}
#[derive(EntityArchetype, Default)]
#[module(meta = false)]
pub struct LightEntity {
pub light: Light,
pub local_to_world: LocalToWorld,
pub translation: Translation,
pub rotation: Rotation,
}