diff --git a/src/gltf-component-mappings.js b/src/gltf-component-mappings.js index 42980fddcc40396a726877ef65355817b2aa1dbb..d8a318f3c2691d4f639a9c6c7b18333a405ca65f 100644 --- a/src/gltf-component-mappings.js +++ b/src/gltf-component-mappings.js @@ -75,6 +75,8 @@ AFRAME.GLTFModelPlus.registerComponent("nav-mesh", "nav-mesh", (el, _componentNa AFRAME.GLTFModelPlus.registerComponent("networked", "networked", (el, componentName, componentData) => { // Mark this to act as a "full sync" from the GLTF scene itself, to avoid taking ownership. - el.firstUpdateData = componentData; - el.setAttribute(componentName, componentData); + componentData.isFirstSync = true; + componentData.components = []; + console.log(componentData); + NAF.connection.entities.updateEntity(componentData.owner, "u", componentData); }); diff --git a/src/hub.js b/src/hub.js index 92ff24a3679446fc65180f176878be799d14a46e..7299836c61622323dada57f69e8e548345b1d096 100644 --- a/src/hub.js +++ b/src/hub.js @@ -8,6 +8,7 @@ import { patchWebGLRenderingContext } from "./utils/webgl"; patchWebGLRenderingContext(); import "three/examples/js/loaders/GLTFLoader"; +//import "three/examples/js/exporters/GLTFExporter"; import "networked-aframe/src/index"; import "naf-janus-adapter"; import "aframe-teleport-controls";