支持平台:Android、ARCore、Google Daydream、Samsung GearVR、Google Cardboard VR
该存储库包含渲染源代码以及 ViroCore 平台。两者都可以免费使用,没有分发限制。
ViroCore 下载可在我们的发布页面上获得。
您可以使用最新稳定版本的 ViroCore 启动并运行!为此,只需:
[hidecontent type="logged" desc="隐藏内容:登录后可查看"]
git clone https://github.com/viromedia/virocore.git
。您还可以尝试包含前沿功能和修复的最新主线版本。请记住,主线构建可能不如发布构建稳定。为此,只需:
对于 ViroCore Android,HelloWorld 示例应在 viro_core/virocore-release -version位置具有相应的文件。因此,只需从上面的工作流中下载 virocore.aar 工件,然后重命名(确保它与您的代码示例的名称匹配)并替换 HelloWorld 项目中的 virocore-release-v_x_xx_x.aar 文件
如果您想直接修改/更改渲染器。这些是构建渲染器和 ViroCore 平台的说明。
git clone https://github.com/viromedia/virocore.git
。$ cd android
$ ./gradlew :virocore:assembleRelease
virocore-*.aar
在以下位置看到了一个文件(* 表示版本号)android/virocore/build/outputs/aar/virocore-*.aar
android/app
要运行 ViroCore 测试,请在 Android Studio 中打开 android 项目并releasetest
在您的 android 设备上运行 target。virocore-*.aar
请将 aar 文件复制到viro_core/
您的项目中并修改您的viro_core/build.gradle
文件以指向新文件。git clone https://github.com/viromedia/virocore.git
。https://github.com/viromedia/viro.git
$ cd android
$ ./gradlew :viroreact:assembleRelease
viroreact-release.aar
在/viroreact/build/outputs/aar/viroreact-release.aar
.viro/android/viro_renderer/viro_renderer-release.aar
此外,请确认您在上面的步骤 #3 中克隆的 viro 存储库中看到了一个新文件。viro repo中概述的构建说明将引导您完成使用此构建的渲染器构建 react-viro 桥所涉及的步骤。确保您已完成 android 部分中提到的步骤 1 - 3。
执行以下命令从Podfile
.
cd ios
pod install
在 Xcode 中打开ViroRenderer.xcworkspace
。构建方案ViroKit
,构建配置设置为Release
,目标设置为Generic iOS Device
。 笔记:
3.a If you want the ability to run on Simulator,
change target to any of the `iOS Simulator` targets instead of `Generic iOS Device`.
3.b If in your own app project setup, you prefer to include react-viro as a static library
rather than relying on `use_frameworks!` - build scheme `ViroKit_static_lib`
instead of `ViroKit` as mentioned above in step #3.
如果上面的 Xcode 构建成功,您应该会看到一堆新文件被复制到viro/ios/dist/
您之前克隆的 viro 存储库的文件夹中。viro repo中概述的构建说明将引导您完成使用此构建的渲染器构建 react-viro 桥所涉及的步骤。
[/hidecontent]