-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path13-MarkerBasedAR.html
40 lines (40 loc) · 1.88 KB
/
13-MarkerBasedAR.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Marker Based AR</title>
<!-- Agar animasi yang awalnya disematkan di pengontrol, bisa dipindah ke yang dikontrol -->
<script src="https://aframe.io/releases/1.0.4/aframe.min.js"></script>
<script src="https://cdn.jsdelivr.net/gh/donmccurdy/[email protected]/dist/aframe-extras.min.js"></script>
<!-- Kita akan menggunakan yang marker based (bukan image tracking based) -->
<script src="https://raw.githack.com/AR-js-org/AR.js/master/aframe/build/aframe-ar.js"></script>
</head>
<body style="margin:0px;overflow:hidden;">
<a-scene embedded arjs="detectionMode:mono_and_matrix;matrixCodeType:3x3_PARITY65">
<a-marker type="barcode" value="5">
<a-box color="#ffff00" material="opacity:0.5" scale="0.5 0.5 0.5"
animation__putar="property:rotation;from:0 0 0;to:0 360 0;startEvents:mouseenter;"
></a-box>
</a-marker>
<a-marker type="pattern" url="markers/AVR.patt">
<a-box color="#ff00ff" material="opacity:0.5" scale="0.5 0.5 0.5"
animation__putar="property:rotation;from:0 0 0;to:0 360 0;startEvents:mouseenter;"
></a-box>
</a-marker>
<a-marker preset="hiro">
<a-box color="#ff0000" material="opacity:0.5" scale="0.5 0.5 0.5"
animation__putar="property:rotation;from:0 0 0;to:0 360 0;startEvents:mouseenter;"
></a-box>
</a-marker>
<a-marker preset="kanji">
<a-box color="#00ff00" material="opacity:0.5" scale="0.5 0.5 0.5"
animation__putar="property:rotation;from:0 0 0;to:0 360 0;startEvents:mouseenter;"
></a-box>
</a-marker>
<a-entity camera>
<a-cursor></a-cursor>
</a-entity>
</a-scene>
</body>
</html>