fix plugin example

This commit is contained in:
Carter Anderson 2020-03-09 23:50:17 -07:00
parent 99cdf56e7d
commit 807929f9e3

View File

@ -21,7 +21,7 @@ pub fn setup(world: &mut World, resources: &mut Resources) {
world.build() world.build()
// plane // plane
.add_archetype(MeshEntity { .add_entity(MeshEntity {
mesh: plane_handle, mesh: plane_handle,
material: StandardMaterial { material: StandardMaterial {
albedo: Color::rgb(0.1, 0.2, 0.1).into(), albedo: Color::rgb(0.1, 0.2, 0.1).into(),
@ -29,7 +29,7 @@ pub fn setup(world: &mut World, resources: &mut Resources) {
..Default::default() ..Default::default()
}) })
// cube // cube
.add_archetype(MeshEntity { .add_entity(MeshEntity {
mesh: cube_handle, mesh: cube_handle,
material: StandardMaterial { material: StandardMaterial {
albedo: Color::rgb(0.5, 0.4, 0.3).into(), albedo: Color::rgb(0.5, 0.4, 0.3).into(),
@ -38,24 +38,17 @@ pub fn setup(world: &mut World, resources: &mut Resources) {
..Default::default() ..Default::default()
}) })
// light // light
// .add_archetype(LightEntity { .add_entity(LightEntity {
// light: Light { light: Light {
// color: wgpu::Color { color: Color::rgb(0.8, 0.8, 0.5),
// r: 0.8, fov: f32::to_radians(60.0),
// g: 0.8, depth: 0.1..50.0,
// b: 0.5, },
// a: 1.0, translation: Translation::new(4.0, -4.0, 5.0),
// }, ..Default::default()
// fov: f32::to_radians(60.0), })
// depth: 0.1..50.0,
// target_view: None,
// },
// local_to_world: LocalToWorld::identity(),
// translation: Translation::new(4.0, -4.0, 5.0),
// rotation: Rotation::from_euler_angles(0.0, 0.0, 0.0),
// })
// camera // camera
.add_archetype(CameraEntity { .add_entity(CameraEntity {
camera: Camera::new(CameraType::Projection { camera: Camera::new(CameraType::Projection {
fov: std::f32::consts::PI / 4.0, fov: std::f32::consts::PI / 4.0,
near: 1.0, near: 1.0,