-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
39 lines (35 loc) · 1.37 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
<html>
<head>
<title>
Multimarker Demo
</title>
<meta name="Multimarker Demo" >
<script> //Loads multimarker file to localstorage otherwise the area preset will only look for hiro alone
var a = window.location.toString();
var file = a.substring(a.indexOf("?") + 1);
var xobj = new XMLHttpRequest();
xobj.overrideMimeType("application/json");
if(file==a){
xobj.open('GET', 'ARjsMultiMarkerFile', true); //
}
else{
xobj.open('GET', file, true); //
}
xobj.onreadystatechange = function () {
if (xobj.readyState == 4 && xobj.status == "200") {
localStorage.setItem('ARjsMultiMarkerFile',xobj.responseText);
}};
xobj.send();
</script>
<script src="lib/aframe.min.js"></script>
<script src="https://jeromeetienne.github.io/AR.js/aframe/build/aframe-ar.js"></script>
</head>
<body style='margin : 0px; overflow: hidden;'>
<a-scene id="scene" embedded arjs='sourceType:webcam; debugUIEnabled: false; detectionMode: mono;' vr-mode-ui="enabled: false;">
<a-marker preset="area">
<a-box color="tomato" position="2.4342159276022715 -0.4749316927031705 1.355608183113371" rotation="0 -90 -70"depth="2" height="2" width="2" ></a-box>
</a-marker>
<a-entity camera ></a-entity>
</a-scene>
</body>
</html>