diff --git a/Cargo.toml b/Cargo.toml index abdb30c..7284cd3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ exclude = [ [dependencies] rusty_spine = "0.7" -bevy = { version = "0.12", default-features = false, features = [ "bevy_render", "bevy_asset", "bevy_sprite" ] } -glam = { version = "0.24", features = [ "mint" ] } +bevy = { version = "0.13", default-features = false, features = [ "bevy_render", "bevy_asset", "bevy_sprite" ] } +glam = { version = "0.25", features = [ "mint" ] } thiserror = "1.0.50" [dev-dependencies] -lerp = "0.4" -bevy = { version = "0.12", default-features = true } +lerp = "0.5" +bevy = { version = "0.13", default-features = true } [workspace] resolver = "2" diff --git a/assets/shaders/custom.wgsl b/assets/shaders/custom.wgsl index 84b85cf..1404bdc 100644 --- a/assets/shaders/custom.wgsl +++ b/assets/shaders/custom.wgsl @@ -40,12 +40,12 @@ fn vertex(vertex: Vertex) -> VertexOutput { return out; } -@group(1) @binding(0) +@group(2) @binding(0) var texture: texture_2d; -@group(1) @binding(1) +@group(2) @binding(1) var texture_sampler: sampler; -@group(1) @binding(2) +@group(2) @binding(2) var time: f32; @fragment diff --git a/examples/3d.rs b/examples/3d.rs index e8560c7..ec932d8 100644 --- a/examples/3d.rs +++ b/examples/3d.rs @@ -46,8 +46,8 @@ fn setup( ) { // plane commands.spawn(PbrBundle { - mesh: meshes.add(shape::Plane::from_size(5.0).into()), - material: materials.add(Color::rgb(0.3, 0.5, 0.3).into()), + mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)), + material: materials.add(Color::rgb(0.3, 0.5, 0.3)), ..default() }); @@ -107,8 +107,8 @@ fn controls( mut window_query: Query<&mut Window, With>, mut mouse_motion_events: EventReader, mut orbit_query: Query<(&mut Orbit, &mut Transform)>, - mouse_buttons: Res>, - keys: Res>, + mouse_buttons: Res>, + keys: Res>, ) { let mut window = window_query.single_mut(); if mouse_buttons.just_pressed(MouseButton::Left) { diff --git a/examples/custom_material.rs b/examples/custom_material.rs index 9c5252d..a1bdd21 100644 --- a/examples/custom_material.rs +++ b/examples/custom_material.rs @@ -1,7 +1,7 @@ use bevy::{ ecs::system::{StaticSystemParam, SystemParam}, prelude::*, - reflect::{TypePath, TypeUuid}, + reflect::TypePath, render::{ mesh::MeshVertexBufferLayout, render_resource::{ @@ -85,8 +85,7 @@ fn on_spawn( #[derive(Component)] pub struct MySpine; -#[derive(Asset, AsBindGroup, TypeUuid, TypePath, Clone, Default)] -#[uuid = "2e85f9ae-049a-4bb5-9f5d-ebaaa208df60"] +#[derive(Asset, AsBindGroup, TypePath, Clone, Default)] pub struct MyMaterial { #[texture(0)] #[sampler(1)] diff --git a/examples/events.rs b/examples/events.rs index 940c60c..84ecad1 100644 --- a/examples/events.rs +++ b/examples/events.rs @@ -70,7 +70,7 @@ fn on_spine_event( color: Color::WHITE, }, ) - .with_alignment(TextAlignment::Center), + .with_justify(JustifyText::Center), transform: Transform::from_xyz(0., -200., 1.), ..Default::default() }) diff --git a/examples/spineboy/player.rs b/examples/spineboy/player.rs index 35d354c..59c565e 100644 --- a/examples/spineboy/player.rs +++ b/examples/spineboy/player.rs @@ -1,6 +1,5 @@ use bevy::prelude::*; use bevy_spine::prelude::*; -use lerp::Lerp; use crate::bullet::{BulletSpawnEvent, BulletSystem}; @@ -225,7 +224,8 @@ fn player_aim( spine.animation_state.track_at_index_mut(PLAYER_TRACK_AIM) { let alpha = aim_track.alpha() * 2.5; - aim_track.set_alpha(alpha.lerp(1., time.delta_seconds()).clamp(0., 1.)); + aim_track + .set_alpha(lerp::Lerp::lerp(alpha, 1., time.delta_seconds()).clamp(0., 1.)); } } } @@ -237,7 +237,7 @@ fn player_shoot( mut spine_query: Query<(&mut Spine, &Transform)>, mut bullet_spawn_events: EventWriter, global_transform_query: Query<&GlobalTransform>, - mouse_buttons: Res>, + mouse_buttons: Res>, time: Res