of Things to XR using Free Libre Open Source Software Philippe Coval Samsung Open Source Group / SRUK mailto:[email protected] The 21st international Exhibition and Conference https://is.gd/webxr #LavalVirtual2019, Laval, France <2019-03-20>
Philippe Coval • Software engineer for Samsung OSG – Belongs to SRUK team, based in Rennes, France – Interest: Web of Things with “Privacy by Design” • Not an XR expert but past 3D experiences*: – Studied 3D at University (Toulouse, 2000), more VR/AR at INRIA, Orange – Diet3D, OpenGL, VRML/EAI, ARToolkitPlus… • In 2019 at FOSDEM, met famous XR expert Fabien Benetou: – And we hacked WoTxR PoC: bridge between WoT+XR (check @MozHacks) • Ping me online: https://social.samsunginter.net/@rzr
of Web (of Things) • IoT.js an alternative runtime inspired by Node.js: – Powered by JerryScript engine designed for micro-controllers – Base features: IO (I2C, GPIO...), Network (HTTP/S, MQTT, WS) … • Modules: mastodon-lite, generic-sensors-lite – Supporting: RT, GNU/Linux ... • WebThings can be build using webthing-iotjs module: – Standalone HTTP servers exposing Mozilla Things API: • RESTful architecture: read, update operations – Can be connected to MozIoT “PrivacyByDesign” gateway – Or queried from the browser in SVG, HTML or 3D !
Not new idea: – VRML97 plugins controlled by Java applets (EAI, RMI...) • But a successful evolution: – HTML5, WebGL, Three.js, WebVR, OpenVR, WebXR, OpenXR... • A-Frame: Free and Libre opensource framework – Originally from Mozilla, HTML for VR, Uses Web components – Support: VR headsets, GearVR, GearVR2017 (with controller) • Using most workbrowsers: SamungInternet (svrbrowser), Firefox or chromium based... • Exokit: Native VR/AR/XR engine for JavaScript (WebGL)
Update with your webthing IP in LAN : eg: http://localhost:8888 • const url = "https://samsunginternet-color-sensor-js.glitch.me"; const name = "color"; • const el = document.getElementById(name); // The light bulb’s sphere fetch(url) .then(function(response) { return response.json(); }) .then(function(json) { el.setAttribute(name, json[name]); }); • // Challenge: use PUT to update properties of actuators’ Updating device property to his 3D twin
worlds on the web of thing • Build more webthings using your favorite language • Install Mozilla gateway in your home network • Connect your webthings to gateway – Control them using the progressive web app • Try the alternate Progressive Web App to browse them in XR: – http://github.com/samsunginternet/webthings-webapp • More to come: – https://github.com/rzr/webthing-iotjs/wiki/XR
Web: Lessons from the past • Several attempts before WebGL (2011) • Y2K: Java applets ? – Software rendering • No OpenGL • Just Triangles, Lines or pixels: performance impact – Portable? • Applet plugins weren’t opensource first – Until, gcj, OpenJDK • All failed in integration into browsers – Bad performance – Security policies ? • Same “death” as shockwave/adobe flash • In 2019 we can assume that JS won
• VRML97 and VRML2 – Various VRML plugins – Scene graph – Descriptive script (like PoV-ray) – OpenGL support • HW acceleration – Most were closed sources • Except openvrml – Superseded by Web3D (XML) • Still Java applets for – Manipulating scene graph – Javascript eventually