Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix 3d-hud sample #4

Merged
merged 1 commit into from
Nov 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading