mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-21 07:55:55 +00:00
Added the lipsync repo
source for code. https://github.com/virtual-puppet-project/real-time-lip-sync-gd/tree/master
This commit is contained in:
@@ -26,6 +26,7 @@ serde = { version = "1.0.192", optional = true }
|
||||
serde-wasm-bindgen = { version = "0.6.1", optional = true }
|
||||
serde_json = { version = "1.0.108", optional = true }
|
||||
studio-bvh = { path = "../studio-bvh" }
|
||||
studio-lipsync = {path = "../studio-lipsync"}
|
||||
wasm-bindgen = "0.2.84"
|
||||
web-sys = { version = "0.3.65", optional = true, features = [
|
||||
"CustomEvent",
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
+1
-1
@@ -4,7 +4,7 @@ use studio::{StudioMode, ViewportSize};
|
||||
fn main() {
|
||||
// Edit the arguments here to change the default startup scene or skybox
|
||||
let mut app = studio::start_internal(
|
||||
"Mannequin.gltf",
|
||||
"BaseHumanMaleHead_SHAPEKEYS_Keyed.gltf",
|
||||
"gum_trees_4k",
|
||||
"", // ignored for non-WASM
|
||||
"Storyteller Studio",
|
||||
|
||||
@@ -61,6 +61,7 @@ impl Plugin for ScenePlugin {
|
||||
tag_scene_elements,
|
||||
spawn_main_scene_light,
|
||||
frame_scene_in_view,
|
||||
start_animation_clip,
|
||||
)
|
||||
.in_set(SceneSpawnerSystem),
|
||||
);
|
||||
@@ -128,6 +129,9 @@ pub struct BindPoseGlobal(pub Affine3A);
|
||||
#[derive(Component, Clone, Copy, Debug, Deref, DerefMut)]
|
||||
pub struct InvBindPose(pub Affine3A);
|
||||
|
||||
#[derive(Resource)]
|
||||
pub struct MorphAnimation(pub Handle<AnimationClip>);
|
||||
|
||||
fn initialize(mut cmd: Commands, r_assets: Res<AssetServer>) {
|
||||
// Camera, graphics settings
|
||||
let focus = Vec3::ZERO;
|
||||
@@ -197,6 +201,7 @@ fn init_scene_loading(
|
||||
}
|
||||
}
|
||||
|
||||
cmd.insert_resource(MorphAnimation(assets.load(format!("{}#Animation2", path))));
|
||||
cmd.insert_resource(PendingScene(assets.load(path)));
|
||||
st_next.set(SceneState::Loading);
|
||||
}
|
||||
@@ -485,6 +490,15 @@ fn frame_scene_in_view(
|
||||
cam_xform.translation = cam.focus + cam_xform.back() * radius;
|
||||
}
|
||||
|
||||
fn start_animation_clip(
|
||||
mut animation_clips: Query<&mut AnimationPlayer>,
|
||||
morph_animation: Res<MorphAnimation>,
|
||||
) {
|
||||
for mut animation_clip in animation_clips.iter_mut() {
|
||||
animation_clip.play(morph_animation.0.clone()).repeat();
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(feature = "wasm")]
|
||||
mod wasm {
|
||||
use bevy::{prelude::*, window::PrimaryWindow};
|
||||
|
||||
Reference in New Issue
Block a user