-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
128 lines (120 loc) · 4.94 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
<!DOCTYPE html>
<html>
<head>
<meta title="AR JS Demos" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<style>
html {
font-family: 'Operator Mono', 'Monaco', 'Andale Mono', monospaced;
background-color: #D6CEC5;
}
body {
max-width: 400px;
margin: 0 auto;
padding: 1.4em;
}
.section {
border-bottom: 1px dashed #6D868E;
}
</style>
<script>
if (location.hostname !== 'localhost' && location.protocol != 'https:') {
location.href = 'https:' + window.location.href.substring(window.location.protocol.length);
}
</script>
</head>
<body>
<h1>Web AR/AR.js Demos</h1>
<hr/>
<p>
Print out <a href="/static/img/HIRO.jpg" target="_blank">this marker image</a> then click on one of the demo's and point your camera at it.
</p>
<details>
<summary>Caveats</summary>
<ul>
<li>Marker must be clearly visible and not distorted. Even slight curves are enough to skew detection.</li>
<li>If nothing appears, try pointing away from the marker then pointing at the marker again.</li>
</ul>
</details>
<hr/>
<div class="section">
<a href="/transparent-png">
<h3>
Transparent PNG
</h3>
</a>
<p>
A transparent PNG. This is a super simple demo. There is almost nothing to it.
These are the default settings except for the sizing, which was specified to
avoid distorting the image.
</p>
<p>
<b>Marker</b>: Default
</p>
</div>
<div class="section">
<a href="/floating-text">
<h3>
Floating Text
</h3>
</a>
<p>
In this demo the text is set in the markup as an a-entity element with a text attribute.
</p>
<p>
<b>Marker</b>: Default
</p>
</div>
<div class="section">
<a href="/transparent-png-curved">
<h3>
Curved Transparent PNG
</h3>
</a>
<p>
This uses the <a href="https://aframe.io/docs/0.7.0/primitives/a-curvedimage.html" target="_blank">a-curvedimage</a> element
instead of the <a href="https://aframe.io/docs/0.7.0/primitives/a-image.html" target="_blank">a-image</a> element.
</p>
<p>
<b>Marker</b>: Default
</p>
</div>
<div class="section">
<a href="/scene">
<h3>
A Full Scene
</h3>
</a>
<p>
This is loading a <a href="https://aframe.io/docs/0.7.0/components/gltf-model.html#why-use-gltf" target="_blank">glTF</a> model
and rendering it on top of the marker. This is pretty rad but also requires the most work because you have to
make the 3D model.
</p>
<p>
You can read more about using glTF models in a-frame <a href="https://blog.mozvr.com/using-gltf-models-with-a-frame/" target="_blank">here</a>.
</p>
<p>
<b>Marker</b>: Default
</p>
</div>
<div class="section">
<a href="/hi">
<h3>
Custom Marker [Work In Progress]
</h3>
</a>
<p>
[Not working at the moment: there's a <a href="https://github.com/jeromeetienne/AR.js/issues/216" target="_blank">bug in the ar.js library</a>]
This example uses a custom marker. Making custom markers is as simple as uploading an appropriate image
<a href="https://jeromeetienne.github.io/AR.js/three.js/examples/marker-training/examples/generator.html" target="_blank">here</a> and
downloading the .patt file.
</p>
<p>
You can read more about custom markers <a href="https://artoolkit.org/documentation/doku.php?id=3_Marker_Training:marker_training" target="_blank">here</a>.
</p>
<p>
<b>Marker</b>: <a href="/static/img/custom-marker.jpg">Custom</a>
</p>
</div>
</body>
</html>