Example React Native project with Viro and echo3D integrated.
Don't have an API key? Make sure to register for FREE at echo3D.
- Clone this repository.
- Go to the root of the directory.
- Run
npm install
.
- Add the 3D model to the console.
- Set the API key in the
App.js script
inside. - Build and run the AR application
- For Android, make sure you have downloaded the Android SDK and platform-tools for building apps.
- Set the environment variable $ANDROID_HOME and added platform-tools to $PATH variable.
In Linux/Mac:
export ANDROID_HOME=/YOUR_PATH_TO/Android/sdk
export PATH=$ANDROID_HOME/platform-tools:$PATH
export PATH=$ANDROID_HOME/tools:$PATH
In Widows:
Right-click the Computer icon and choose Properties, or in Windows Control Panel, choose System. Choose Advanced system settings. On the Advanced tab, click Environment Variables. Click New to create a new environment variable. Click Edit to modify an existing environment variable. After creating or modifying the environment variable, click Apply and then OK to have the change take effect.
- Build and launch android app by executing the following from the root of the project
react-native run-android --variant=gvrDebug
- Open ViroSample.xcworkspace under the
ios/
directory in Xcode. Select the right "Team" forViroSample
andViroSampleTest
target underGeneral -> Signing
- Hit play to build and launch the app on your iOS device.
Refer to our documentation to learn more about how to use React Native and echo3D.
Refer to Viro's documentation to learn more about how to use Viro. WARNING: the Viro library is now open-sourced and no longer maintained by Viro Media.
Feel free to reach out at support@echo3D.co or join our support channel on Slack.