diff --git a/studio-ui/src/assets/icons/person.svg b/studio-ui/src/assets/icons/person.svg new file mode 100644 index 0000000..a7fe4ab --- /dev/null +++ b/studio-ui/src/assets/icons/person.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/studio-ui/src/lib/icon.element.ts b/studio-ui/src/lib/icon.element.ts index 1f4f345..1efc53e 100644 --- a/studio-ui/src/lib/icon.element.ts +++ b/studio-ui/src/lib/icon.element.ts @@ -39,6 +39,7 @@ import fasChevronDown from "@fortawesome/fontawesome-pro/svgs/solid/chevron-down import customCylinder from "../assets/icons/cylinder.svg?raw"; import customSphere from "../assets/icons/sphere.svg?raw"; import customTorus from "../assets/icons/torus.svg?raw"; +import customMannequin from "../assets/icons/person.svg?raw"; import styles from "./icon.element.scss?inline"; @@ -99,6 +100,7 @@ function renderSvg(iconId: string) { "up-down-left-right": () => farUpDownLeftRight, "video": () => farVideo, "xmark": () => fasXmark, + "mannequin": () => customMannequin, _: () => null, }); diff --git a/studio-web/src/lib/add-to-scene-menu.element.ts b/studio-web/src/lib/add-to-scene-menu.element.ts index 54684ad..a5f1c4d 100644 --- a/studio-web/src/lib/add-to-scene-menu.element.ts +++ b/studio-web/src/lib/add-to-scene-menu.element.ts @@ -50,6 +50,15 @@ export class AddToSceneMenuElement extends LitElement { > Cylinder + { + studio.loadObject("Mannequin.gltf") + }} + > + Mannequin +
= 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 + // ) { + // 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())); + // } + + // } } diff --git a/studio/src/wasm/mod.rs b/studio/src/wasm/mod.rs index 3f1770a..c2bc8b9 100644 --- a/studio/src/wasm/mod.rs +++ b/studio/src/wasm/mod.rs @@ -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; -} +} \ No newline at end of file