Skip to content

Commit

Permalink
chore: fix 3d-hud sample
Browse files Browse the repository at this point in the history
  • Loading branch information
HayesGordon committed Nov 7, 2023
1 parent 5a76fc3 commit 1d0cf1e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions examples/3d-hud.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ use rive_bevy::{MeshEntity, RivePlugin, SceneTarget, StateMachine};

fn main() {
App::new()
.insert_resource(Msaa::Sample8)
.insert_resource(AmbientLight {
color: Color::WHITE,
brightness: 1.0 / 5.0f32,
Expand Down Expand Up @@ -50,12 +49,12 @@ fn setup(
..default()
});

let rive_iamge_handle = images.add(rive_image);
let rive_image_handle = images.add(rive_image);

let plane_handle = meshes.add(Mesh::from(shape::Quad::new(Vec2::new(19.20, 10.80))));

let material_handle = materials.add(StandardMaterial {
base_color_texture: Some(rive_iamge_handle.clone()),
base_color_texture: Some(rive_image_handle.clone()),
reflectance: 1.0,
perceptual_roughness: 0.0,
metallic: 0.5,
Expand All @@ -79,7 +78,7 @@ fn setup(
..default()
})
.insert(SceneTarget {
image: rive_iamge_handle,
image: rive_image_handle,
// Adding the mesh here enables mouse input being passed to the Scene.
mesh: MeshEntity {
entity: Some(plane_entity),
Expand Down

0 comments on commit 1d0cf1e

Please sign in to comment.