SlideShare a Scribd company logo
WebXR, si X = com?
Indira Knight Diego González
Començant amb la Web Immersiva
WebXR, if X = how?
Indira Knight Diego González
Getting started with the Immersive Web
Indira Knight
Diego González
• Chromium Based
• Evergreen browser
The physical
And virtual
Worlds are
Merging
Source: leapmotion
Source: leapmotion
XR
On
The
Web
The
Web
On
XR
Desktop browser Mobile browser XR browser
New browsers
New workflows
New axis
https://samsunginter.net/fsf-xr
https://samsunginter.net/fsf-xr
https://samsunginter.net/fsf-xr
https://samsunginter.net/fsf-xr
Let’s
Take
A Look
WebXR specification
This specification describes support for accessing
virtual reality (VR) and augmented reality (AR)
devices, including sensors and head-mounted
displays, on the Web
WebXR specification
WebVR 1.1
WebXR
var vrDisplay;
navigator.getVRDisplays().then(function (displays) {
if (displays.length > 0) {
vrDisplay = displays[0];
}
});
navigator.xr.requestDevice().then(device => {
onXRAvailable(device);
}).catch(error => {
console.error('Unable to retrieve an XR device: ', error);
});
Web{V/X}R support
Immersive Opportunities
Discoverability
Reach
Accessible VR
Immediacy
Socialness
Progressive Enhancement
6 DoF3 DoFMagic Window
https://samsunginter.net/pixel_travel
Frameworks
A-Frame BabylonJS
Frameworks
WebGL
THREE.JS
BABYLON.JS
A-FRAME
WebXR spec
BabylonJS
var createScene = function () {
var scene = new BABYLON.Scene(engine);
var light = new BABYLON.HemisphericLight();
var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 10, BABYLON.Vector3.Zero(), scene);
camera.attachControl(canvas, false);
BABYLON.SceneLoader.Append("models/", "lapa_hi.glb", scene, function (newMeshes) {
scene.activeCamera = null;
scene.createDefaultCameraOrLight(true);
scene.activeCamera.attachControl(canvas, false);
});
return scene;
}
A-Frame
<a-scene>
<a-sky color="#33334C"></a-sky>
<a-gltf-model src="models/lapa_hi.glb" position="0 1.5 -1">
<a-animation attribute="rotation"
dur="5000"
fill="forwards"
to="0 360 0"
repeat="indefinite"></a-animation>
</a-gltf-model>
</a-scene>
A-Frame Entity component system
[ ]Position
Geometry
Material
Box
[ ]Position
Light
Color
Shadow
Light
Let’s
Dive
Into
Examples
pandapix
<a-entity a-layout="modifier:15;shape:circle" position="0 1.7 5" rotation="0 -5 0">
…
</a-entity>
https://samsunginter.net/fsf-xr
pandapix
AFRAME.registerComponent('a-layout', {
schema: {
shape:{type: 'string', default: 'circle'},
modifier:{type:'int', default:4},
items:{type:'array', default:[]}
},
init: function(){
...
},
update : function(){
...
},
setCircleLayout : function(){
...
},
setGridLayout : function(){
...
},
setSpiralLayout : function(){
...
}
});
pandapix
init: function(){
this.data.items = this.el.children;
let curComp = this.el.components['a-layout’];
//set mutationObserver to the current element
var observer = new MutationObserver(function(mutations) {
mutations.forEach(function(mutation) {
for (var i = 0; i < mutation.addedNodes.length; i++)
curComp.refreshLayout();
});
});
observer.observe(this.el, { childList: true });
document.querySelector('a-scene').addEventListener('loaded', function(){
curComp.refreshLayout();
});
}
LOVE Sculpture
https://samsunginter.net/fsf-xr
LOVE Sculpture
LOVE Sculpture
AFRAME.registerComponent("fly", {
schema: {
stepFactor: { type: "number", default: 0.005 },
isFlying: { type: "boolean", default: true }
},
tick: function () {
if (this.data.isFlying) {
let newP =
this.el.components.camera.camera.parent.position.add(this.el.components.camera.camera
.getWorldDirection().multiplyScalar(this.data.stepFactor));
this.el.setAttribute('position', newP)
}
}
});is.data.stepFactor));
}
});
LOVE Sculpture
<a-gltf-model
src="https://cdn.glitch.com/1244aa74-5494-4064-889a-
dea7bf841c8f%2Flove%20sculpture%20red.glb?1535453526033"
scale="4 4 4"
position="0 1 -4.5">
</a-gltf-model>
LOVE Sculpture
<a-assets>
<img id="union1-img" src="https://cdn.glitch.com/1244aa74-
5494-4064-889a-dea7bf841c8f%2Fmain.JPG?1536215311404">
</a-assets>
<a-image src="#union1-img" position="11.009 1.776 5.347"
rotation="0 90 0" scale="15 15 15"></a-image>
Ava
https://samsunginter.net/fsf-xr
• Based in PNG images
• Using a ‘look-at’ component
• Structures built with help of online editor
• Explain sound in different browsers
Ava
• Depending on the browser, a ‘user gesture’
is required to start playing audio.
Ava - sound
https://bit.ly/webaudio-api
Solar System
https://samsunginter.net/fsf-xr
Solar System
<a-entity id="mercury" position="0.3 0 0">
<a-animation
attribute="rotation"
dur="5000"
fill="forwards"
to="0 360 0"
repeat="indefinite"
easing="linear">
</a-animation>
<a-entity
geometry="primitive:sphere;radius:0.06"
position="3.5 0 0"
material="src:#mercury-img">
</a-entity>
</a-entity>
Solar System
<a-entity id="cameraRig" position="12.90811182621961 0.5 14.399030151885867">
<a-entity
id="player"
camera
look-controls
rotation="0 0 0">
</a-entity>
</a-entity>>
Thinking in 360
Users can look
anywhere
Where is the user able to
look?
How can the user move around the
scene?
Thinking in 360
Text can be hard to
read
Think in degrees and distance not pixels
Line length
Font weight
Distances-Independent Millimeters
Thinking in 360
Is the user a passive
participant
How will the user be able to
interact?
Good
Combinations
To
Try
-ize it
• Manifest file + Service Worker
• Icon on home screen
• Add Offline capabilities
• True mobile VR experience
{
"lang": "en",
"dir": "ltr",
"name": "pandapix",
"description": "fotos + pandes",
"short_name": "pandapix",
"icons": [ {
"src": "imgs/icon192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "imgs/icon512.png",
"sizes": "512x512",
"type": "image/png"
}],
"start_url": "./indexr.html",
"display": "standalone",
"orientation": "portrait",
"theme_color": "#3d3d3d",
"background_color": "#3d3d3d"
}
Physics System
https://samsunginter.net/word-drop/
Data
Data Arduino
var serialport = new SerialPort('/COM3', {
parser: SerialPort.parsers.readline('n')
});
serialport.on('data', function(data){
var dataArray = data.split(',');
socket.emit("data", dataArray);
});
github.com/developdata/xr-sensors
Data Arduino
socket.on("data", function(data){
if(data[2]> 7){
box.setAttribute('material', 'color', color1);
} else {
box.setAttribute('material', 'color', color2);
}
})
<a-entity
id="box"
sensor ="color1: #1B3440; color2: #F2845C;"
geometry="primitive: box"
position="1 0.5 -3"
shadow="receive: false; cast: true">
</a-entity>
github.com/developdata/xr-sensors
AFRAME.registerComponent('rotation-reader', {
init: function(){
this.difference = function (a, b) { return Math.abs(a - b); }
this.player = document.getElementById('player')
this.initialRotation = 0;
this.move = true;
},
tick: function () {
var currentRotation = this.el.getAttribute('rotation');
if(this.initialRotation !== currentRotation.y){
var temp = this.difference(this.initialRotation, currentRotation.y);
if(temp > 10){
if(!this.moving){
this.player.setAttribute("universal-controls", "movementControls: automove,keyboard");
this.moving = true;
} else {
this.player.setAttribute("universal-controls", "movementControls: keyboard");
this.moving = false;
}
}
}
this.initialRotation = currentRotation.y;
}
});
github.com/developdata/web-vr-ux-ui
Gamepad API
Gamepad API
AR
• WebARonARCore
• WebARonARKit
• Three.ar.js
• AR.js
• Aframe-AR
In
summary
WebXR, X =
• Accesible XR
• Linkability – The power of the URL
• Immediacy
• Democratic
• Bring designers and creative people to the development mix
• Explore new storytelling
• Play with depth and semantics of elements
• Progressive enhancement in a whole new dimension
• Allows you to explore and interact with data in new ways
• It´s ready now!*
What’s coming?
• WebXR specification
• Augmented Reality
• New devices
• Declarative depth?
What next?
Moltes gràcies!
@visual_stuff
@diekus
començant amb la web immersiva
@samsunginternet

