183 lines
4.5 KiB
HTML
183 lines
4.5 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
|
<title>Deep Diagram</title>
|
|
<style>
|
|
body {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
aspect-ratio: auto;
|
|
}
|
|
|
|
.scene {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
.webButton {
|
|
position: fixed;
|
|
bottom: 50px;
|
|
left: 20px;
|
|
background: rgba(51, 51, 51, .7);
|
|
display: none;
|
|
width: 80px;
|
|
height: 50px;
|
|
z-index: 10;
|
|
}
|
|
|
|
.webMenu {
|
|
display: none;
|
|
position: fixed;
|
|
bottom: 50px;
|
|
left: 20px;
|
|
width: 50%;
|
|
height: 50%;
|
|
background: rgba(51, 51, 51, .9);
|
|
color: #fff;
|
|
z-index: 9;
|
|
}
|
|
|
|
.webMenu input {
|
|
background: rgba(51, 51, 51, .9);
|
|
}
|
|
|
|
.webMenu label, .webMenu input {
|
|
|
|
color: #fff;
|
|
}
|
|
|
|
.webMenu ul {
|
|
list-style-type: none;
|
|
padding: 0px;
|
|
margin: 0px;
|
|
}
|
|
|
|
.webMenu li label {
|
|
display: inline-block;
|
|
width: 200px;
|
|
}
|
|
|
|
.webMenu li {
|
|
margin: 5px;
|
|
}
|
|
|
|
#gameCanvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
}
|
|
|
|
#questLaunch {
|
|
position: fixed;
|
|
top: 30px;
|
|
right: 30px;
|
|
padding: 10px;
|
|
background: #000;
|
|
color: #fff;
|
|
font-size: 1.5em;
|
|
z-index: 100;
|
|
}
|
|
|
|
#download {
|
|
position: fixed;
|
|
z-index: 11;
|
|
width: 200px;
|
|
height: 20px;
|
|
position: absolute;
|
|
bottom: 50px;
|
|
left: 16px;
|
|
padding: 10px;
|
|
background: #000;
|
|
color: #fff;
|
|
}
|
|
</style>
|
|
<link as="script" href="/newRelic.js" rel="preload">
|
|
<script src="/newRelic.js"></script>
|
|
<meta content="width=device-width, initial-scale=1, height=device-height" name="viewport">
|
|
<meta content="An immersive vr diagramming experience based on a-frame and webxr" name="description">
|
|
<link href="/assets/favicon-16x16.png" rel=icon sizes="16x16" type="image/png">
|
|
<link href="/assets/favicon-32x32.png" rel=icon sizes="32x32" type="image/png">
|
|
<link href="/assets/favicon-96x96.png" rel=icon sizes="96x96" type="image/png">
|
|
<link href="/manifest.webmanifest" rel="manifest"/>
|
|
<script src='/niceware.js'></script>
|
|
</head>
|
|
<body>
|
|
<!--<div id="questLaunch"><a href="https://www.oculus.com/open_url/?url=https://www.deepdiagram.com/" target="_blank">Launch
|
|
On Quest</a>
|
|
</div>
|
|
<div id="download"><a href="#" id="downloadLink">Download Model</a></div>
|
|
-->
|
|
<script>
|
|
/*
|
|
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition
|
|
var SpeechGrammarList = SpeechGrammarList || window.webkitSpeechGrammarList
|
|
var SpeechRecognitionEvent = SpeechRecognitionEvent || webkitSpeechRecognitionEvent
|
|
var recognition = new SpeechRecognition();
|
|
recognition.continuous = false;
|
|
recognition.lang = 'en-US';
|
|
recognition.interimResults = true;
|
|
recognition.maxAlternatives = 1;
|
|
recognition.onresult = function(event) {
|
|
console.log(event.results[0][0].transcript);
|
|
}
|
|
recognition.onend = function() {
|
|
console.log("recognition ended");
|
|
recognition.start();
|
|
}
|
|
console.log("starting recognition");
|
|
recognition.start();
|
|
|
|
*/
|
|
|
|
</script>
|
|
<script src="/src/vrApp.ts" type="module"></script>
|
|
|
|
<div class="scene">
|
|
<canvas id="gameCanvas"></canvas>
|
|
</div>
|
|
<div class="webButton">
|
|
<button id="menuButton">Open Menu</button>
|
|
</div>
|
|
<div class="webMenu">
|
|
<ul>
|
|
<li>
|
|
<label for="newRelicAccount">New Relic Account</label>
|
|
<input id="newRelicAccount" type="text" value="">
|
|
</li>
|
|
<li>
|
|
|
|
<label for="newRelicClient">New Relic Client</label>
|
|
<input id="newRelicClient" type="text" value="">
|
|
</li>
|
|
</ul>
|
|
|
|
</div>
|
|
<script>
|
|
const button = document.querySelector('#menuButton');
|
|
if (button) {
|
|
button.addEventListener('click', (e) => {
|
|
const menu = document.querySelector('.webMenu');
|
|
//const button = document.querySelector('#webButton');
|
|
|
|
if (menu.style.display === 'block') {
|
|
menu.style.display = 'none';
|
|
button.innerText = "Open Menu";
|
|
|
|
} else {
|
|
menu.style.display = 'block';
|
|
button.innerText = "Close Menu";
|
|
}
|
|
});
|
|
}
|
|
|
|
</script>
|
|
|
|
</body>
|
|
</html> |