Skip to content
Snippets Groups Projects
Commit 250cd776 authored by netpro2k's avatar netpro2k
Browse files

Add a simple loading spinner while connecting

parent 248fdbae
No related branches found
No related tags found
No related merge requests found
...@@ -4,20 +4,30 @@ ...@@ -4,20 +4,30 @@
<title>Mozilla Mixed Reality Social Client</title> <title>Mozilla Mixed Reality Social Client</title>
<script src="./app.bundle.js"></script> <script src="./app.bundle.js"></script>
<style> <style>
.a-enter-vr { .a-enter-vr {
top: 90px; top: 90px;
bottom: auto; bottom: auto;
} }
#loader {
position: fixed;
width: 100vw;
height: 100vh;
z-index: 10001;
background: #eaeaea no-repeat url(assets/loading.gif) center center;
opacity: 0.9;
}
</style> </style>
</head> </head>
<body> <body>
<div id="loader"></div>
<a-scene <a-scene
networked-scene="adapter: janus; networked-scene="adapter: janus;
room: 2; room: 2;
serverURL: wss://quander.me:8989; serverURL: wss://quander.me:8989;
audio: true; audio: true;
debug: true; debug: true;
onConnect: onConnect;
connectOnLoad: false;" connectOnLoad: false;"
mute-mic="eventSrc: a-scene; toggleEvents: action_mute"> mute-mic="eventSrc: a-scene; toggleEvents: action_mute">
......
...@@ -56,3 +56,7 @@ window.onSceneLoad = function() { ...@@ -56,3 +56,7 @@ window.onSceneLoad = function() {
scene.components["networked-scene"].connect(); scene.components["networked-scene"].connect();
}; };
window.onConnect = function() {
document.getElementById("loader").style.display = "none";
};
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