mirror of
https://github.com/storytold/bevy-mocap.git
synced 2026-10-24 08:15:51 +00:00
update to bevy 0.13
This commit is contained in:
+2
-3
@@ -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"
|
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user