-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
90 lines (82 loc) · 4.16 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- These tags are needed for enabling experimental Chrome APIs via Chrome's Origin-Trial program (Android, Windows): https://github.com/GoogleChrome/OriginTrials/blob/gh-pages/available-trials.md#current-experimental-features -->
<!-- Origin Trial Token, feature = Generic Sensors, origin = https://github.io, expires = 2018-04-10 -->
<meta http-equiv="origin-trial" data-feature="Generic Sensors" data-expires="2018-04-10" content="Aokv0ODVMUPIswIBi6DnpAIjhWefEd8gD8GpVgdYgETj0C5+/3kKMzZE/FOrBwHcpBO6LHuVRrIw3yOT8EMmJAYAAABQeyJvcmlnaW4iOiJodHRwczovL2dpdGh1Yi5pbzo0NDMiLCJmZWF0dXJlIjoiR2VuZXJpY1NlbnNvciIsImV4cGlyeSI6MTUyMzMxODQwMH0=">
<!-- Origin Trial Token, feature = WebVR (For Chrome M62+), origin = https://github.io, expires = 2018-05-07 -->
<meta http-equiv="origin-trial" data-feature="WebVR (For Chrome M62+)" data-expires="2018-05-07" content="AgINztgDnjFV8da2D9SSzIITBRlHX8mduCR7DXfENxjr9ALduKOxBDdn2n66auQSlljVyhnRWWerxC0BWbE8pAoAAABOeyJvcmlnaW4iOiJodHRwczovL2dpdGh1Yi5pbzo0NDMiLCJmZWF0dXJlIjoiV2ViVlIxLjFNNjIiLCJleHBpcnkiOjE1MjU3MjU4MDh9">
<title> | TGView3D</title>
<meta name="description" content="">
<link rel="icon" href="favicon.ico">
<link rel="stylesheet" type="text/css" href="styles/webvr.css">
<script src="lib/telemetry.js"></script>
<script>
MozillaResearch.telemetry.start({
analytics: true,
errorLogging: true,
performance: true
});
MozillaResearch.telemetry.performance.mark('LoaderParsingStart');
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.0/jquery.min.js"></script>
<script src="Build/UnityLoader.js"></script>
<script>
/* global UnityLoader, MozillaResearch */
MozillaResearch.telemetry.performance.measure('LoaderParsing', 'LoaderParsingStart');
(function () {
UnityLoader.SystemInfo.mobile = false; // Workaround to force `UnityLoader` to actually load on mobile.
MozillaResearch.telemetry.performance.mark('LoadingStart');
window.gameInstance = UnityLoader.instantiate('gameContainer', 'Build/web.json', {
Module: {
// `preserveDrawingBuffer` is needed for WebVR content to be mirrored to the `<canvas>`.
webglContextAttributes: {
preserveDrawingBuffer: true
}
},
onProgress: unityProgress
});
function unityProgress (gameInstance, progress) {
if (!gameInstance.progress) {
gameInstance.loader = document.getElementById('loader');
gameInstance.progress = document.getElementById('progress');
gameInstance.loading = document.getElementById('loading');
document.dispatchEvent(new CustomEvent('UnityProgressStart'));
}
gameInstance.progress.style.width = (100 * progress) + '%';
if (progress === 1) {
document.dispatchEvent(new CustomEvent('UnityLoaded'));
}
}
})();
</script>
<link rel="manifest" href="manifest.webmanifest">
</head>
<body>
<div id="loader">
<div id="loading" class="loading">Loading</div>
<div id="progress" class="progress"></div>
</div>
<div id="game">
<div id="gameContainer"></div>
</div>
<div id="instruction">
<div id="novr" class="panel center">
<h3>You’ll need a <a href="https://webvr.rocks/">WebVR-enabled browser</a> and VR headset to fully enjoy this experience.</h3>
<p><img src="mousedrag.png" width="70" alt="Click-and-drag your mouse"></p>
<p>In the meantime, <strong><em>click and drag</em></strong> to have a look around!</p>
<p>
<button class="confirm">Continue</button>
</p>
</div>
</div>
<input type="file" id="file" name="fileInput" accept=".json">
<button id="entervr" value="Enter VR"></button>
<div id="performance" data-enabled="false"></div>
<script src="vendor/gl-matrix-min.js"></script>
<script src="vendor/webvr-polyfill.min.js"></script>
<script src="webvr.js"></script>
</body>
</html>