Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CodeFest 2019. Luis Diego Gonzalez Zuniga (Samsung) — Immersed in the Web

CodeFest
April 05, 2019

CodeFest 2019. Luis Diego Gonzalez Zuniga (Samsung) — Immersed in the Web

On this presentation we will explore the upcoming WebXR specification in order to understand the changes that it will bring to web development. We will try to understand its purpose and code an example to see how it behaves in different platforms, taking progressive enhancement to a whole new dimension, literally!

CodeFest

April 05, 2019
Tweet

More Decks by CodeFest

Other Decks in Technology

Transcript

  1. Hardware opaque transparent video passthrough Head Mounted Displays (HMDs) /

    XR devices *HoloLens illustration by Willy Roda from the Noun Project
  2. rift / rift S go/gear vr quest PC SDK “easily

    port to Oculus Quest” when docs launch mobile SDK Android NDK C, C++ C#, Boo C++ C++ C#, Boo C++ *And this is for 1 family of devices
  3. Distribution pre-approved closed environment wait several minutes download 100s of

    MBs experience you discard after 1 use open accessible ecosystem multi-device, multi-platform, progressive enhanced experiences
  4. open accessible ecosystem fast frictionless cross- device progressive accessible immediate

    social democratic WebXR This specification describes support for accessing virtual reality (VR) and augmented reality (AR) devices, including sensors and head-mounted displays, on the Web.
  5. WebXR navigator.xr • Entry point to the API • Query

    XR features • Initiates communication with XR hardware • Has a list of XR devices • Including an active one
  6. 1. Check if the type of session we want is

    supported enum XRSessionMode { "inline", "immersive-vr", "immersive-ar" }; 2. Advertise this to the user 3. Wait for user activation event 4. Request an XRSession 5. If it succeeds, run Frame loop WebXR How to
  7. • Poll device pose • Query info about the environment

    • Present imagery to user WebXR - XRSession How to
  8. Who’s using it? Dance Tonite LCD SoundSystem / Google A-Painter

    Mozilla Renault Kadjar Little Workshop Dr. Who Time Travel BBC / goodboy
  9. Immersed in the Web Gamepad API Web Bluetooth, WebRTC Progressive

    Web Apps Web Audio APIs WebAuthn Web Payments and many more! WebGL
  10. Immersed in the Web JavaScript 69.8% Most commonly used programming

    languages* “close alignment in the technology choices of professional developer and the developer population overall”* HTML 68.5% CSS 65.1% SQL 57.0% Java 45.3%
  11. + • Component: • Loads engine scripts • Sets up

    the 3D environment • Loads the 3D model • Listening for changes • BabylonJS • Everything happens in createScene • You can easily add VR to the scene Bit.ly/3dmodels-website
  12. + • A-Frame: • Declarative way of doing VR •

    PWA: • Offline VR experience • Remove browser chrome • No barriers to the experience
  13. Limitations • Performance is still a bit lower than native

    XR • Resolution is a bit lower than native XR • AR is still experimental • Specification is under development • Size of assets on mobile connections might be too big
  14. What’s next? • AR on WebXR • 5G for better,

    faster experiences • New devices with growing capabilities • Declarative Depth? CSS 3D?