Load remote BVH from URL param (#30)

This PR replaces the hard-coded BVH animation with a URL parameter, and
adds a specialized BVH viewer web component and entry-point function for
previewing the specified animation on our generic mannequin.
This commit is contained in:
Danny McGee
2024-01-19 00:17:51 -05:00
committed by GitHub
parent e1235d6a8f
commit 0e3c285d30
11 changed files with 487 additions and 109 deletions
+2 -5
View File
@@ -40,7 +40,7 @@ impl Plugin for ScenePlugin {
.add_systems(
Update,
(
spawn_test_bvh, // TODO
spawn_test_bvh.run_if(resource_exists::<TestBvh>()), // TODO
init_scene_loading,
tick_scene_loading.run_if(in_state(SceneState::Loading)),
tick_scene_spawning.run_if(in_state(SceneState::Spawning)),
@@ -117,7 +117,7 @@ pub struct SkeletalJoint(pub Color);
pub struct SceneRoot;
#[derive(Resource, Deref, DerefMut)]
struct TestBvh(Handle<Bvh>); // TODO
pub struct TestBvh(pub Handle<Bvh>); // TODO
#[derive(Component, Clone, Copy, Debug, Deref, DerefMut)]
pub struct BindPoseLocal(pub Transform);
@@ -158,9 +158,6 @@ fn initialize(mut cmd: Commands, r_assets: Res<AssetServer>) {
},
Fxaa::default(),
));
// TODO
cmd.insert_resource(TestBvh(r_assets.load("mocap/shuffle.bvh")));
}
// TODO