More Related Content

PDF
Is HTML5 Ready? (workshop)
PDF
스위프트를 여행하는 히치하이커를 위한 스타일 안내
PDF
Letswift18 워크숍#1 스위프트 클린코드와 코드리뷰
PDF
Simulator customizing & testing for Xcode 9
TXT
">&lt;img src="x">
PDF
The Ring programming language version 1.8 book - Part 65 of 202
PDF
When Bad Things Come In Good Packages
PDF
Say It With Javascript
Is HTML5 Ready? (workshop)
스위프트를 여행하는 히치하이커를 위한 스타일 안내
Letswift18 워크숍#1 스위프트 클린코드와 코드리뷰
Simulator customizing & testing for Xcode 9
">&lt;img src="x">
The Ring programming language version 1.8 book - Part 65 of 202
When Bad Things Come In Good Packages
Say It With Javascript

What's hot (20)

PDF
Ssaw08 0624
PDF
前端MVC 豆瓣说
PPTX
A miało być tak... bez wycieków
PDF
Extreme JavaScript Performance
PDF
MongoDB全機能解説2
PDF
Epic South Disasters
PDF
Rust ⇋ JavaScript
KEY
Object-Oriented Javascript
PDF
How to build a html5 websites.v1
PDF
Letswift19-clean-architecture
PDF
Mad Max is back, plus the rest of our new reviews and notable screenings
PDF
NoSQL meets Microservices - Michael Hackstein
PPTX
What’s new in ECMAScript 6.0
PDF
WordPressでIoTをはじめよう
PDF
"let ECMAScript = 6"
PDF
Introduction to Immersive Web
PDF
Object oriented JavaScript
TXT
Vidéo approche en immobilier
Ssaw08 0624
前端MVC 豆瓣说
A miało być tak... bez wycieków
Extreme JavaScript Performance
MongoDB全機能解説2
Epic South Disasters
Rust ⇋ JavaScript
Object-Oriented Javascript
How to build a html5 websites.v1
Letswift19-clean-architecture
Mad Max is back, plus the rest of our new reviews and notable screenings
NoSQL meets Microservices - Michael Hackstein
What’s new in ECMAScript 6.0
WordPressでIoTをはじめよう
"let ECMAScript = 6"
Introduction to Immersive Web
Object oriented JavaScript
Vidéo approche en immobilier
Ad

