port to bevy .13
This commit is contained in:
parent
2fe1812f35
commit
1eee8cfe9a
1015
Cargo.lock
generated
1015
Cargo.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -6,5 +6,5 @@ edition = "2021"
|
|||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
bevy = "0.12"
|
||||
bevy = "0.13"
|
||||
rand = "0.8.5"
|
||||
|
|
|
@ -28,7 +28,7 @@ pub mod orbit_camera {
|
|||
window_query: Query<&Window, With<PrimaryWindow>>,
|
||||
mut ev_motion: EventReader<MouseMotion>,
|
||||
mut ev_scroll: EventReader<MouseWheel>,
|
||||
input_mouse: Res<Input<MouseButton>>,
|
||||
input_mouse: Res<ButtonInput<MouseButton>>,
|
||||
mut query: Query<(&mut PanOrbitCamera, &mut Transform, &Projection)>,
|
||||
) {
|
||||
// change input mapping for orbit and panning here
|
||||
|
|
17
src/vvum.rs
17
src/vvum.rs
|
@ -1,7 +1,9 @@
|
|||
pub mod mesh_plugin {
|
||||
use bevy::{
|
||||
prelude::*,
|
||||
render::{mesh::Indices, render_resource::PrimitiveTopology},
|
||||
render::{
|
||||
mesh::Indices, render_asset::RenderAssetUsages, render_resource::PrimitiveTopology,
|
||||
},
|
||||
};
|
||||
|
||||
use crate::orbit_camera::orbit_camera::*;
|
||||
|
@ -26,11 +28,14 @@ pub mod mesh_plugin {
|
|||
normals: Vec<[f32; 3]>,
|
||||
colors: Vec<[f32; 4]>,
|
||||
) -> Mesh {
|
||||
Mesh::new(PrimitiveTopology::TriangleList)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_POSITION, vertices)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_COLOR, colors)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_NORMAL, normals)
|
||||
.with_indices(Some(Indices::U32(indices)))
|
||||
Mesh::new(
|
||||
PrimitiveTopology::TriangleList,
|
||||
RenderAssetUsages::RENDER_WORLD,
|
||||
)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_POSITION, vertices)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_COLOR, colors)
|
||||
.with_inserted_attribute(Mesh::ATTRIBUTE_NORMAL, normals)
|
||||
.with_inserted_indices(Indices::U32(indices))
|
||||
}
|
||||
|
||||
fn emit_cube_at(
|
||||
|
|
Loading…
Reference in a new issue