SlideShare a Scribd company logo
UP AND RUNNING 
WITH WEBVR 
TONY PARISI 
DECEMBER, 2014
WEBVR 
FAST, CHEAP, AND TOTALLY 
DEMOCRATIZED. 
 BROWSER-BASED VIRTUAL 
REALITY 
 RENDERED IN WEBGL 
 HEAD-TRACKING AND 
FULLSCREEN VR 
SUPPORT NOW IN 
BROWSER DEV BUILDS!!! 
(SOON IN NIGHTLY 
CHANNEL!!!) 
 NO BIG APP DOWNLOADS 
AND INSTALLS!!! 
http://www.tonyparisi.com 12/4/2014 
 JUST ADD SMART PHONE 
 “SMARTVR” USING 
GOOGLE CARDBOARD 
$25 CHEAP!
AN EXAMPLE 
http://www.tonyparisi.com 12/4/2014 
MOZVR SHOWCASE 
http://mozvr.com/ 
POWERED BY FIREFOX BUILT WITH VIZI 
https://github.com/tparisi/Vizi
THE WEBVR API 
1. QUERY FOR VR DEVICE(S) TO RENDER 
// polyfill 
var getVRDevices = navigator.mozGetVRDevices /* FF */ || 
navigator.getVRDevices; /* webkit */ 
http://www.tonyparisi.com 12/4/2014 
var self = this; 
getVRDevices().then( gotVRDevices ); 
function gotVRDevices( devices ) { 
var vrHMD; 
var error; 
for ( var i = 0; i < devices.length; ++i ) { 
if ( devices[i] instanceof HMDVRDevice ) { 
vrHMD = devices[i]; 
self._vrHMD = vrHMD; 
self.leftEyeTranslation = vrHMD.getEyeTranslation( "left" ); 
self.rightEyeTranslation = vrHMD.getEyeTranslation( "right" ); 
self.leftEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "left" ); 
self.rightEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "right" ); 
break; // We keep the first we encounter 
} 
} 
} 
get left/right eye 
(camera) positions 
get per-eye camera field of view; use 
WebGL to render scene from two 
cameras
THE WEBVR API 
2. GO FULLSCREEN (VR MODE) 
fullscreen mode requires a DOM 
element 
http://www.tonyparisi.com 12/4/2014 
var self = this; 
var renderer = this._renderer; 
var vrHMD = this._vrHMD; 
var canvas = renderer.domElement; 
var fullScreenChange = 
canvas.mozRequestFullScreen? 'mozfullscreenchange' : 'webkitfullscreenchange'; 
document.addEventListener( fullScreenChange, onFullScreenChanged, false ); 
function onFullScreenChanged() { 
if ( !document.mozFullScreenElement 
&& !document.webkitFullScreenElement ) { 
self.setFullScreen( false ); 
} 
} 
if ( canvas.mozRequestFullScreen ) { 
canvas.mozRequestFullScreen( { vrDisplay: vrHMD } ); 
} else { 
canvas.webkitRequestFullscreen( { vrDisplay: vrHMD } ); 
} 
handle exiting fullscreen 
mode 
request fullscreen mode 
for this VR device
THE WEBVR API 
3. HEAD TRACKING 
query HMD device state 
http://www.tonyparisi.com 12/4/2014 
// polyfill 
var getVRDevices = navigator.mozGetVRDevices /* FF */ || 
navigator.getVRDevices; /* webkit */ 
var self = this; 
getVRDevices().then( gotVRDevices ); 
function gotVRDevices( devices ) { 
var vrInput; 
var error; 
for ( var i = 0; i < devices.length; ++i ) { 
if ( devices[i] instanceof PositionSensorVRDevice ) { 
vrInput = devices[i] 
self._vrInput = vrInput; 
break; // We keep the first we encounter 
} 
} 
} 
… 
// called once per tick from requestAnimationFrame() 
var update = function() { 
var vrState = this.getVRState(); 
if ( !vrState ) { 
return; 
} 
// vrState.hmd.rotation contains four floats, quaternion x,y,z,w 
setCameraRotation(vrState.hmd.rotation); 
}; 
get head-tracking VR 
device 
update camera to match HMD 
device orientation
WEBVR AND CARDBOARD 
 GOOGLE CARDBOARD SHOWCASE 
 Mobile Chrome http://g.co/chromevr 
 Desktop Chrome http://vr.chromeexperiments.com/ 
 EVEN EASIER THAN OCULUS! 
 RENDER WEBGL SIDE-BY-SIDE STEREO (NO NEED TO QUERY DEVICES) 
 USE EXISTING BROWSER FULLSCREEN MODE 
 USE BROWSER DEVICE ORIENTATION API FOR HEAD TRACKING 
