mirror of
https://github.com/storytold/storyteller-bevy.git
synced 2026-10-17 00:13:17 +00:00
Added the ability to spawn a mannequin
This commit is contained in:
@@ -58,13 +58,13 @@ fn spawn_test_bvh(
|
||||
|
||||
|
||||
|
||||
let ent = cmd.spawn_bvh_with_transform(
|
||||
&r_bvh.0,
|
||||
Transform::from_scale(Vec3::splat(0.06))
|
||||
.with_translation(Vec3::new(0., 1.0, 0.524)),
|
||||
);
|
||||
// let ent = cmd.spawn_bvh_with_transform(
|
||||
// &r_bvh.0,
|
||||
// Transform::from_scale(Vec3::splat(0.06))
|
||||
// .with_translation(Vec3::new(0., 1.0, 0.524)),
|
||||
// );
|
||||
|
||||
cmd.entity(ent).insert(RetargetSource);
|
||||
// cmd.entity(ent).insert(RetargetSource);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -596,4 +596,29 @@ declare global {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
//==============================================================================
|
||||
// Spawing GLTF objects
|
||||
//==============================================================================
|
||||
|
||||
// static LOAD_GLTF : WasmMessageBuffer<String> = WasmMessageBuffer::new();
|
||||
|
||||
// #[wasm_bindgen(js_name = spawnGltf)]
|
||||
// pub fn spawn_gltf(path : String) {
|
||||
// let wrapper = LOAD_GLTF.get_or_init(|| ReentrantMutex::new(RefCell::new(Some(path.clone()))));
|
||||
// let guard = wrapper.lock();
|
||||
// *guard.borrow_mut() = Some(path);
|
||||
// }
|
||||
|
||||
// pub(super) fn load_gltf_object(
|
||||
// mut load_object_event: EventWriter<LoadLibraryObjectEvent>
|
||||
// ) {
|
||||
// let wrapper = LOAD_GLTF.get_or_init(|| ReentrantMutex::new(RefCell::new(Some(path.clone()))));
|
||||
// let guard = wrapper.lock();
|
||||
|
||||
// if guard.borrow().is_some() {
|
||||
// load_object_event.send(LoadLibraryObjectEvent(guard.take().unwrap()));
|
||||
// }
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
@@ -31,4 +31,4 @@ pub(crate) fn initialize() {
|
||||
let wrapper = INITIALIZED.get_or_init(|| ReentrantMutex::new(RefCell::new(false)));
|
||||
let guard = wrapper.lock();
|
||||
*guard.borrow_mut() = true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user