-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
36 lines (32 loc) · 1.35 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
<html>
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
<script src="https://raw.githack.com/fcor/arjs-gestures/master/dist/gestures.js"></script>
<style> #fullscreen-btn { position: absolute; top: 10px; left: 10px; z-index: 9999; } </style>
<body style="margin : 0px; overflow: hidden;">
<button id="fullscreen-btn" onclick="toggleFullScreen()">Fullscreen</button>
<a-scene embedded arjs=’sourceType: webcam; sourceWidth:1920; sourceHeight:1080; displayWidth: 1920; displayHeight: 1080;’
vr-mode-ui="enabled: false"
gesture-detector >
<a-marker type="pattern" preset="custom" url="3Dmarker.patt">
<a-entity position="0 1 0" scale="0.1 0.1 0.1"
gltf-model="example.gltf"
class="clickable"
gesture-handler="minScale: 0.025; maxScale: 10"
></a-entity>
</a-marker>
<a-entity camera></a-entity>
</a-scene>
<script>
function toggleFullScreen() {
if (!document.fullscreenElement) {
document.documentElement.requestFullscreen();
} else {
if (document.exitFullscreen) {
document.exitFullscreen();
}
}
}
</script>
</body>
</html>