http://www.tonyparisi.com 12/4/2014
WEBVR AND THREE.JS 
 THE MOST POPULAR WEBGL LIBRARY 
 http://threejs.org/ 
 LATEST STABLE VERSION (r68) INCLUDES STEREO 
RENDERING AND HEAD TRACKING 
 RENDERING 
examples/js/effects/StereoEffect.js (Cardboard) 
examples/js/effects/VREffect.js (Rift) 
 HEAD TRACKING 
examples/js/controls/DeviceOrientationControls.js (Cardboard) 
examples/js/controls/VRControls.js (Rift) 
http://www.tonyparisi.com 12/4/2014
LET’S BUILD SOMETHING 
http://www.tonyparisi.com 12/4/2014 
https://github.com/tparisi/WebVR
OPEN TOOLS 
FOR CROSS-PLATFORM VR 
http://www.tonyparisi.com 12/4/2014 
game engines/IDEs 
Goo Enginehttp://www.gootechnologies.com/ 
Verold http://verold.com/ 
Turbulenz https://turbulenz.com/ 
PlayCanvas http://www.playcanvas.com/ 
Artillery Engine 
https://artillery.com/ 
Sketchfab https://sketchfab.com/ 
Unreal https://www.unrealengine.com/ 
Unity http://unity3d.com/#unity-5 
scene graph libraries/page frameworks 
Three.js 
http://threejs.org/ 
SceneJS 
http://scenejs.org/ 
BabylonJS 
http://www.babylonjs.com/ 
Vizi 
https://github.com/tparisi/Vizi 
Voodoo.js 
http://www.voodoojs.com/ 
PhiloGL 
http://www.senchalabs.org/philogl/ 
tQuery 
http://jeromeetienne.github.io/tquery/
PRO TOOLS FOR WEB VR 
Unreal 4 in WebGL 
https://developer.mozilla.org/en-US/demos/detail/unreal-engine-4-strategy-game 
60FPS 
http://www.tonyparisi.com 12/4/2014 
 EMSCRIPTEN - THE COOLEST 
HACK EVER! 
https://github.com/kripken/emscripten 
 CROSS-COMPILE C++ 
NATIVE CODE TO 
JAVASCRIPT 
 asm.js- LOW-LEVEL 
OPTIMIZED JAVASCRIPT 
 UNITY, UNREAL ENGINES 
USE THIS TO DEPLOY ON 
THE WEB 
 WATCH OUT: HUGE 
DOWNLOADS AND HARD TO 
DEBUG…. ! 
Unreal native C++ engine -> JavaScript 
Emscripten + asm.js
VR + ML 
A MARKUP LANGUAGE FOR THE METAVERSE? 
http://www.tonyparisi.com 12/4/2014 
 GLAM (GL AND MARKUP) - A 
DECLARATIVE LANGUAGE FOR 3D 
WEB CONTENT 
https://github.com/tparisi/glam/ 
 DEFINE 3D SCENE CONTENT IN 
MARKUP; STYLE IT IN CSS 
THE MARKUP 
<glam> 
<renderer type="rift"></renderer> 
<scene> 
<controller type="rift"></controller> 
<background id="sb1" class="skybox"> 
</background> 
<group y ='1' z='-3'> 
<sphere class="bubble skybox”> 
</sphere> 
<sphere class="bubble skybox”> 
</sphere> 
</group> 
… 
THE CSS 
<style> 
.skybox { 
envmap-right:url(../images/Park2/posx.jpg); 
… 
} 
.bubble { 
radius:.5; 
shader-vertex:url(../shaders/fresnel.vs); 
shader-fragment:url(../shaders/fresnel.fs); 
shader-uniforms:mRefractionRatio f 1.02 
mFresnelBias f 0.1 mFresnelPower f 2.0 mFresnelScale 
f 1.0 tCube t null; 
} 
#sb1 { 
background-type:box; 
} 
</style> 
Or check out SceneVR from Ben Nolan 
http://twitter.com/scenevr/
CHALLENGES 
 WEBVR ON OCULUS IS NOT READY FOR PRIME TIME 
 (THAT’S OK NEITHER IS OCULUS!) 
 LATENCY IS THE BIGGEST ISSUE – BROWSER NEEDS TO UN-THROTTLE 
AT 60FPS (IT’S IN THE WORKS…) 
 DEVICE DRIVERS AND DISPLAY MODES SUUUUUUCK 
#tellmesomethingidontkow 
 BUT WE’RE GOOD TO GO ON CARDBOARD! 
 60FPS WORKS GREAT 
 NEARLY 2 BILLION VR DEVICES ALREADY DEPLOYED! 
 FRAMEWORKS AND TOOLS ARE TYPICALLY WEB-ISH: UNDER 
DEVELOPMENT, ALWAYS IN FLUX, PRETTY MUCH OUT OF CONTROL 
 BUT OPEN SOURCE SO WE CAN LIVE WITH IT 
