mirror of
https://github.com/storytold/bevy-mocap.git
synced 2026-10-13 23:52:47 +00:00
update to bevy 0.13
This commit is contained in:
+2
-3
@@ -7,12 +7,11 @@ edition = "2021"
|
||||
[lib]
|
||||
|
||||
[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"] }
|
||||
csv = "1.3"
|
||||
serde_json = "1"
|
||||
itertools = "0.12"
|
||||
|
||||
[dev-dependencies]
|
||||
bevy = { version = "0.12", default-features = true, features = ["file_watcher"]}
|
||||
bevy-inspector-egui = "0.22"
|
||||
bevy = { version = "0.13", default-features = true, features = ["file_watcher"]}
|
||||
|
||||
@@ -5,13 +5,11 @@ use bevy::{
|
||||
prelude::*,
|
||||
};
|
||||
use bevy_facial_mocap::CSVAnimationLoader;
|
||||
use bevy_inspector_egui::quick::WorldInspectorPlugin;
|
||||
|
||||
fn main() {
|
||||
App::new()
|
||||
.insert_resource(DirectionalLightShadowMap { size: 4096 })
|
||||
.add_plugins(DefaultPlugins)
|
||||
.add_plugins(WorldInspectorPlugin::new())
|
||||
// We add the CSV Animation Loader here
|
||||
.init_asset_loader::<CSVAnimationLoader>()
|
||||
.add_systems(Startup, setup)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/// This module handles the mapping between a [`CSVAnimation`] and an animation clipy
|
||||
use crate::csv_animation::*;
|
||||
use bevy::{
|
||||
animation::{AnimationClip, EntityPath, Keyframes, VariableCurve},
|
||||
animation::{AnimationClip, EntityPath, Interpolation, Keyframes, VariableCurve},
|
||||
core::Name,
|
||||
math::{Quat, Vec3},
|
||||
transform::components::Transform,
|
||||
@@ -146,6 +146,7 @@ impl CSVAnimation {
|
||||
VariableCurve {
|
||||
keyframe_timestamps,
|
||||
keyframes: Keyframes::Rotation(keyframes),
|
||||
interpolation: Interpolation::Linear,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -201,6 +202,7 @@ impl CSVAnimation {
|
||||
VariableCurve {
|
||||
keyframe_timestamps,
|
||||
keyframes: Keyframes::Weights(keyframes),
|
||||
interpolation: Interpolation::Linear,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user