diff --git a/examples/3d/3d_viewport_to_world.rs b/examples/3d/3d_viewport_to_world.rs index 350eed89455159..8b41dc0b6b0798 100644 --- a/examples/3d/3d_viewport_to_world.rs +++ b/examples/3d/3d_viewport_to_world.rs @@ -1,3 +1,5 @@ +//! This example demonstrates how to use the viewport_to_world method. + use bevy::prelude::*; fn main() { @@ -48,14 +50,15 @@ fn setup( }); // cube - commands - .spawn(PbrBundle { + commands.spawn(( + PbrBundle { mesh: meshes.add(Mesh::from(shape::Cube { size: 1.0 })), material: materials.add(Color::rgb(0.8, 0.7, 0.6).into()), transform: Transform::from_xyz(0.0, 0.5, 0.0), ..default() - }) - .insert(Cube); + }, + Cube, + )); // light const HALF_SIZE: f32 = 15.0;