http://www.tonyparisi.com 12/4/2014
LINKS 
 BROWSER DEV BUILDS 
Firefox http://blog.bitops.com/blog/2014/08/20/updated-firefox-vr-builds/ 
Chrome https://drive.google.com/folderview?id=0BzudLt22BqGRbW9WTHMtOWMzNjQ 
 MOZILLA VR SHOWCASE 
http://mozvr.com/ 
 WEBVR MAILING LIST 
web-vr-discuss@mozilla.org 
 CARDBOARD VR SHOWCASE 
http://vr.chromeexperiments.com/ 
http://www.tonyparisi.com 12/4/2014
KEEP IN TOUCH 
CREDS 
Co-creator, VRML and X3D 
http://www.tonyparisi.com 12/4/2014 
CONTACT 
tony@vizi.gl 
skype: auradeluxe 
http://twitter.com/auradeluxe 
http://www.tonyparisi.com/ 
http://www.learningwebgl.com/ 
GET VIZI 
https://github.com/tparisi/Vizi 
GET THE BOOKS! 
WebGL: Up and Running 
http://www.amazon.com/dp/144932357X 
Programming 3D Applications with HTML and WebGL 
http://www.amazon.com/Programming-Applications-HTML5-WebGL-Visualization/ 
dp/1449362966 
MEETUPS 
http://www.meetup.com/WebGL-Developers-Meetup/ 
http://www.meetup.com/Web-VR/ 
BOOK CODE 
https://github.com/tparisi/WebGLBook 
https://github.com/tparisi/Programming3DApplications 
GET GLAM 
http://www.glamjs.org/ 
https://github.com/tparisi/glam/ 
WORK 
http://www.vizi.gl/
UP AND RUNNING 
WITH WEBVR 
TONY PARISI 
DECEMBER, 2014

More Related Content

What's hot

Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSockets
Ben Limmer
 
Fixup and autosquash
Fixup and autosquashFixup and autosquash
Fixup and autosquash
Shawn Sorichetti
 
Creating Responsive Experiences
Creating Responsive ExperiencesCreating Responsive Experiences
Creating Responsive Experiences
Tim Kadlec
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
Martin Scharm
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
Steven Beeckman
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web DesignChristopher Schmitt
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopter
Laurent Eschenauer
 
Puppeteer can automate that! - Frontmania
Puppeteer can automate that! - FrontmaniaPuppeteer can automate that! - Frontmania
Puppeteer can automate that! - Frontmania
Önder Ceylan
 
Nginx Workshop Aftermath
Nginx Workshop AftermathNginx Workshop Aftermath
Nginx Workshop Aftermath
Denis Zhdanov
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and Javascript
Laurent Eschenauer
 
Coffeescript: An Opinionated Introduction
Coffeescript: An Opinionated IntroductionCoffeescript: An Opinionated Introduction
Coffeescript: An Opinionated Introduction
Joe Fleming
 
Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020
Önder Ceylan
 
Sage 2 19_v5_busby
Sage 2 19_v5_busbySage 2 19_v5_busby
Sage 2 19_v5_busby
Ben Busby
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
bocribbz
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.js
Fred Chien
 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti Patterns
Ben Hall
 

What's hot (16)

Building Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSocketsBuilding Realtime Apps with Ember.js and WebSockets
Building Realtime Apps with Ember.js and WebSockets
 
Fixup and autosquash
Fixup and autosquashFixup and autosquash
Fixup and autosquash
 
Creating Responsive Experiences
Creating Responsive ExperiencesCreating Responsive Experiences
Creating Responsive Experiences
 
Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
node.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.ionode.js and the AR.Drone: building a real-time dashboard using socket.io
node.js and the AR.Drone: building a real-time dashboard using socket.io
 
