rename object3d to mesh

This commit is contained in:
Carter Anderson 2020-01-19 02:10:29 -08:00
parent ec4ca5559f
commit 3783deed07
2 changed files with 3 additions and 3 deletions

View file

@ -120,14 +120,14 @@ fn create_entities_builder_add_component(world: &mut World, plane_handle: Handle
fn create_entities_builder_archetype(world: &mut World, plane_handle: Handle<Mesh>, cube_handle: Handle<Mesh>) {
world.build()
// plane
.build_archetype(Object3dEntity {
.build_archetype(MeshEntity {
mesh: plane_handle.clone(),
material: Material::new(Albedo::Color(math::vec4(0.1, 0.2, 0.1, 1.0))),
local_to_world: LocalToWorld::identity(),
translation: Translation::new(0.0, 0.0, 0.0),
})
// cube
.build_archetype(Object3dEntity {
.build_archetype(MeshEntity {
mesh: cube_handle,
material: Material::new(Albedo::Color(math::vec4(0.5, 0.3, 0.3, 1.0))),
local_to_world: LocalToWorld::identity(),

View file

@ -2,7 +2,7 @@ use crate::prelude::*;
use bevy_derive::EntityArchetype;
#[derive(EntityArchetype)]
pub struct Object3dEntity {
pub struct MeshEntity {
pub mesh: Handle<Mesh>,
pub material: Material,
pub local_to_world: LocalToWorld,