diff --git a/Cargo.toml b/Cargo.toml index ed1915c..a81b548 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "bevy_spine" -version = "0.9.0" +version = "0.10.0" edition = "2021" description = "Spine plugin for Bevy utilizing rusty_spine" homepage = "https://github.com/jabuwu/bevy_spine" @@ -11,17 +11,17 @@ exclude = ["assets/*"] [dependencies] rusty_spine = "0.8" -bevy = { version = "0.13", default-features = false, features = [ +bevy = { version = "0.14", default-features = false, features = [ "bevy_render", "bevy_asset", "bevy_sprite", ] } -glam = { version = "0.25", features = ["mint"] } +glam = { version = "0.27", features = ["mint"] } thiserror = "1.0.50" [dev-dependencies] lerp = "0.5" -bevy = { version = "0.13", default-features = true } +bevy = { version = "0.14", default-features = true } [workspace] resolver = "2" diff --git a/assets/shaders/custom.wgsl b/assets/shaders/custom.wgsl index be94389..0a79d19 100644 --- a/assets/shaders/custom.wgsl +++ b/assets/shaders/custom.wgsl @@ -29,7 +29,7 @@ struct VertexOutput { fn vertex(vertex: Vertex) -> VertexOutput { var out: VertexOutput; out.uv = vertex.uv; - var model = mesh_functions::get_model_matrix(vertex.instance_index); + var model = mesh_functions::get_world_from_local(vertex.instance_index); out.world_position = mesh_functions::mesh2d_position_local_to_world( model, vec4(vertex.position, 1.0) diff --git a/changelog.md b/changelog.md index 5409855..0f1bcb7 100644 --- a/changelog.md +++ b/changelog.md @@ -1,3 +1,6 @@ +# 0.10.0 +- Update to Bevy 0.14 + # 0.9.0 - Upgrade runtime to Spine 4.2 - Update to `rusty_spine` 0.8 diff --git a/examples/3d.rs b/examples/3d.rs index 433f23d..9190a3a 100644 --- a/examples/3d.rs +++ b/examples/3d.rs @@ -47,7 +47,7 @@ fn setup( // plane commands.spawn(PbrBundle { mesh: meshes.add(Plane3d::default().mesh().size(5.0, 5.0)), - material: materials.add(Color::rgb(0.3, 0.5, 0.3)), + material: materials.add(Color::srgb(0.3, 0.5, 0.3)), ..default() }); diff --git a/examples/custom_material.rs b/examples/custom_material.rs index a1bdd21..335706c 100644 --- a/examples/custom_material.rs +++ b/examples/custom_material.rs @@ -3,7 +3,7 @@ use bevy::{ prelude::*, reflect::TypePath, render::{ - mesh::MeshVertexBufferLayout, + mesh::MeshVertexBufferLayoutRef, render_resource::{ AsBindGroup, RenderPipelineDescriptor, ShaderRef, SpecializedMeshPipelineError, }, @@ -105,7 +105,7 @@ impl Material2d for MyMaterial { fn specialize( descriptor: &mut RenderPipelineDescriptor, - layout: &MeshVertexBufferLayout, + layout: &MeshVertexBufferLayoutRef, _key: Material2dKey, ) -> Result<(), SpecializedMeshPipelineError> { let vertex_attributes = vec![ @@ -115,7 +115,7 @@ impl Material2d for MyMaterial { Mesh::ATTRIBUTE_COLOR.at_shader_location(4), DARK_COLOR_ATTRIBUTE.at_shader_location(DARK_COLOR_SHADER_POSITION as u32), ]; - let vertex_buffer_layout = layout.get_layout(&vertex_attributes)?; + let vertex_buffer_layout = layout.0.get_layout(&vertex_attributes)?; descriptor.vertex.buffers = vec![vertex_buffer_layout]; descriptor.primitive.cull_mode = None; Ok(()) diff --git a/examples/events.rs b/examples/events.rs index 84ecad1..1edf3c0 100644 --- a/examples/events.rs +++ b/examples/events.rs @@ -89,9 +89,9 @@ fn footstep_update( ) { for (mut transform, mut text, entity) in footstep_query.iter_mut() { transform.translation.y += time.delta_seconds() * 70.; - let mut alpha = text.sections[0].style.color.a(); + let mut alpha = text.sections[0].style.color.alpha(); alpha = (alpha - time.delta_seconds() * 2.).clamp(0., 1.); - text.sections[0].style.color.set_a(alpha); + text.sections[0].style.color.set_alpha(alpha); if alpha == 0. { commands.entity(entity).despawn(); } diff --git a/examples/spineboy/bullet.rs b/examples/spineboy/bullet.rs index 15986b9..e82ece5 100644 --- a/examples/spineboy/bullet.rs +++ b/examples/spineboy/bullet.rs @@ -38,7 +38,7 @@ fn bullet_spawn(mut commands: Commands, mut bullet_spawn_events: EventReader, time: Res