Skip to content

Commit

Permalink
Add description
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-blackbird committed Mar 13, 2023
1 parent 0182d07 commit 679c10a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions examples/3d/3d_viewport_to_world.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//! This example demonstrates how to use the viewport_to_world method.

use bevy::prelude::*;

fn main() {
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 679c10a

Please sign in to comment.