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

Shut down A-Frame and three.js on exit

parent e15c2632
No related branches found
No related tags found
No related merge requests found
...@@ -119,6 +119,10 @@ async function exitScene() { ...@@ -119,6 +119,10 @@ async function exitScene() {
if (NAF.connection && NAF.connection.adapter) { if (NAF.connection && NAF.connection.adapter) {
NAF.connection.disconnect(); NAF.connection.disconnect();
} }
const scene = document.querySelector("a-scene");
scene.renderer.animate(null); // Stop animation loop, TODO A-Frame should do this
document.body.removeChild(scene);
} }
async function enterScene(mediaStream) { async function enterScene(mediaStream) {
......
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