From a51c3c291d65d01f5ebc3446cb6b954f3b7b8e61 Mon Sep 17 00:00:00 2001
From: Greg Fodor <gfodor@gmail.com>
Date: Sun, 21 Oct 2018 18:25:25 +0000
Subject: [PATCH] WIP

---
 src/gltf-component-mappings.js | 6 ++++--
 src/hub.js                     | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/gltf-component-mappings.js b/src/gltf-component-mappings.js
index 42980fddc..d8a318f3c 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 92ff24a36..7299836c6 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";
-- 
GitLab