-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
executable file
·221 lines (197 loc) · 8.06 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
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Author" content="KaiRo - Robert Kaiser">
<title>VR Map - OpenStreetMap goes WebVR</title>
<link rel="stylesheet" type="text/css" href="slides.css">
<script type="text/javascript" src="slides.js"></script>
<link rel="contents" href="#index" title="Überblick">
<link rel="index" id="link-toc" href="#toc" title="Inhalt">
<link rel="start" id="link-start" href="#index" title="Start">
</head>
<body onload="docLoaded();">
<header id="header"><div id="header-text">VR Map</div>
<div id="subheader-text"></div>
<a id="headerlogo" href="#index" title="Startseite">Mozilla</a>
</header>
<nav id="slidenav">
<a href="#toc" id="nav-toc" accesskey="t">toc</a> ||
<a href="#index" id="nav-start" accesskey="s">start</a> ||
<a href="#" id="nav-prev" accesskey="p" hidden>< back</a>
<span id="nav-prev-nolink" class="nolink">< back</span> |
<a href="#" id="nav-next" id="goNext" accesskey="n" hidden>fwd ></a>
<span id="nav-next-nolink" class="nolink">fwd ></span>
</nav>
<article id="toc" data-title="Inhalt">
<h1><span>Table of Contents</span></h1>
<h2>VR Map - OpenStreetMap goes WebVR</h2>
<div class="captionedbox">
<p class="captionedbox-caption">The following slides are available in this presentation:</p>
<div class="captionedbox-content">
<ul id="toc-list">
</ul>
</article>
<article id="index" data-title="Start Page" data-seconds="600">
<h1><span>VR Map: WebVR Using OpenStreetMap Data</span></h1>
<h2>Simple GeoData Visualization with A-Frame</h2>
<div class="simplebox decofont">
<mark><a href="http://home.kairo.at/">Robert Kaiser</a></mark>,
"KaiRo" <[email protected]>
<br><small>Mozilla Tech Speaker</small>
</div>
<div class="captionedbox">
<p class="captionedbox-caption decofont">Slides:
<a href="https://slides.kairo.at/fhwn201810/">https://slides.kairo.at/fhwn201810/</a></p>
<div class="captionedbox-content small">
<ul class="small">
<li>Created for a presentation at
<a href="http://hackathon.fhwn.ac.at/">mobility.builders AR/VR Hackathon 2018</a>
in Wiener Neustadt.</li>
<li>Written in HTML 5 with CSS 3 and JavaScript.</li>
<li>Navigation via links on all slides, via access keys
(e.g. "n"/Alt+Shift+N for "next") or back/forward arrow keys</li>
<li><a href="#toc">Contents</a></li>
<li><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img
alt="Lizenziert unter CC-BY-SA," class="ccinline" src="cc-by-sa.svg"></a>
04-10/2018 Robert Kaiser -
"Mozilla", "Firefox" and their logos are
<a href="http://www.mozilla.org/foundation/trademarks/list.html">trademarks
of Mozilla Foundation</a>.</li>
</ul>
</div>
</div>
</article>
<article id="objectivepre" data-title="Objectives">
<h1><span>Objectives</span></h1>
<div class="simplebox">
<img src="vrusermoz.jpg" class="slidepic"
alt="VR headset user">
<ul>
<li>Cross-Device nature of <mark>WebVR/WebXR</mark></li>
<li>Ease of use of <mark>A-Frame</mark></li>
<li>Ability to use <mark>OpenStreetMap data</a></li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="webvr" data-title="WebVR & WebXR">
<h1><span>WebVR & WebXR</span></h1>
<div class="simplebox">
<img src="vruser.jpg" class="slidepic"
alt="VR headset user">
<ul>
<li><a href="https://webvr.info/">WebVR</a>: <mark>Virtual Reality</mark>
powered by Web technologies</li>
<li>Part of <a href="https://github.com/immersive-web/webxr">WebXR Device API</a>
- Mixed Reality (Virtual + Augmented Reality)</li>
<li><mark>Open Standard</mark> (proposal), in concert with WebGL, WebAudio
and Gamepad APIs</li>
<li>Windows: Firefox release, Mac: Nightly/Beta, Linux: in development</li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="vrmap" data-title="VR Map">
<h1><span>VR Map</span></h1>
<div class="simplebox">
<img src="vrmap-small.png" class="slidepic"
alt="VR Map in 2D">
<ul>
<li><mark>Demo</mark> for WebVR with live
<a href="https://www.openstreetmap.org/">OpenStreetMap</a> data</li>
<li>Usable in 2D mode <mark>on any modern browser</mark></li>
<li>Supports headset + controller where WebVR is supported</li>
<li>Using <a href="https://aframe.io/">Mozilla A-Frame</a> (see later)</li>
<li>Simple: Currently ~80 lines HTML, <mark>~600 lines JS</mark></li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="vrmapdemo" data-title="VR Map Demo">
<h1><span><a href="https://vrmap.kairo.at/">vrmap.kairo.at</a></span></h1>
<div class="simplebox cent">
<a href="https://vrmap.kairo.at/" target="_blank"><img src="vrmap-large.png" class="sshot" alt="VR Map in 2D"></a>
</div>
</article>
<article id="code-basics" data-title="Code Basics">
<h1><span>Code Basics</span></h1>
<div class="simplebox">
<img src="vrusermoz.jpg" class="slidepic"
alt="VR Headset user with Mozilla logos">
<ul>
<li>The world is flat (in two ways)!</li>
<li><mark>Ground tiles</mark> using
<a href="https://en.wikipedia.org/wiki/Mercator_projection">Mercator projection</a>,
"Mapnik" rendering from <a href="https://www.openstreetmap.org/">OSM</a>
via KaiRo's tile caching server</li>
<li><mark>Trees</mark> and <mark>buildings</mark>: live OSM data via
<a href="https://wiki.openstreetmap.org/wiki/Overpass_API">Overpass API</a></li>
<li>Camera/controller setup to support multiple devices for navigating the scene</li>
<li>Built with <a href="https://aframe.io/">Mozilla A-Frame</a> library</li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="aframe" data-title="A-Frame">
<h1><span>A-Frame - XR Made Simple</span></h1>
<div class="simplebox">
<img src="aframe-sticker.png" class="slidepic"
alt="A-Frame - aframe-io">
Example:
<pre>
<<mark>a-scene</mark>>
<a-sphere <small>position="0 1.25 -1" radius="1.25" color="#EF2D5E"</small>></a-sphere>
<<mark>a-cube</mark> <small>position="-1 0.5 1" rotation="0 0 0" …</small>>
<<mark>a-animation</mark> <small>attribute="rotation" … to="0 360 0"</small>></a-animation>
</a-cube>
<a-cylinder <small>position="1 0.75 1" …</small>></a-cylinder>
<a-plane <small>…</small>></a-plane>
<a-sky <small>color="#ECECEC"</small>></a-sky>
</a-scene>
</pre>
<p><a href="https://codepen.io/mozvr/pen/jqERjQ" target="_blank">edit/view</a>
- More at <a href="https://aframe.io/">aframe.io</a>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="code-details" data-title="Code Details">
<h1><span>Code Details</span></h1>
<div class="simplebox">
<img src="vrusermoz.jpg" class="slidepic"
alt="VR Headset user with Mozilla logos">
<ul>
<li><code>index.html</code>: JS includes, start dialog, scene, camera/controller rig</li>
<li><code>map.js</code>: variables, load handler, fetch from Overpass API</li>
<li><code>conversions.js</code>: coordinate conversions</li>
<li><code>position-limit.js</code>: A-Frame component for keeping position above ground</li>
<li><code>tiles.js, trees.js, buildings.js</code>: load/draw the 3 types of objects</li>
<li><mark><a href="https://github.com/KaiRo-at/vrmap" target="_blank">KaiRo-at/vrmap
at GitHub</a></mark></li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="objectivepost" data-title="Objectives - Recap">
<h1><span>Objectives - Recap</span></h1>
<div class="simplebox">
<img src="vruser.jpg" class="slidepic"
alt="VR headset user">
<ul>
<li>Cross-Device nature of <mark>WebVR/WebXR</mark></li>
<li>Ease of use of <mark>A-Frame</mark></li>
<li>Ability to use <mark>OpenStreetMap data</a></li>
</ul>
<p class="ensurepicinbox"></p>
</div>
</article>
<article id="end" data-title="The End">
<div class="simplebox endslidecontainer">
<h1 class="cent endslidetext"><span>Questions?</span></h1>
<h2 class="cent endslidetext"><span><a href="https://vrmap.kairo.at/">vrmap.kairo.at</a></span></h2>
<h3 class="cent endslidetext"><span><a href="https://github.com/KaiRo-at/vrmap">github.com/KaiRo-at/vrmap</a></span></h3>
<img src="vrmap-large.png" class="sshot endslidepic" alt="VR Map in 2D">
</div>
</article>
</body>
</html>