国产xxxx99真实实拍_久久不雅视频_高清韩国a级特黄毛片_嗯老师别我我受不了了小说

資訊專欄INFORMATION COLUMN

使用REACT VR構建web虛擬現實

anquan / 2447人閱讀

Building virtual reality experiences on the web with React VR

Over the past year, virtual reality has made major strides toward becoming the next computing platform. With Oculus Rift, consumer-grade hardware has reached the point where people can immerse themselves in virtual worlds from their own home. Alongside that, 360 content has blossomed with the introduction of numerous consumer-level cameras and Facebook"s support of 360 photos and videos. However, for developers who have pioneered the way we experience the web, there"s no direct path to building 360 content without knowledge of game engines and 3D graphics. Those who do take on the challenges of creating interactive 360 applications may find themselves with limited audiences, since VR headsets aren"t yet widely distributed. We want to change that.

Today, we"re releasing React VR, a new library that lets developers everywhere build compelling experiences for VR. 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. Those experiences can then be distributed across the web — React VR leverages APIs like WebGL and WebVR to connect immersive 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. If you know React, you now know how to build 360 and VR content! The entire codebase is available on GitHub. Get started with your first project by diving into our documentation.

Learn once, write anywhere

When we set out to build a framework for VR content on the web, we quickly agreed that React was a great starting point. React"s style of representing elements abstractly, independent of their actual implementation, is ideal for any hierarchical layout, and it"s already proven its flexibility with the React Native platform. Additionally, it means that anyone familiar with React can easily get started without needing to learn new concepts. If you"re comfortable laying out an application with React and understand how React manages data flow, you should have no problem developing in 3D. React VR continues to drive the mantra of the React ecosystem: Learn once, write anywhere.

Building upon React also means that the libraries and tools built by the broader React community are available for your use in React VR. Your favorite data management, routing, and navigation libraries will work out of the box. You can leverage existing testing frameworks and development tools as well — there"s no need to change your existing development workflow.

Under the hood

When building a framework for VR on the web, one challenge we 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 we 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. We 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.

In fact, more than just borrowing concepts from React Native, React VR is actually built as a true RN platform. This lets us reuse code and systems in some places, while extending other areas to make sense in both a browser and 3D space. If you"ve used React Native before, many things will be familiar to you, like the use of View and Text components, as well as the packaging server that keeps your compiled bundle updated with your latest changes.

Open source

We"ve 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 recognize and target the needs of everyone.

We hope that with React VR in your toolbox, you"ll help make 2017 the best year yet for compelling VR content. Whether you"re working on your first application or want to contribute to the framework itself, our documentation and GitHub repository are the best places to start. We look forward to seeing you in virtual reality!

文章版權歸作者所有,未經允許請勿轉載,若此文章存在違規行為,您可以聯系管理員刪除。

轉載請注明本文地址:http://m.specialneedsforspecialkids.com/yun/82584.html

相關文章

  • 前端每周清單第 10 期:Firefox53、React VR發布、Microsoft Edge現代

    摘要:新聞熱點國內國外,前端最新動態發布近日,正式發布新版本中提供了一系列的特性與問題修復。而近日正式發布,其能夠幫助開發者快速構建應用。 前端每周清單第 10 期:Firefox53、React VR發布、JS測試技術概述、Microsoft Edge現代DOM樹構建及性能之道 為InfoQ中文站特供稿件,首發地址為這里;如需轉載,請與InfoQ中文站聯系。從屬于筆者的 Web 前端入門...

    MingjunYang 評論0 收藏0
  • React VR 快速入門完全教程

    摘要:快速入門什么是是一個開放源代碼的庫,為呈現的數據提供了視圖渲染。最后,項目根組件應該通過來進行注冊,以便能夠進行打包和正常運行?;舅枷胧卿秩疽粋€立方體,并將觀眾置于中心,隨后移動。表示從指定方向平均照亮所有物體的光源。 React VR 快速入門 什么是React React是一個開放源代碼的JavaScript庫,為HTML呈現的數據提供了視圖渲染。React視圖通常使用指定的像H...

    andot 評論0 收藏0
  • 前端每周清單半年盤點之 ReactReactNative 篇

    摘要:前端每周清單半年盤點之與篇前端每周清單專注前端領域內容,以對外文資料的搜集為主,幫助開發者了解一周前端熱點分為新聞熱點開發教程工程實踐深度閱讀開源項目巔峰人生等欄目。與求同存異近日,宣布將的構建工具由遷移到,引發了很多開發者的討論。 前端每周清單半年盤點之 React 與 ReactNative 篇 前端每周清單專注前端領域內容,以對外文資料的搜集為主,幫助開發者了解一周前端熱點;分為...

    Barry_Ng 評論0 收藏0
  • 2019,開發者應該學習的16個JavaScript框架

    摘要:它不僅從前端移動到后端,我們也開始看到它用于機器學習和增強現實,簡稱。由于其高使用率,年的現狀調查將其稱為采用的安全技術。機器學習框架在年的開發者峰會上,宣布了他們的機器學習框架的實現,稱為。更高級別的用于在之上構建機器學習模型。 2019,開發者應該學習的16個JavaScript框架 showImg(https://segmentfault.com/img/remote/14600...

    Harpsichord1207 評論0 收藏0
  • 前端清單第 27 期:React Patent License 回復,Shopify WebVR

    摘要:新聞熱點國內國外,前端最新動態就開源許可證風波進行回復數周前,基金會決定禁止旗下項目使用,因為其在標準的許可證之外添加了專利聲明此舉引發了社區的廣泛討論,希望能夠更新其開源許可證。 showImg(https://segmentfault.com/img/remote/1460000010777089); 前端每周清單第 27 期:React Patent License 回復,Sho...

    jeffrey_up 評論0 收藏0

發表評論

0條評論

anquan

|高級講師

TA的文章

閱讀更多
最新活動
閱讀需要支付1元查看
<