point to working video
[slides.git] / viennajs201805 / index.html
1 <!DOCTYPE html>
2 <html>
3 <head>
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">
12 </head>
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>
17 </header>
18 <nav id="slidenav">
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>&lt; back</a>
22   <span id="nav-prev-nolink" class="nolink">&lt; back</span> |
23   <a href="#" id="nav-next" id="goNext" accesskey="n" hidden>fwd &gt;</a>
24   <span id="nav-next-nolink" class="nolink">fwd &gt;</span>
25 </nav>
26
27 <article id="toc" data-title="Inhalt">
28 <h1><span>Table of Contents</span></h1>
29 <h2>VR Map - OpenStreetMap goes WebVR</h2>
30
31 <div class="captionedbox">
32 <p class="captionedbox-caption">The following slides are available in this presentation:</p>
33 <div class="captionedbox-content">
34 <ul id="toc-list">
35 </ul>
36 </article>
37
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>
41
42 <div class="simplebox decofont">
43 <mark><a href="http://home.kairo.at/">Robert Kaiser</a></mark>,
44 "KaiRo" &lt;kairo@kairo.at&gt;
45 <br><small>Mozilla Tech Speaker</small>
46 </div>
47
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">
52 <ul class="small">
53   <li>Created for a presentation at
54     <a href="https://viennajs.org/en/meetup/2018-05">ViennaJS Meetup May 2018</a>
55     in Wien/Vienna.</li>
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>
66 </ul>
67 </div>
68 </div>
69 </article>
70
71 <article id="webvr" data-title="WebVR &amp; WebXR">
72 <h1><span>WebVR &amp; WebXR</span></h1>
73
74 <div class="simplebox">
75 <img src="vruser.jpg" class="slidepic"
76  alt="VR headset user">
77 <ul>
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
83     and Gamepad APIs</li>
84   <li>Windows: Firefox release, Mac: Nightly/Beta, Linux: in development</li>
85 </ul>
86 <p class="ensurepicinbox"></p>
87 </div>
88 </article>
89
90 <article id="vrmap" data-title="VR Map">
91 <h1><span>VR Map</span></h1>
92
93 <div class="simplebox">
94 <img src="vrmap-small.png" class="slidepic"
95  alt="VR Map in 2D">
96 <ul>
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>
103 </ul>
104 <p class="ensurepicinbox"></p>
105 </div>
106 </article>
107
108 <article id="vrmapdemo" data-title="VR Map Demo">
109 <h1><span><a href="https://vrmap.kairo.at/">vrmap.kairo.at</a></span></h1>
110
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>
113 </div>
114 </article>
115
116 <article id="code-basics" data-title="Code Basics">
117 <h1><span>Code Basics</span></h1>
118
119 <div class="simplebox">
120 <img src="vrusermoz.jpg" class="slidepic"
121  alt="VR Headset user with Mozilla logos">
122 <ul>
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>
132 </ul>
133 <p class="ensurepicinbox"></p>
134 </div>
135 </article>
136
137 <article id="aframe" data-title="A-Frame">
138 <h1><span>A-Frame - XR Made Simple</span></h1>
139
140 <div class="simplebox">
141 <img src="aframe-sticker.png" class="slidepic"
142  alt="A-Frame - aframe-io">
143 Example:
144 <pre>
145 &lt;<mark>a-scene</mark>&gt;
146   &lt;a-sphere <small>position="0 1.25 -1" radius="1.25" color="#EF2D5E"</small>&gt;&lt;/a-sphere&gt;
147   &lt;<mark>a-cube</mark> <small>position="-1 0.5 1" rotation="0 0 0" …</small>&gt;
148     &lt;<mark>a-animation</mark> <small>attribute="rotation" … to="0 360 0"</small>&gt;&lt;/a-animation&gt;
149   &lt;/a-cube&gt;
150   &lt;a-cylinder <small>position="1 0.75 1" …</small>&gt;&lt;/a-cylinder&gt;
151   &lt;a-plane <small>…</small>&gt;&lt;/a-plane&gt;
152   &lt;a-sky <small>color="#ECECEC"</small>&gt;&lt;/a-sky&gt;
153 &lt;/a-scene&gt;
154 </pre>
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>
158 </div>
159 </article>
160
161 <article id="code-details" data-title="Code Details">
162 <h1><span>Code Details</span></h1>
163
164 <div class="simplebox">
165 <img src="vrusermoz.jpg" class="slidepic"
166  alt="VR Headset user with Mozilla logos">
167 <ul>
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>
175 </ul>
176 <p class="ensurepicinbox"></p>
177 </div>
178 </article>
179
180 <article id="end" data-title="The End">
181
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">
187 </div>
188 </article>
189
190 </body>
191 </html>