Turn off the Ad Banner  

To print: Select File and then Print from your browser's menu.

    -----------------------------------------------
This story was printed from CdrInfo.com,
located at http://www.cdrinfo.com.
-----------------------------------------------

Appeared on: Wednesday, April 19, 2017
React VR Library Lets Developers Create VR Experiences By Using Javascript

Facebook is releasing React VR, a new library that lets developers build experiences for VR by using standard web tools.

Those experiences can then be distributed across the web - React VR leverages APIs like WebGL and WebVR to connect headsets with a scene in a web page. And to maximize your potential audience, sites built in React VR are also accessible on mobile phones and PCs, using accelerometers or the cursor for navigation.

With React VR, you can use React components to compose scenes in 3D, combining 360 panoramas with 2D UI, text, and images. You can immerse the user with audio and video capabilities, plus take full advantage of the space around you with 3D models. The entire codebase is available on GitHub.

Facebook says that anyone familiar with React can easily get started without needing to learn new concepts.

How it works

When building a framework for VR on the web, one challenge Facebook had to address is that a person in a headset needs to be able to look around the world at 60 frames per second (fps), or 90 fps on Rift. In a single-threaded environment like JavaScript, that means Facebook needed to ensure that any React reconciliation or scene updates would happen within the span of a single frame.

As it turns out, React Native already addresses similar problems with its architecture. Facebook followed RN's pattern by running React and rendering in separate contexts, with an asynchronous bridge for communication between them. In the web browser, this separation is performed with a web worker - your entire React application runs in the worker, while the rendering code that turns scene update messages into actual pixels lives in the main window. This lets the renderer create a tight loop between receiving headset orientation updates and re-rendering the scene, increasing viewer immersion while decreasing the likelihood of motion sickness.



Home | News | All News | Reviews | Articles | Guides | Download | Expert Area | Forum | Site Info
Site best viewed at 1024x768+ - CDRINFO.COM 1998-2024 - All rights reserved -
Privacy policy - Contact Us .