小程序游戏SDK如何推动游戏开发的快速创新与变革
839
2022-10-30
React VR - 实现使用React创建强大VR应用的框架
React VR is a framework for the creation of VR applications that run in your web browser. It pairs modern APIs like WebGL and WebVR with the declarative power of React, producing experiences that can be consumed through a variety of devices. Leveraging web technologies and the existing React ecosystem, React VR aims to simplify the construction of 360 experiences and democratize the creation of VR content. If you're familiar with React, you can now build in VR – learn once, write anywhere.
Getting Started
We've designed the React VR developer experience to get your first project up and running in only a few minutes. Before installing the developer tools, you'll need to make sure that you have two prerequisites installed:
Node.js version 6.0.0 or higheryarn or npm (>= v3.0.0) package managers
Next, install the React VR CLI – a command-line tool that generates the basic layout of new projects.
npm install -g react-vr-cli
Or
yarn global add react-vr-cli
You'll only need to install this CLI once. It will alert you when it's out of date, and provide instruction on how to update it.
Once installed, the CLI can be used to create a new project by running
react-vr init PROJECT_NAME
where PROJECT_NAME is the name of your new application. Once it's been created and the dependencies are installed, change your working directory to PROJECT_NAME, and start the application server by running npm start (or yarn start).
When the server has booted, you can access your application by navigating to http://localhost:8081/vr/ in your web browser. Your application's code can be found in index.vr.js, and you can learn more about available framework features by diving into our documentation.
Will My Web Browser Support My VR Headset?
The WebVR spec is currently in development, and it will be some time before browsers like Chrome, Firefox, and Edge begin supporting it in stable releases. Recent experimental browsers, and some versions of Chrome for Android, have begun to support the spec. You can follow the tables at https://webvr.rocks to track support for WebVR.
Getting Help
Please use these community resources for getting help. We use the GitHub issues for tracking bugs and feature requests and have limited bandwidth to address them.
Ask a question on StackOverflow and tag it with react-vrChat with fellow developers on Reactiflux in #react-vrIf it turns out that you may have found a bug, please open an issue
Opening Issues
If you encounter a bug with React VR, let us know. Search the existing issues and try to make sure your problem doesn't already exist before opening a new issue. It's helpful if you include the version of React VR, Browser, and OS you're using. Please include a stack trace and reduced repro case where appropriate.
React VR is open source software, and we welcome contribution from the wider community. If you are able to fix your bug, or find a way to fix another existing issue, we encourage you to submit a PR to address it.
Contributing
For more information about contributing to React VR, see our Contributor Guidelines.
License
React VR is BSD licensed. We also provide an additional patent grant.
React documentation is Creative Commons licensed.
Examples provided in this repository and in the documentation are separately licensed.
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~