4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
5 <meta name="Author" content="KaiRo - Robert Kaiser">
6 <title>VR Map - OpenStreetMap goes WebVR</title>
7 <link rel="stylesheet" type="text/css" href="slides.css">
8 <script type="text/javascript" src="slides.js"></script>
9 <link rel="contents" href="#index" title="Überblick">
10 <link rel="index" id="link-toc" href="#toc" title="Inhalt">
11 <link rel="start" id="link-start" href="#index" title="Start">
13 <body onload="docLoaded();">
14 <header id="header"><div id="header-text">VR Map</div>
15 <div id="subheader-text"></div>
16 <a id="headerlogo" href="#index" title="Startseite">Mozilla</a>
19 <a href="#toc" id="nav-toc" accesskey="t">toc</a> ||
20 <a href="#index" id="nav-start" accesskey="s">start</a> ||
21 <a href="#" id="nav-prev" accesskey="p" hidden>< back</a>
22 <span id="nav-prev-nolink" class="nolink">< back</span> |
23 <a href="#" id="nav-next" id="goNext" accesskey="n" hidden>fwd ></a>
24 <span id="nav-next-nolink" class="nolink">fwd ></span>
27 <article id="toc" data-title="Inhalt">
28 <h1><span>Table of Contents</span></h1>
29 <h2>VR Map - OpenStreetMap goes WebVR</h2>
31 <div class="captionedbox">
32 <p class="captionedbox-caption">The following slides are available in this presentation:</p>
33 <div class="captionedbox-content">
38 <article id="index" data-title="Start Page" data-seconds="600">
39 <h1><span>VR Map - OpenStreetMap goes WebVR</span></h1>
40 <h2>Simple GeoData Visualization with A-Frame</h2>
42 <div class="simplebox decofont">
43 <mark><a href="http://home.kairo.at/">Robert Kaiser</a></mark>,
44 "KaiRo" <kairo@kairo.at>
45 <br><small>Mozilla Tech Speaker</small>
48 <div class="captionedbox">
49 <p class="captionedbox-caption decofont">Slides:
50 <a href="https://slides.kairo.at/viennajs201805/">https://slides.kairo.at/viennajs201805/</a></p>
51 <div class="captionedbox-content small">
53 <li>Created for a presentation at
54 <a href="https://viennajs.org/en/meetup/2018-05">ViennaJS Meetup May 2018</a>
56 <li>Written in HTML 5 with CSS 3 and JavaScript.</li>
57 <li>Navigation via links on all slides, via access keys
58 (e.g. "n"/Alt+Shift+N for "next") or back/forward arrow keys</li>
59 <li><a href="#toc">Contents</a></li>
60 <li><a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/"><img
61 alt="Lizenziert unter CC-BY-SA," class="ccinline" src="cc-by-sa.svg"></a>
62 04/2018 Robert Kaiser -
63 "Mozilla", "Firefox" and their logos are
64 <a href="http://www.mozilla.org/foundation/trademarks/list.html">trademarks
65 of Mozilla Foundation</a>.</li>
71 <article id="webvr" data-title="WebVR & WebXR">
72 <h1><span>WebVR & WebXR</span></h1>
74 <div class="simplebox">
75 <img src="vruser.jpg" class="slidepic"
76 alt="VR headset user">
78 <li><a href="https://webvr.info/">WebVR</a>: <mark>Virtual Reality</mark>
79 powered by Web technologies</li>
80 <li>Part of <a href="https://github.com/immersive-web/webxr">WebXR Device API</a>
81 - Mixed Reality (Virtual + Augmented Reality)</li>
82 <li><mark>Open Standard</mark> (proposal), in concert with WebGL, WebAudio
84 <li>Windows: Firefox release, Mac: Nightly/Beta, Linux: in development</li>
86 <p class="ensurepicinbox"></p>
90 <article id="vrmap" data-title="VR Map">
91 <h1><span>VR Map</span></h1>
93 <div class="simplebox">
94 <img src="vrmap-small.png" class="slidepic"
97 <li><mark>Demo</mark> for WebVR with live
98 <a href="https://www.openstreetmap.org/">OpenStreetMap</a> data</li>
99 <li>Usable in 2D mode <mark>on any modern browser</mark></li>
100 <li>Supports headset + controller where WebVR is supported</li>
101 <li>Using <a href="https://aframe.io/">Mozilla A-Frame</a> (see later)</li>
102 <li>Simple: Currently ~70 lines HTML, <mark>~400 lines JS</mark></li>
104 <p class="ensurepicinbox"></p>
108 <article id="vrmapdemo" data-title="VR Map Demo">
109 <h1><span><a href="https://vrmap.kairo.at/">vrmap.kairo.at</a></span></h1>
111 <div class="simplebox cent">
112 <a href="https://vrmap.kairo.at/" target="_blank"><img src="vrmap-large.png" class="sshot" alt="VR Map in 2D"></a>
116 <article id="code-basics" data-title="Code Basics">
117 <h1><span>Code Basics</span></h1>
119 <div class="simplebox">
120 <img src="vrusermoz.jpg" class="slidepic"
121 alt="VR Headset user with Mozilla logos">
123 <li>The world is flat (in two ways)!</li>
124 <li><mark>Ground tiles</mark> using
125 <a href="https://en.wikipedia.org/wiki/Mercator_projection">Mercator projection</a>,
126 "Mapnik" rendering from <a href="https://www.openstreetmap.org/">OSM</a>
127 via KaiRo's tile caching server</li>
128 <li><mark>Trees</mark> and <mark>buildings</mark>: live OSM data via
129 <a href="https://wiki.openstreetmap.org/wiki/Overpass_API">Overpass API</a></li>
130 <li>Camera/controller setup to support multiple devices for navigating the scene</li>
131 <li>Built with <a href="https://aframe.io/">Mozilla A-Frame</a> library</li>
133 <p class="ensurepicinbox"></p>
137 <article id="aframe" data-title="A-Frame">
138 <h1><span>A-Frame - XR Made Simple</span></h1>
140 <div class="simplebox">
141 <img src="aframe-sticker.png" class="slidepic"
142 alt="A-Frame - aframe-io">
145 <<mark>a-scene</mark>>
146 <a-sphere <small>position="0 1.25 -1" radius="1.25" color="#EF2D5E"</small>></a-sphere>
147 <<mark>a-cube</mark> <small>position="-1 0.5 1" rotation="0 0 0" …</small>>
148 <<mark>a-animation</mark> <small>attribute="rotation" … to="0 360 0"</small>></a-animation>
150 <a-cylinder <small>position="1 0.75 1" …</small>></a-cylinder>
151 <a-plane <small>…</small>></a-plane>
152 <a-sky <small>color="#ECECEC"</small>></a-sky>
155 <p><a href="https://codepen.io/mozvr/pen/jqERjQ" target="_blank">edit/view</a>
156 - More at <a href="https://aframe.io/">aframe.io</a>
157 <p class="ensurepicinbox"></p>
161 <article id="code-details" data-title="Code Details">
162 <h1><span>Code Details</span></h1>
164 <div class="simplebox">
165 <img src="vrusermoz.jpg" class="slidepic"
166 alt="VR Headset user with Mozilla logos">
168 <li><code>index.html</code>: JS includes, start dialog, scene, camera/controller rig</li>
169 <li><code>map.js</code>: variables, load handler, fetch from Overpass API</li>
170 <li><code>conversions.js</code>: coordinate conversions</li>
171 <li><code>position-limit.js</code>: A-Frame component for keeping position above ground</li>
172 <li><code>tiles.js, trees.js, buildings.js</code>: load/draw the 3 types of objects</li>
173 <li><mark><a href="https://github.com/KaiRo-at/vrmap" target="_blank">KaiRo-at/vrmap
174 at GitHub</a></mark></li>
176 <p class="ensurepicinbox"></p>
180 <article id="end" data-title="The End">
182 <div class="simplebox endslidecontainer">
183 <h1 class="cent endslidetext"><span>Questions?</span></h1>
184 <h2 class="cent endslidetext"><span><a href="https://vrmap.kairo.at/">vrmap.kairo.at</a></span></h2>
185 <h3 class="cent endslidetext"><span><a href="https://github.com/KaiRo-at/vrmap">github.com/KaiRo-at/vrmap</a></span></h3>
186 <img src="vrmap-large.png" class="sshot endslidepic" alt="VR Map in 2D">