Similar to WebXR if X = how? (20)

PDF
Writing Virtual And Augmented Reality Apps With Web Technology
PDF
Writing Virtual And Augmented Reality Apps With Web Technology
PPTX
Building AR and VR Experiences for Web Apps with JavaScript
PDF
WebXR: Introducing Mixed Reality and the Immersive Web - Peter O'Shaughnessy ...
PDF
PPTX
How to get started with arvr - DSC 2020
PDF
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
PDF
WebXR: A New Dimension For The Web Writing Virtual and Augmented Reality Apps...
PPTX
Sx sw speaker proposal slides
PPTX
Exploring web vr ️ ♀️
PDF
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
PDF
Introduction to Extended Reality - XR
PDF
Immersive Sydney - #WebXRWeek
PDF
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
PDF
WebXR and Browsers
PDF
Mobile Day - WebVR
PDF
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
PPTX
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
PDF
WebVR - MobileTechCon Berlin 2016
Writing Virtual And Augmented Reality Apps With Web Technology
Writing Virtual And Augmented Reality Apps With Web Technology
Building AR and VR Experiences for Web Apps with JavaScript
WebXR: Introducing Mixed Reality and the Immersive Web - Peter O'Shaughnessy ...
How to get started with arvr - DSC 2020
Rapid Prototyping for XR: Lecture 5 - Cross Platform Development
WebXR: A New Dimension For The Web Writing Virtual and Augmented Reality Apps...
Sx sw speaker proposal slides
Exploring web vr ️ ♀️
Bringing Virtual Reality to the Web: VR, WebGL and CSS – Together At Last!
Introduction to Extended Reality - XR
Immersive Sydney - #WebXRWeek
Rapid Prototyping for XR: Lecture 6 - AI for Prototyping and Research Directi...
WebXR and Browsers
Mobile Day - WebVR
Портируем существующее Web-приложение в виртуальную реальность / Денис Радин ...
Build (Web)VR with A-Frame (COSCUP 2019 Taipei)
WebVR - MobileTechCon Berlin 2016
Ad

