update to bevy 0.13

This commit is contained in:
Lee-Orr
2024-02-19 09:25:45 -05:00
parent 1de4500cba
commit 7556576966
3 changed files with 5 additions and 6 deletions
+2 -3
View File
@@ -7,12 +7,11 @@ edition = "2021"
[lib] [lib]
[dependencies] [dependencies]
bevy = { version = "0.12", default-features = false, features = ["bevy_pbr", "bevy_render", "bevy_asset", "animation", "bevy_animation"]} bevy = { version = "0.13", default-features = false, features = ["bevy_pbr", "bevy_render", "bevy_asset", "animation", "bevy_animation"]}
serde = { version = "1", features = ["derive"] } serde = { version = "1", features = ["derive"] }
csv = "1.3" csv = "1.3"
serde_json = "1" serde_json = "1"
itertools = "0.12" itertools = "0.12"
[dev-dependencies] [dev-dependencies]
bevy = { version = "0.12", default-features = true, features = ["file_watcher"]} bevy = { version = "0.13", default-features = true, features = ["file_watcher"]}
bevy-inspector-egui = "0.22"
-2
View File
@@ -5,13 +5,11 @@ use bevy::{
prelude::*, prelude::*,
}; };
use bevy_facial_mocap::CSVAnimationLoader; use bevy_facial_mocap::CSVAnimationLoader;
use bevy_inspector_egui::quick::WorldInspectorPlugin;
fn main() { fn main() {
App::new() App::new()
.insert_resource(DirectionalLightShadowMap { size: 4096 }) .insert_resource(DirectionalLightShadowMap { size: 4096 })
.add_plugins(DefaultPlugins) .add_plugins(DefaultPlugins)
.add_plugins(WorldInspectorPlugin::new())
// We add the CSV Animation Loader here // We add the CSV Animation Loader here
.init_asset_loader::<CSVAnimationLoader>() .init_asset_loader::<CSVAnimationLoader>()
.add_systems(Startup, setup) .add_systems(Startup, setup)
+3 -1
View File
@@ -1,7 +1,7 @@
/// This module handles the mapping between a [`CSVAnimation`] and an animation clipy /// This module handles the mapping between a [`CSVAnimation`] and an animation clipy
use crate::csv_animation::*; use crate::csv_animation::*;
use bevy::{ use bevy::{
animation::{AnimationClip, EntityPath, Keyframes, VariableCurve}, animation::{AnimationClip, EntityPath, Interpolation, Keyframes, VariableCurve},
core::Name, core::Name,
math::{Quat, Vec3}, math::{Quat, Vec3},
transform::components::Transform, transform::components::Transform,
@@ -146,6 +146,7 @@ impl CSVAnimation {
VariableCurve { VariableCurve {
keyframe_timestamps, keyframe_timestamps,
keyframes: Keyframes::Rotation(keyframes), keyframes: Keyframes::Rotation(keyframes),
interpolation: Interpolation::Linear,
} }
} }
@@ -201,6 +202,7 @@ impl CSVAnimation {
VariableCurve { VariableCurve {
keyframe_timestamps, keyframe_timestamps,
keyframes: Keyframes::Weights(keyframes), keyframes: Keyframes::Weights(keyframes),
interpolation: Interpolation::Linear,
} }
} }
} }