Facebook builds JavaScript framework to bring VR to mainstream

0
7310
Facebook

 

Facebook has expanded its liking for JavaScript by launching React VR. The new open source framework is based on React, a JavaScript library that has been powering sites like Facebook and Instagram, and is designed to uplift the ongoing virtual reality (VR) developments.

As briefly demonstrated at the Facebook F8 conference in San Jose, React VR allows developers to build new 360-degree experiences for VR using the existing React components. The library has the capabilities to compose 3D scenes by combining panoramas with 2D UI, text and images. Furthermore, all this can be done through the same code styling that was previously used for developing React-powered websites.

“Expanding on the declarative programming style of React and React Native, React VR lets anyone with an understanding of JavaScript rapidly build and deploy VR experiences using standard web tools,” Facebook’s software engineer Andrew Imm says in a blog post.

Apart from enabling easy-building of VR experiences, React VR helps you distribute them directly to the Web using APIs like WebGL and WebVR. Facebook has also provided support for accessing the Web content through React VR right on mobile devices and PCs.

Why React behind the library

Facebook used its React Native as the base for designing the latest development. The old adoption helped the social networking giant to address experience-related issues. “We followed React Native’s pattern by running React and rendering in separate contexts, with an asynchronous bridge for communication between them,” the engineer wrote.

Having said that, the adoption of React gives you a familiar VR development experience. You can use the same libraries and tools that you were previously using on a React project. Similarly, the packaging server that was allowing you to update your compiled bundle with the latest changes works just in line with React developments.

Open source icing on top

In addition to adopting React engine, Facebook has opted for open source to bring speedy success for its React VR.

“We have seen firsthand how much React and React Native have benefited from being open source, and we believe that developing a project hand-in-hand with the community lets us better recognise and target the needs of everyone,” Facebook considers.

You can access the React VR code from a GitHub repository. Documentation has also been prepared by Facebook to ease the future VR developments.

LEAVE A REPLY

Please enter your comment!
Please enter your name here