dom2aframe: putting the web back in webvr › files › ic3d-robinmarx... · 2017-12-06 ·...

35
DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort, Peter Quax, Wim Lamotte https://webvr.edm.uhasselt.be

Upload: others

Post on 24-Jun-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

DOM2AFrame: Putting the Web back in WebVRRobin Marx, Sander Vanhove, Wouter Vanmontfort, Peter Quax, Wim Lamotte

https://webvr.edm.uhasselt.be

Page 2: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 3: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 4: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 5: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

no direct controlno immersion

Page 6: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

no direct controlno immersion

Page 7: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

<canvas>

Page 8: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

no direct controlno immersion

no HTML/CSS

Page 9: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

no HTML/CSS

use HTML/CSSfull control

VR-specific functionality

no direct controlno immersion

Page 10: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

5X

Page 11: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 12: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 13: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

<foreignObject>

Workaround 1

- rasterizeHTML- HTML2Three

<canvas> 2D API

Workaround 2

- HTML2canvas- HTML-GL

Page 14: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

<foreignObject>

- rasterizeHTML- HTML2Three

<canvas> 2D API

- HTML2canvas- HTML-GL

Page 15: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

<svg height="100" width="100"><circle cx="50" cy="50" r="40" fill="red" />

<foreignObject>

<!–- insert your HTML/CSS here -->

</foreignObject></svg>

Page 16: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Browser Workaround 1

Page 17: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Rewrite the browser’s paint logic

Page 18: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Layout Style+CSS =

Page 19: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Layout Style+CSS =

Query with JavaScript canvas.fillRect(…)

Page 20: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Browser Workaround 2

Page 21: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

WebElement 2D Texture 3D Quad

3.63 FPS

2.63 FPS

Chrome 59, Intel I7 7700k, 16GB RAM, Nvidia GTX 1070

Page 22: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

<foreignObject>

- rasterizeHTML- HTML2Three

<canvas> 2D API

- HTML2canvas- HTML-GLWeb-GL

DOM2AFrame

Page 23: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Layout Style+CSS =

Query with JavaScript gl_FragColor = Vec4(…)

Page 24: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

B(r)owser Our contribution

Page 25: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

WebElement 2D Texture 3D Quad

WebElement 3D Mesh

Input

Animation

Chrome 59, Intel I7 7700k, 16GB RAM, Nvidia GTX 1070

55.2 FPS

Page 26: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Mozilla A-Frame

https://aframe.io/

HTML

A-Frame

Page 27: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 28: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 29: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 30: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 31: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 32: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

DOM2AFrame

HTML/CSS/JS 3D

Usable visual fidelity and performance

Not production ready…

= About bringing the Web into VR

Page 33: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,
Page 34: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,

Image sources

https://nimsony.itch.io/walkomotion-smb

http://mashable.com/2016/02/29/mark-zuckerberg-vr-army-response/

https://pixabay.com/en/internet-global-earth-communication-1181586/

https://www.davrous.com/wp-content/uploads/2017/07/Capture005.jpg

https://pre00.deviantart.net/ad21/th/pre/f/2016/051/2/7/wario_real_by_zacmariozero-d9sgus9.png

http://lapis.wikia.com/wiki/File:Waluigi.png

http://demo.spyropress.com/themeforest/bullet/

https://i.pinimg.com/736x/71/0a/a3/710aa307b530d1935c6fb593b84a91c3--funny-things-funny-stuff.jpg

https://i.pinimg.com/originals/e7/91/16/e79116016e107838483ab372f32cc965.png

http://www.instructables.com/id/Minecraft-2d-Mario/

https://vignette1.wikia.nocookie.net/fantendo/images/c/cf/Bowser-mario-kart-wii.jpg/revision/latest

https://vignette2.wikia.nocookie.net/mariokart/images/6/66/Mario-kart-7-artwork-luigi-glider.jpg/revision/latest

http://www.bankingtech.com/files/2013/02/snail-racing1.jpg

https://vignette.wikia.nocookie.net/dragons/images/6/67/Koopa.jpg/revision/latest?cb=20170916172417

http://www.edgeoftheworld.cz/images/ie9_fonts_comparison_big.png

https://www.fastcompany.com/3050016/unraveling-the-enigma-of-nintendos-virtual-boy-20-years-later

https://www.mariowiki.com/Goal_Pole

https://webvr.edm.uhasselt.be

Page 35: DOM2AFrame: Putting the Web back in WebVR › files › IC3D-RobinMarx... · 2017-12-06 · DOM2AFrame: Putting the Web back in WebVR Robin Marx, Sander Vanhove, Wouter Vanmontfort,