mirror of
https://github.com/bevyengine/bevy
synced 2024-11-10 07:04:33 +00:00
rename object3d to mesh
This commit is contained in:
parent
ec4ca5559f
commit
3783deed07
2 changed files with 3 additions and 3 deletions
|
@ -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(),
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue