-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
85 lines (78 loc) · 2.78 KB
/
Copy pathindex.html
File metadata and controls
85 lines (78 loc) · 2.78 KB
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
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<meta name="description" content="Hello, World! • A-Frame">
<title>Rural Broadband Map</title>
<meta name="theme-color" content="#07353F" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="manifest" href="/manifest.json" />
<link rel="shortcut icon" href="/favicon.ico" />
<link href="src/preflight.css" rel="stylesheet" type="text/css" />
<link href="src/styles.css" rel="stylesheet" type="text/css" />
<script src="aframe/aframe-master.js"></script>
<script>
window.global = window;
window.process = {
env: { DEBUG: undefined },
};
const exports = {};
</script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Bitter:ital,wght@0,100..900;1,100..900&display=swap" rel="stylesheet">
<style>
/* By default, hide the DOM Overlay element. */
#overlay {
display: initial;
padding: 0;
}
/* Show the DOM Overlay element while active (:xr-overlay pseudoclass) */
#overlay:xr-overlay {
display: initial;
}
#greeting {
background-color: rgba(1, 1, 1, 0.25);
margin: 10px;
}
#exit-ar {
position: absolute;
right: 40px;
bottom: 40px;
background: rgba(127,127,127,0.25);
color: white;
border: 1px solid rgba(255,255,255,0.25);
padding: 6px 8px;
font-weight: bold;
}
</style>
<script>
AFRAME.registerComponent('exit-ar-button', {
schema: {
element: {type: 'selector' }
},
init: function () {
this.data.element.addEventListener('click', ev => {
this.el.sceneEl.renderer.xr.getSession().end();
});
}
});
</script>
</head>
<body>
<div id="overlay">
<!--<div id="react-app"><img id="loader" src="images/loading.gif" style="position: absolute; width: 5%; top: 47.5%; bottom: auto; left: 47.5%; right: auto;" /><!–<div id="map"></div>–></div>-->
<button id="exit-ar">Exit AR</button>
</div>
<a-scene background="color: #ECECEC"
webxr="optionalFeatures: dom-overlay; overlayElement: #overlay"
xr-mode-ui="XRMode: xr">
<a-entity exit-ar-button="element: #exit-ar"></a-entity>
<a-box position="-1 0.5 -3" rotation="0 45 0" color="#4CC3D9" shadow></a-box>
<a-sphere position="0 1.25 -5" radius="1.25" color="#EF2D5E" shadow></a-sphere>
<a-cylinder position="1 0.75 -3" radius="0.5" height="1.5" color="#FFC65D" shadow></a-cylinder>
<a-plane position="0 0 -4" rotation="-90 0 0" width="4" height="4" color="#7BC8A4" shadow></a-plane>
</a-scene>
<script src="src/main.tsx" type="module"></script>
</body>
</html>