More from Luis Diego González-Zúñiga, PhD (17)

PDF
PPTX
PDF
PPTX
W3C Workshop WebXR Samsung Internet Update
PPTX
PPTX
WebVR, an offspring of two worlds
PPTX
What's Coming Coming Coming
PPTX
Web and the future of VR
PPTX
Bridging Experiences with the Web
PPTX
Bridging Experiences With Web(VR)
PPTX
Progressive WebVR Apps
PPTX
PDF
Virtual Reality on the Web
W3C Workshop WebXR Samsung Internet Update
WebVR, an offspring of two worlds
What's Coming Coming Coming
Web and the future of VR
Bridging Experiences with the Web
Bridging Experiences With Web(VR)
Progressive WebVR Apps
Virtual Reality on the Web

Recently uploaded (20)

PDF
Paper PDF World Game (s) Great Redesign.pdf
PPTX
Module 1 - Cyber Law and Ethics 101.pptx
PDF
SASE Traffic Flow - ZTNA Connector-1.pdf
PDF
An introduction to the IFRS (ISSB) Stndards.pdf
PPTX
newyork.pptxirantrafgshenepalchinachinane
PPTX
E -tech empowerment technologies PowerPoint
PPTX
Introduction to Information and Communication Technology
PPTX
Digital Literacy And Online Safety on internet
PPTX
innovation process that make everything different.pptx
PDF
Unit-1 introduction to cyber security discuss about how to secure a system
PPT
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
PPTX
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
PPTX
Introduction to cybersecurity and digital nettiquette
PDF
Sims 4 Historia para lo sims 4 para jugar
PPTX
artificialintelligenceai1-copy-210604123353.pptx
PPTX
presentation_pfe-universite-molay-seltan.pptx
PPTX
Mathew Digital SEO Checklist Guidlines 2025
PDF
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
PDF
Slides PDF The World Game (s) Eco Economic Epochs.pdf
PDF
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)
Paper PDF World Game (s) Great Redesign.pdf
Module 1 - Cyber Law and Ethics 101.pptx
SASE Traffic Flow - ZTNA Connector-1.pdf
An introduction to the IFRS (ISSB) Stndards.pdf
newyork.pptxirantrafgshenepalchinachinane
E -tech empowerment technologies PowerPoint
Introduction to Information and Communication Technology
Digital Literacy And Online Safety on internet
innovation process that make everything different.pptx
Unit-1 introduction to cyber security discuss about how to secure a system
isotopes_sddsadsaadasdasdasdasdsa1213.ppt
June-4-Sermon-Powerpoint.pptx USE THIS FOR YOUR MOTIVATION
Introduction to cybersecurity and digital nettiquette
Sims 4 Historia para lo sims 4 para jugar
artificialintelligenceai1-copy-210604123353.pptx
presentation_pfe-universite-molay-seltan.pptx
Mathew Digital SEO Checklist Guidlines 2025
Vigrab.top – Online Tool for Downloading and Converting Social Media Videos a...
Slides PDF The World Game (s) Eco Economic Epochs.pdf
Smart Home Technology for Health Monitoring (www.kiu.ac.ug)

WebXR if X = how?