Skip to content
Snippets Groups Projects
Commit e0061ce2 authored by Greg Fodor's avatar Greg Fodor
Browse files

Reorder definitions to fix build

parent f5ff2a3f
No related branches found
No related tags found
No related merge requests found
......@@ -173,6 +173,13 @@ const onReady = async () => {
document.querySelector("a-scene").emit("username-changed", { username: displayName });
};
const exitScene = () => {
hubChannel.disconnect();
const scene = document.querySelector("a-scene");
scene.renderer.animate(null); // Stop animation loop, TODO A-Frame should do this
document.body.removeChild(scene);
};
const enterScene = async (mediaStream, enterInVR, janusRoomId) => {
const scene = document.querySelector("a-scene");
const playerRig = document.querySelector("#player-rig");
......@@ -268,13 +275,6 @@ const onReady = async () => {
}
};
const exitScene = () => {
hubChannel.disconnect();
const scene = document.querySelector("a-scene");
scene.renderer.animate(null); // Stop animation loop, TODO A-Frame should do this
document.body.removeChild(scene);
};
remountUI({ enterScene, exitScene });
getAvailableVREntryTypes().then(availableVREntryTypes => {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment