294 lines
8.2 KiB
HTML
294 lines
8.2 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
|
<link href="/assets/favicon-32x32.png" rel="icon" sizes="32x32" type="image/png">
|
|
<link href="/assets/favicon-16x16.png" rel="icon" sizes="16x16" type="image/png">
|
|
<link href="/assets/favicon-96x96.png" rel="icon" sizes="96x96" type="image/png">
|
|
<title>Deep Diagram</title>
|
|
<style>
|
|
body {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
aspect-ratio: auto;
|
|
font-family: Roboto, sans-serif;
|
|
font-size: large;
|
|
color: #4444ee;
|
|
}
|
|
|
|
.scene {
|
|
width: 100vw;
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
|
|
}
|
|
|
|
#gameCanvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
margin: 0px;
|
|
padding: 0px;
|
|
background: transparent;
|
|
}
|
|
|
|
|
|
div.overlay {
|
|
position: absolute;
|
|
background: #000;
|
|
left: 50%;
|
|
top: 50%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 12;
|
|
width: 320px;
|
|
height: 300px;
|
|
}
|
|
|
|
div.overlay div {
|
|
background-color: #000000;
|
|
color: #FFD700;
|
|
padding: 15px 25px;
|
|
text-align: center;
|
|
text-decoration: none;
|
|
cursor: pointer;
|
|
border: none;
|
|
}
|
|
|
|
div.overlay div a {
|
|
display: inline-block;
|
|
text-decoration: none;
|
|
border-color: #FFD700;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
padding: 10px;
|
|
width: 200px;
|
|
}
|
|
|
|
div.overlay div a:visited, div.overlay div a:link {
|
|
color: white;
|
|
}
|
|
|
|
div.overlay div a:hover {
|
|
background-color: #FFD700;
|
|
color: #000000;
|
|
}
|
|
|
|
div.overlay div a {
|
|
|
|
}
|
|
|
|
div.overlay input {
|
|
display: inline-block;
|
|
margin: 10px auto;
|
|
text-decoration: none;
|
|
border-color: #FFD700;
|
|
border-style: solid;
|
|
border-width: 1px;
|
|
padding: 10px;
|
|
width: 200px;
|
|
}
|
|
|
|
div#create {
|
|
left: 50%;
|
|
top: 60%;
|
|
transform: translate(-50%, -50%);
|
|
z-index: 12;
|
|
width: 320px;
|
|
height: 240px;
|
|
border: 3px inset #FFD700;
|
|
display: none;
|
|
}
|
|
|
|
div.overlay div a.cancel {
|
|
font-size: small;
|
|
font-weight: lighter;
|
|
font-style: italic;
|
|
background-color: #222211;
|
|
color: #EEC755;
|
|
}
|
|
|
|
div.overlay div a.cancel:hover {
|
|
background-color: #EEC700;
|
|
color: #000000;
|
|
}
|
|
|
|
#download {
|
|
display: none;
|
|
}
|
|
|
|
#main.mini {
|
|
left: 100px;
|
|
top: 200px;
|
|
width: 160px;
|
|
}
|
|
|
|
#main.mini img, #tutorial img {
|
|
width: 160px;
|
|
height: 60px;
|
|
}
|
|
|
|
#main.mini div a, #tutorial div a {
|
|
width: 80px;
|
|
}
|
|
|
|
#tutorial h1 {
|
|
font-size: x-large;
|
|
font-weight: bolder;
|
|
text-align: center;
|
|
color: #F9F9E9;
|
|
}
|
|
|
|
#tutorial {
|
|
z-index: 15;
|
|
left: 100px;
|
|
top: 560px;
|
|
width: 160px;
|
|
height: 210px;
|
|
}
|
|
|
|
|
|
#closekey, #closekey a:active, #closekey a:visited, #closekey a:link {
|
|
position: relative;
|
|
color: #ffffff;
|
|
}
|
|
|
|
#loadingGrid {
|
|
z-index: -1;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
</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 using webxr" name="description">
|
|
<link href="/manifest.webmanifest" rel="manifest"/>
|
|
<!--<script src='/niceware.js'></script>-->
|
|
</head>
|
|
<body>
|
|
|
|
<div class="overlay" id="tutorial">
|
|
<h1>Help</h1>
|
|
<div id="desktopTutorial"><a href="#" id="desktopLink">Desktop</a></div>
|
|
<div id="questTutorial"><a href="#" id="questLink">Quest</a></div>
|
|
</div>
|
|
|
|
<div class="overlay mini" id="main">
|
|
<img height="120" src="/assets/ddd.svg" width="320">
|
|
<div id="startCreate"><a href="#" id="startCreateLink">Start</a></div>
|
|
<div id="download"><a href="#" id="downloadLink">Download Model</a></div>
|
|
</div>
|
|
|
|
<div class="overlay" id="create">
|
|
<div><input id="createName" placeholder="Enter a name for your diagram" type="text"></div>
|
|
<div><input id="createPassword" placeholder="Enter a password (optional)" type="text"></div>
|
|
<div><a href="#" id="createActionLink">Create</a></div>
|
|
<div><a class="cancel" href="#" id="cancelCreateLink">Cancel</a></div>
|
|
</div>
|
|
<div class="overlay" id="keyboardHelp">
|
|
<div id="closekey"><a href="#">X</a></div>
|
|
<img height="240" src="/assets/textures/keyboardhelp2.jpg" width="480">
|
|
<img height="240" src="/assets/textures/mousehelp.jpg" width="180">
|
|
|
|
</div>
|
|
<img id="loadingGrid" src="/assets/grid3.jpg"/>
|
|
<script>
|
|
const create = document.querySelector('#startCreateLink');
|
|
if (create) {
|
|
create.addEventListener('click', function (evt) {
|
|
evt.preventDefault();
|
|
document.querySelector('#main').style.display = 'none';
|
|
document.querySelector('#create').style.display = 'block';
|
|
});
|
|
}
|
|
const cancel = document.querySelector('#cancelCreateLink');
|
|
if (cancel) {
|
|
cancel.addEventListener('click', function (evt) {
|
|
evt.preventDefault();
|
|
document.querySelector('#main').style.display = 'block';
|
|
document.querySelector('#create').style.display = 'none';
|
|
});
|
|
}
|
|
const close = document.querySelector('#closekey a');
|
|
if (close) {
|
|
close.addEventListener('click', function (evt) {
|
|
evt.preventDefault();
|
|
document.querySelector('#keyboardHelp').style.display = 'none';
|
|
});
|
|
}
|
|
const desktopTutorial = document.querySelector('#desktopLink');
|
|
if (desktopTutorial) {
|
|
desktopTutorial.addEventListener('click', function (evt) {
|
|
evt.preventDefault();
|
|
// document.querySelector('#tutorial').style.display = 'none';
|
|
document.querySelector('#keyboardHelp').style.display = 'block';
|
|
});
|
|
}
|
|
const createAction = document.querySelector('#createActionLink');
|
|
if (createAction) {
|
|
createAction.addEventListener('click', function (evt) {
|
|
evt.preventDefault();
|
|
const value = document.querySelector('#createName').value;
|
|
if (value && value.length > 4) {
|
|
document.location.href = '/db/' + value;
|
|
} else {
|
|
window.alert('Name must be longer than 4 characters');
|
|
}
|
|
});
|
|
}
|
|
|
|
/*
|
|
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>
|
|
|
|
</body>
|
|
<style>
|
|
#keyboardHelp {
|
|
display: none;
|
|
width: 665px;
|
|
height: 312px;
|
|
}
|
|
|
|
#keyboardHelp .button {
|
|
|
|
background-color: white;
|
|
width: 16px;
|
|
height: 16px;
|
|
display: inline-block;
|
|
text-align: center;
|
|
color: #000000;
|
|
}
|
|
|
|
#keyboardHelp div {
|
|
background: transparent;
|
|
}
|
|
</style>
|
|
</html> |