rename object3d to mesh
This commit is contained in:
parent
ec4ca5559f
commit
3783deed07
@ -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>) {
|
fn create_entities_builder_archetype(world: &mut World, plane_handle: Handle<Mesh>, cube_handle: Handle<Mesh>) {
|
||||||
world.build()
|
world.build()
|
||||||
// plane
|
// plane
|
||||||
.build_archetype(Object3dEntity {
|
.build_archetype(MeshEntity {
|
||||||
mesh: plane_handle.clone(),
|
mesh: plane_handle.clone(),
|
||||||
material: Material::new(Albedo::Color(math::vec4(0.1, 0.2, 0.1, 1.0))),
|
material: Material::new(Albedo::Color(math::vec4(0.1, 0.2, 0.1, 1.0))),
|
||||||
local_to_world: LocalToWorld::identity(),
|
local_to_world: LocalToWorld::identity(),
|
||||||
translation: Translation::new(0.0, 0.0, 0.0),
|
translation: Translation::new(0.0, 0.0, 0.0),
|
||||||
})
|
})
|
||||||
// cube
|
// cube
|
||||||
.build_archetype(Object3dEntity {
|
.build_archetype(MeshEntity {
|
||||||
mesh: cube_handle,
|
mesh: cube_handle,
|
||||||
material: Material::new(Albedo::Color(math::vec4(0.5, 0.3, 0.3, 1.0))),
|
material: Material::new(Albedo::Color(math::vec4(0.5, 0.3, 0.3, 1.0))),
|
||||||
local_to_world: LocalToWorld::identity(),
|
local_to_world: LocalToWorld::identity(),
|
||||||
|
@ -2,7 +2,7 @@ use crate::prelude::*;
|
|||||||
use bevy_derive::EntityArchetype;
|
use bevy_derive::EntityArchetype;
|
||||||
|
|
||||||
#[derive(EntityArchetype)]
|
#[derive(EntityArchetype)]
|
||||||
pub struct Object3dEntity {
|
pub struct MeshEntity {
|
||||||
pub mesh: Handle<Mesh>,
|
pub mesh: Handle<Mesh>,
|
||||||
pub material: Material,
|
pub material: Material,
|
||||||
pub local_to_world: LocalToWorld,
|
pub local_to_world: LocalToWorld,
|
||||||
|
Loading…
Reference in New Issue
Block a user