diff --git a/.vscode/launch.json b/.vscode/launch.json index 9843459763..7437063d50 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -26,15 +26,15 @@ { "type": "lldb", "request": "launch", - "name": "Debug example 'simple'", + "name": "Build and launch example", "cargo": { "args": [ "build", - "--example=simple", + "--example=simple_new_graph", "--package=bevy" ], "filter": { - "name": "simple", + "name": "simple_new_graph", "kind": "example" } }, @@ -44,13 +44,13 @@ { "type": "lldb", "request": "launch", - "name": "Debug unit tests in example 'simple'", + "name": "Launch example", "cargo": { "args": [ - "test", - "--no-run", + "run", "--example=simple", - "--package=bevy" + "--package=bevy", + "--release" ], "filter": { "name": "simple", diff --git a/examples/entity_builder_comparison.rs b/examples/entity_builder_comparison.rs index 651a0680ff..a07f5f6e33 100644 --- a/examples/entity_builder_comparison.rs +++ b/examples/entity_builder_comparison.rs @@ -120,21 +120,21 @@ fn create_entities_builder_add_component(world: &mut World, plane_handle: Handle fn create_entities_builder_archetype(world: &mut World, plane_handle: Handle, cube_handle: Handle) { world.build() // plane - .build_archetype(MeshEntity { + .add_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(MeshEntity { + .add_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(), translation: Translation::new(0.0, 0.0, 1.0), }) // light - .build_archetype(LightEntity { + .add_archetype(LightEntity { light: Light { color: wgpu::Color { r: 0.8, @@ -151,7 +151,7 @@ fn create_entities_builder_archetype(world: &mut World, plane_handle: Handle, + uniform_selector::, + ] }, local_to_world: LocalToWorld::identity(), translation: Translation::new(0.0, 0.0, 1.0), }) + // .add_archetype(NewMeshEntity { + // mesh: cube_handle.clone(), + // material: StandardMaterial { + // albedo: math::vec4(0.0, 1.0, 0.0, 1.0), + // }, + // shader_uniforms: ShaderUniforms { + // uniform_selectors: vec![ + // uniform_selector::, + // uniform_selector::, + // ] + // }, + // local_to_world: LocalToWorld::identity(), + // translation: Translation::new(-2.0, 0.0, 1.0), + // }) // light - // .build_archetype(LightEntity { + // .add_archetype(LightEntity { // light: Light { // color: wgpu::Color { // r: 0.8, @@ -54,7 +69,7 @@ fn setup(world: &mut World) { // rotation: Rotation::from_euler_angles(0.0, 0.0, 0.0), // }) // camera - .build_archetype(CameraEntity { + .add_archetype(CameraEntity { camera: Camera::new(CameraType::Projection { fov: std::f32::consts::PI / 4.0, near: 1.0, diff --git a/src/app/app.rs b/src/app/app.rs index d04185bb8e..8f433fba46 100644 --- a/src/app/app.rs +++ b/src/app/app.rs @@ -52,7 +52,7 @@ impl App { } if let Some(ref mut renderer) = self.renderer { - renderer.process_render_graph(&self.render_graph, &mut self.world); + renderer.process_render_graph(&mut self.render_graph, &mut self.world); } if let Some(mut time) = self.world.resources.get_mut::