[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design[refreshpitt] Adaptive Images in Responsive Web Design
[refreshpitt] Adaptive Images in Responsive Web Design
 
Advanced programming with #nodecopter
Advanced programming with #nodecopterAdvanced programming with #nodecopter
Advanced programming with #nodecopter
 
Puppeteer can automate that! - Frontmania
Puppeteer can automate that! - FrontmaniaPuppeteer can automate that! - Frontmania
Puppeteer can automate that! - Frontmania
 
Nginx Workshop Aftermath
Nginx Workshop AftermathNginx Workshop Aftermath
Nginx Workshop Aftermath
 
Drones, Flying robots and Javascript
Drones, Flying robots and JavascriptDrones, Flying robots and Javascript
Drones, Flying robots and Javascript
 
Coffeescript: An Opinionated Introduction
Coffeescript: An Opinionated IntroductionCoffeescript: An Opinionated Introduction
Coffeescript: An Opinionated Introduction
 
Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020Puppeteer can automate that! - HolyJS Piter 2020
Puppeteer can automate that! - HolyJS Piter 2020
 
Sage 2 19_v5_busby
Sage 2 19_v5_busbySage 2 19_v5_busby
Sage 2 19_v5_busby
 
Vagrant - Version control your dev environment
Vagrant - Version control your dev environmentVagrant - Version control your dev environment
Vagrant - Version control your dev environment
 
Let s Enjoy Node.js
Let s Enjoy Node.jsLet s Enjoy Node.js
Let s Enjoy Node.js
 
Node.js Anti Patterns
Node.js Anti PatternsNode.js Anti Patterns
Node.js Anti Patterns
 

Viewers also liked

Cantrep
CantrepCantrep
Revisiting the Family Bond: wirelessly attached.
Revisiting the Family Bond: wirelessly attached.Revisiting the Family Bond: wirelessly attached.
Revisiting the Family Bond: wirelessly attached.
emilykingdom
 
Mlwsc5
Mlwsc5Mlwsc5
Mlwsc5
Yu Ukai
 
Kompanihuset
KompanihusetKompanihuset
Kompanihusetfalster5
 
Proyecto U.D. experimentales
Proyecto U.D. experimentalesProyecto U.D. experimentales
Proyecto U.D. experimentales
José María García de Prado
 
BillingViews Direct-to-Bill Mobile Payment Survey Details
BillingViews Direct-to-Bill Mobile Payment Survey DetailsBillingViews Direct-to-Bill Mobile Payment Survey Details
BillingViews Direct-to-Bill Mobile Payment Survey Details
BillingViews
 
Stirling Henry 2010 Brochure
Stirling Henry 2010 BrochureStirling Henry 2010 Brochure
Stirling Henry 2010 Brochuretim_denney
 
Viz Populi
Viz PopuliViz Populi
Viz Populi
Tony Parisi
 
BillingViews Payments Puzzle
BillingViews Payments PuzzleBillingViews Payments Puzzle
BillingViews Payments Puzzle
BillingViews
 
Rodrigo arenas betancur
Rodrigo  arenas betancurRodrigo  arenas betancur
Rodrigo arenas betancurCaro Spin
 
Print Work
Print WorkPrint Work
Print Work
Cody Walker
 
Albrecht Durer
Albrecht DurerAlbrecht Durer
Albrecht Durer
Andres Gallo
 
Stortorget.
Stortorget.Stortorget.
Stortorget.falster5
 
6MP103 Metrostav
6MP103 Metrostav6MP103 Metrostav
6MP103 Metrostavxxxxj
 
Nature`s echo brand-contract manufacturing proposal
Nature`s echo brand-contract manufacturing proposalNature`s echo brand-contract manufacturing proposal
Nature`s echo brand-contract manufacturing proposal
Dr. Hani Malkawi
 
Decisions in communication
Decisions in communicationDecisions in communication
Decisions in communicationTalinChirinian
 

Viewers also liked (20)

Cantrep
CantrepCantrep
Cantrep
 
Revisiting the Family Bond: wirelessly attached.
Revisiting the Family Bond: wirelessly attached.Revisiting the Family Bond: wirelessly attached.
Revisiting the Family Bond: wirelessly attached.
 
Anjni-Catalogue
Anjni-CatalogueAnjni-Catalogue
Anjni-Catalogue
 
Mlwsc5
Mlwsc5Mlwsc5
Mlwsc5
 
Kompanihuset
KompanihusetKompanihuset
Kompanihuset
 
Proyecto U.D. experimentales
Proyecto U.D. experimentalesProyecto U.D. experimentales
Proyecto U.D. experimentales
 
BillingViews Direct-to-Bill Mobile Payment Survey Details
BillingViews Direct-to-Bill Mobile Payment Survey DetailsBillingViews Direct-to-Bill Mobile Payment Survey Details
BillingViews Direct-to-Bill Mobile Payment Survey Details
 
Digital Marketing Campaign
Digital Marketing CampaignDigital Marketing Campaign
Digital Marketing Campaign
 
Stirling Henry 2010 Brochure
Stirling Henry 2010 BrochureStirling Henry 2010 Brochure
Stirling Henry 2010 Brochure
 
Viz Populi
Viz PopuliViz Populi
Viz Populi
 
BillingViews Payments Puzzle
BillingViews Payments PuzzleBillingViews Payments Puzzle
BillingViews Payments Puzzle
 
Rodrigo arenas betancur
Rodrigo  arenas betancurRodrigo  arenas betancur
Rodrigo arenas betancur
 
X22686506
X22686506X22686506
X22686506
 
Print Work
Print WorkPrint Work
Print Work
 
Albrecht Durer
Albrecht DurerAlbrecht Durer
Albrecht Durer
 
Stortorget.
Stortorget.Stortorget.
Stortorget.
 
6MP103 Metrostav
6MP103 Metrostav6MP103 Metrostav
6MP103 Metrostav
 
Nature`s echo brand-contract manufacturing proposal
Nature`s echo brand-contract manufacturing proposalNature`s echo brand-contract manufacturing proposal
Nature`s echo brand-contract manufacturing proposal
 
Cloud computing
Cloud computingCloud computing
Cloud computing
 
Decisions in communication
Decisions in communicationDecisions in communication
Decisions in communication
 

Similar to Up And Running With Web VR Fall 2014

Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5
Tony Parisi
 
VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015
Tony Parisi
 
Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015
Tony Parisi
 
WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next Generation
Tony Parisi
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
Tony Parisi
 
Tools that help and speed up RWD dev
Tools that help  and speed up RWD devTools that help  and speed up RWD dev
Tools that help and speed up RWD dev
Matjaž Korošec
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
markuskobler
 
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was WonWebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
Tony Parisi
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Matt Raible
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive Web
Tony Parisi
 
Transforming WebSockets
Transforming WebSocketsTransforming WebSockets
Transforming WebSockets
Arnout Kazemier
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
Michaela Lehr
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
GeilDanke
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
Carsten Sandtner
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksmwbrooks
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVR
Janne Aukia
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NET
Jonas Follesø
 
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
Codemotion
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive Web
Tony Parisi
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-web
Christian Heilmann
 

Similar to Up And Running With Web VR Fall 2014 (20)

Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5Hacking Reality: Browser-Based VR with HTML5
Hacking Reality: Browser-Based VR with HTML5
 
VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015VR Without Borders RIVER WebVR April 2015
VR Without Borders RIVER WebVR April 2015
 
Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015Browser-Based Virtual Reality April 2015
Browser-Based Virtual Reality April 2015
 
WebGL: The Next Generation
WebGL:  The Next GenerationWebGL:  The Next Generation
WebGL: The Next Generation
 
Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016Introduction to WebVR Autodesk Forge 2016
Introduction to WebVR Autodesk Forge 2016
 
Tools that help and speed up RWD dev
Tools that help  and speed up RWD devTools that help  and speed up RWD dev
Tools that help and speed up RWD dev
 
Get Ahead with HTML5 on Moible
Get Ahead with HTML5 on MoibleGet Ahead with HTML5 on Moible
Get Ahead with HTML5 on Moible
 
WebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was WonWebGL, HTML5 and How the Mobile Web Was Won
WebGL, HTML5 and How the Mobile Web Was Won
 
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
Comparing Hot JavaScript Frameworks: AngularJS, Ember.js and React.js - Sprin...
 
WebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive WebWebVR: Developing for the Immersive Web
WebVR: Developing for the Immersive Web
 
Transforming WebSockets
Transforming WebSocketsTransforming WebSockets
Transforming WebSockets
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
 
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web TechnologyWriting Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
 
WebVR - JAX 2016
WebVR -  JAX 2016WebVR -  JAX 2016
WebVR - JAX 2016
 
BlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorksBlackBerry DevCon 2011 - PhoneGap and WebWorks
BlackBerry DevCon 2011 - PhoneGap and WebWorks
 
Quick dive into WebVR
Quick dive into WebVRQuick dive into WebVR
Quick dive into WebVR
 
Cross platform mobile apps using .NET
Cross platform mobile apps using .NETCross platform mobile apps using .NET
Cross platform mobile apps using .NET
 
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
Mixed Realities for Web - Carsten Sandtner - Codemotion Amsterdam 2018
 
Foundations of the Immersive Web
Foundations of the Immersive WebFoundations of the Immersive Web
Foundations of the Immersive Web
 
Firefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-webFirefox OS - HTML5 for a truly world-wide-web
Firefox OS - HTML5 for a truly world-wide-web
 

More from Tony Parisi

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine Arts
Tony Parisi
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented World
Tony Parisi
 
Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17
Tony Parisi
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API Update
Tony Parisi
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive Web
Tony Parisi
 
Virtually Anyone
Virtually AnyoneVirtually Anyone
Virtually Anyone
Tony Parisi
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR Development
Tony Parisi
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back Again
Tony Parisi
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution War
Tony Parisi
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015
Tony Parisi
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015
Tony Parisi
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014
Tony Parisi
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the Metaverse
Tony Parisi
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?
Tony Parisi
 
WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!
Tony Parisi
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually Anywhere
Tony Parisi
 
The Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game DevelopmentThe Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game Development
Tony Parisi
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGL
Tony Parisi
 
WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO Time
Tony Parisi
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013
Tony Parisi
 

More from Tony Parisi (20)

The New Fine Arts
The New Fine ArtsThe New Fine Arts
The New Fine Arts
 
Face the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented WorldFace the Future: Computing in an Augmented World
Face the Future: Computing in an Augmented World
 
Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17Powering the VR/AR Ecosystem 2017-01-17
Powering the VR/AR Ecosystem 2017-01-17
 
WebVR Ecosystem and API Update
WebVR Ecosystem and API UpdateWebVR Ecosystem and API Update
WebVR Ecosystem and API Update
 
The Immersive Web
The Immersive WebThe Immersive Web
The Immersive Web
 
Virtually Anyone
Virtually AnyoneVirtually Anyone
Virtually Anyone
 
React-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR DevelopmentReact-VR: An Early Experiment with React and WebGL for VR Development
React-VR: An Early Experiment with React and WebGL for VR Development
 
Vrml, or There and Back Again
Vrml, or There and Back AgainVrml, or There and Back Again
Vrml, or There and Back Again
 
The Coming Distribution War
The Coming Distribution WarThe Coming Distribution War
The Coming Distribution War
 
glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015glTF and the WebGL Art Pipeline March 2015
glTF and the WebGL Art Pipeline March 2015
 
An Introduction to Web VR January 2015
An Introduction to Web VR January 2015An Introduction to Web VR January 2015
An Introduction to Web VR January 2015
 
The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014The Web Eats Everything In Its Path Fall 2014
The Web Eats Everything In Its Path Fall 2014
 
WebGL, WebVR and the Metaverse
WebGL, WebVR and the MetaverseWebGL, WebVR and the Metaverse
WebGL, WebVR and the Metaverse
 
And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?And Who Shall Control the Metaverse?
And Who Shall Control the Metaverse?
 
WebGL Primetime!
WebGL Primetime!WebGL Primetime!
WebGL Primetime!
 
Virtually Anywhere
Virtually AnywhereVirtually Anywhere
Virtually Anywhere
 
The Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game DevelopmentThe Browser As Console - HTML5 and WebGL for Game Development
The Browser As Console - HTML5 and WebGL for Game Development
 
Developing Web Graphics with WebGL
Developing Web Graphics with WebGLDeveloping Web Graphics with WebGL
Developing Web Graphics with WebGL
 
WebGL - It's GO Time
WebGL - It's GO TimeWebGL - It's GO Time
WebGL - It's GO Time
 
glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013glTF Update with Tony Parisi WebGL Meetup August 2013
glTF Update with Tony Parisi WebGL Meetup August 2013
 

Recently uploaded

НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
QADay
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
Newntide latest company Introduction.pdf
Newntide latest company Introduction.pdfNewntide latest company Introduction.pdf
Newntide latest company Introduction.pdf
LucyLuo36
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
Securing your Kubernetes cluster: a step-by-step guide to success!
Securing your Kubernetes cluster: a step-by-step guide to success!Securing your Kubernetes cluster: a step-by-step guide to success!
Securing your Kubernetes cluster: a step-by-step guide to success!
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
Fwdays
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Breaking the Ruby Performance Barrier with YJIT
Breaking the Ruby Performance Barrier with YJITBreaking the Ruby Performance Barrier with YJIT
Breaking the Ruby Performance Barrier with YJIT
maximechevalierboisv1
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 

Recently uploaded (20)

НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»НАДІЯ ФЕДЮШКО БАЦ  «Професійне зростання QA спеціаліста»
НАДІЯ ФЕДЮШКО БАЦ «Професійне зростання QA спеціаліста»
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
Newntide latest company Introduction.pdf
Newntide latest company Introduction.pdfNewntide latest company Introduction.pdf
Newntide latest company Introduction.pdf
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
Securing your Kubernetes cluster: a step-by-step guide to success!
Securing your Kubernetes cluster: a step-by-step guide to success!Securing your Kubernetes cluster: a step-by-step guide to success!
Securing your Kubernetes cluster: a step-by-step guide to success!
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi"Impact of front-end architecture on development cost", Viktor Turskyi
"Impact of front-end architecture on development cost", Viktor Turskyi
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Breaking the Ruby Performance Barrier with YJIT
Breaking the Ruby Performance Barrier with YJITBreaking the Ruby Performance Barrier with YJIT
Breaking the Ruby Performance Barrier with YJIT
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 

Up And Running With Web VR Fall 2014

  • 1. UP AND RUNNING WITH WEBVR TONY PARISI DECEMBER, 2014
  • 2. WEBVR FAST, CHEAP, AND TOTALLY DEMOCRATIZED.  BROWSER-BASED VIRTUAL REALITY  RENDERED IN WEBGL  HEAD-TRACKING AND FULLSCREEN VR SUPPORT NOW IN BROWSER DEV BUILDS!!! (SOON IN NIGHTLY CHANNEL!!!)  NO BIG APP DOWNLOADS AND INSTALLS!!! http://www.tonyparisi.com 12/4/2014  JUST ADD SMART PHONE  “SMARTVR” USING GOOGLE CARDBOARD $25 CHEAP!
  • 3. AN EXAMPLE http://www.tonyparisi.com 12/4/2014 MOZVR SHOWCASE http://mozvr.com/ POWERED BY FIREFOX BUILT WITH VIZI https://github.com/tparisi/Vizi
  • 4. THE WEBVR API 1. QUERY FOR VR DEVICE(S) TO RENDER // polyfill var getVRDevices = navigator.mozGetVRDevices /* FF */ || navigator.getVRDevices; /* webkit */ http://www.tonyparisi.com 12/4/2014 var self = this; getVRDevices().then( gotVRDevices ); function gotVRDevices( devices ) { var vrHMD; var error; for ( var i = 0; i < devices.length; ++i ) { if ( devices[i] instanceof HMDVRDevice ) { vrHMD = devices[i]; self._vrHMD = vrHMD; self.leftEyeTranslation = vrHMD.getEyeTranslation( "left" ); self.rightEyeTranslation = vrHMD.getEyeTranslation( "right" ); self.leftEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "left" ); self.rightEyeFOV = vrHMD.getRecommendedEyeFieldOfView( "right" ); break; // We keep the first we encounter } } } get left/right eye (camera) positions get per-eye camera field of view; use WebGL to render scene from two cameras
  • 5. THE WEBVR API 2. GO FULLSCREEN (VR MODE) fullscreen mode requires a DOM element http://www.tonyparisi.com 12/4/2014 var self = this; var renderer = this._renderer; var vrHMD = this._vrHMD; var canvas = renderer.domElement; var fullScreenChange = canvas.mozRequestFullScreen? 'mozfullscreenchange' : 'webkitfullscreenchange'; document.addEventListener( fullScreenChange, onFullScreenChanged, false ); function onFullScreenChanged() { if ( !document.mozFullScreenElement && !document.webkitFullScreenElement ) { self.setFullScreen( false ); } } if ( canvas.mozRequestFullScreen ) { canvas.mozRequestFullScreen( { vrDisplay: vrHMD } ); } else { canvas.webkitRequestFullscreen( { vrDisplay: vrHMD } ); } handle exiting fullscreen mode request fullscreen mode for this VR device
  • 6. THE WEBVR API 3. HEAD TRACKING query HMD device state http://www.tonyparisi.com 12/4/2014 // polyfill var getVRDevices = navigator.mozGetVRDevices /* FF */ || navigator.getVRDevices; /* webkit */ var self = this; getVRDevices().then( gotVRDevices ); function gotVRDevices( devices ) { var vrInput; var error; for ( var i = 0; i < devices.length; ++i ) { if ( devices[i] instanceof PositionSensorVRDevice ) { vrInput = devices[i] self._vrInput = vrInput; break; // We keep the first we encounter } } } … // called once per tick from requestAnimationFrame() var update = function() { var vrState = this.getVRState(); if ( !vrState ) { return; } // vrState.hmd.rotation contains four floats, quaternion x,y,z,w setCameraRotation(vrState.hmd.rotation); }; get head-tracking VR device update camera to match HMD device orientation
  • 7. WEBVR AND CARDBOARD  GOOGLE CARDBOARD SHOWCASE  Mobile Chrome http://g.co/chromevr  Desktop Chrome http://vr.chromeexperiments.com/  EVEN EASIER THAN OCULUS!  RENDER WEBGL SIDE-BY-SIDE STEREO (NO NEED TO QUERY DEVICES)  USE EXISTING BROWSER FULLSCREEN MODE  USE BROWSER DEVICE ORIENTATION API FOR HEAD TRACKING http://www.tonyparisi.com 12/4/2014
  • 8. WEBVR AND THREE.JS  THE MOST POPULAR WEBGL LIBRARY  http://threejs.org/  LATEST STABLE VERSION (r68) INCLUDES STEREO RENDERING AND HEAD TRACKING  RENDERING examples/js/effects/StereoEffect.js (Cardboard) examples/js/effects/VREffect.js (Rift)  HEAD TRACKING examples/js/controls/DeviceOrientationControls.js (Cardboard) examples/js/controls/VRControls.js (Rift) http://www.tonyparisi.com 12/4/2014
  • 9. LET’S BUILD SOMETHING http://www.tonyparisi.com 12/4/2014 https://github.com/tparisi/WebVR
  • 10. OPEN TOOLS FOR CROSS-PLATFORM VR http://www.tonyparisi.com 12/4/2014 game engines/IDEs Goo Enginehttp://www.gootechnologies.com/ Verold http://verold.com/ Turbulenz https://turbulenz.com/ PlayCanvas http://www.playcanvas.com/ Artillery Engine https://artillery.com/ Sketchfab https://sketchfab.com/ Unreal https://www.unrealengine.com/ Unity http://unity3d.com/#unity-5 scene graph libraries/page frameworks Three.js http://threejs.org/ SceneJS http://scenejs.org/ BabylonJS http://www.babylonjs.com/ Vizi https://github.com/tparisi/Vizi Voodoo.js http://www.voodoojs.com/ PhiloGL http://www.senchalabs.org/philogl/ tQuery http://jeromeetienne.github.io/tquery/
  • 11. PRO TOOLS FOR WEB VR Unreal 4 in WebGL https://developer.mozilla.org/en-US/demos/detail/unreal-engine-4-strategy-game 60FPS http://www.tonyparisi.com 12/4/2014  EMSCRIPTEN - THE COOLEST HACK EVER! https://github.com/kripken/emscripten  CROSS-COMPILE C++ NATIVE CODE TO JAVASCRIPT  asm.js- LOW-LEVEL OPTIMIZED JAVASCRIPT  UNITY, UNREAL ENGINES USE THIS TO DEPLOY ON THE WEB  WATCH OUT: HUGE DOWNLOADS AND HARD TO DEBUG…. ! Unreal native C++ engine -> JavaScript Emscripten + asm.js
  • 12. VR + ML A MARKUP LANGUAGE FOR THE METAVERSE? http://www.tonyparisi.com 12/4/2014  GLAM (GL AND MARKUP) - A DECLARATIVE LANGUAGE FOR 3D WEB CONTENT https://github.com/tparisi/glam/  DEFINE 3D SCENE CONTENT IN MARKUP; STYLE IT IN CSS THE MARKUP <glam> <renderer type="rift"></renderer> <scene> <controller type="rift"></controller> <background id="sb1" class="skybox"> </background> <group y ='1' z='-3'> <sphere class="bubble skybox”> </sphere> <sphere class="bubble skybox”> </sphere> </group> … THE CSS <style> .skybox { envmap-right:url(../images/Park2/posx.jpg); … } .bubble { radius:.5; shader-vertex:url(../shaders/fresnel.vs); shader-fragment:url(../shaders/fresnel.fs); shader-uniforms:mRefractionRatio f 1.02 mFresnelBias f 0.1 mFresnelPower f 2.0 mFresnelScale f 1.0 tCube t null; } #sb1 { background-type:box; } </style> Or check out SceneVR from Ben Nolan http://twitter.com/scenevr/
  • 13. CHALLENGES  WEBVR ON OCULUS IS NOT READY FOR PRIME TIME  (THAT’S OK NEITHER IS OCULUS!)  LATENCY IS THE BIGGEST ISSUE – BROWSER NEEDS TO UN-THROTTLE AT 60FPS (IT’S IN THE WORKS…)  DEVICE DRIVERS AND DISPLAY MODES SUUUUUUCK #tellmesomethingidontkow  BUT WE’RE GOOD TO GO ON CARDBOARD!  60FPS WORKS GREAT  NEARLY 2 BILLION VR DEVICES ALREADY DEPLOYED!  FRAMEWORKS AND TOOLS ARE TYPICALLY WEB-ISH: UNDER DEVELOPMENT, ALWAYS IN FLUX, PRETTY MUCH OUT OF CONTROL  BUT OPEN SOURCE SO WE CAN LIVE WITH IT http://www.tonyparisi.com 12/4/2014
  • 14. LINKS  BROWSER DEV BUILDS Firefox http://blog.bitops.com/blog/2014/08/20/updated-firefox-vr-builds/ Chrome https://drive.google.com/folderview?id=0BzudLt22BqGRbW9WTHMtOWMzNjQ  MOZILLA VR SHOWCASE http://mozvr.com/  WEBVR MAILING LIST web-vr-discuss@mozilla.org  CARDBOARD VR SHOWCASE http://vr.chromeexperiments.com/ http://www.tonyparisi.com 12/4/2014
  • 15. KEEP IN TOUCH CREDS Co-creator, VRML and X3D http://www.tonyparisi.com 12/4/2014 CONTACT tony@vizi.gl skype: auradeluxe http://twitter.com/auradeluxe http://www.tonyparisi.com/ http://www.learningwebgl.com/ GET VIZI https://github.com/tparisi/Vizi GET THE BOOKS! WebGL: Up and Running http://www.amazon.com/dp/144932357X Programming 3D Applications with HTML and WebGL http://www.amazon.com/Programming-Applications-HTML5-WebGL-Visualization/ dp/1449362966 MEETUPS http://www.meetup.com/WebGL-Developers-Meetup/ http://www.meetup.com/Web-VR/ BOOK CODE https://github.com/tparisi/WebGLBook https://github.com/tparisi/Programming3DApplications GET GLAM http://www.glamjs.org/ https://github.com/tparisi/glam/ WORK http://www.vizi.gl/
  • 16. UP AND RUNNING WITH WEBVR TONY PARISI DECEMBER, 2014