- make sure you have this repository and the SXR SDK in a sibling directory
git clone https://github.com/sxrsdk/sxrsdk.git -b release_v5.0
git clone https://github.com/sxrsdk/sxrsdk-demos.git -b release_v5.0
There are two options:
- Clone the 5.0 branch:
git clone -b release_v5.0 [email protected]:sxrsdk/sxrsdk-demos.git
- Download a zip archive: open https://github.com/sxrsdk/sxrsdk-demos/tree/release_v5.0 and then select "Download ZIP"
- download the Oculus_Mobile_SDK and put the SDK folder at the same directory level as your SXR directory.
#edit to use your PATH or make a env variable reference for wherever you unzipped the SDK
export OVR_MOBILE_SDK=~/mytools/ovr_sdk_mobile_1.0.4
-
make sure you have gradle in your PATH (you can check that your PATH is setup correctly and verify your gradle version by running:
gradle -v
if you get a response, great! if not, these instructions may help -
set up the Oculus device signature for your device (it will look like oculussig_xxxxxxxx where xxxxxxxx is the id you get when you run
adb devices
) and copy it into an assets folder each project'ssrc/main/assets
directory:
cp ~/Downloads/oculussig_xxxxxxxx ./sxr-cubemap/sxrcubemap/src/main/assets/oculussig_xxxxxxxx
- change to the example you wish to build and invoke the included gradle wrapper file,
./gradlew
cd sxr-sample
./gradlew assembleDebug
- you should now have an apk that you can push to an android device
adb install -r ./app/build/outputs/apk/app-debug.apk
NOTE: some of these examples use the application name instead of app
to hold the apk build directory for instance, in sxr-cubemap, you will find the apk in ./sxr-cubemap/sxrcubemap/build/outputs/apk/app-debug.apk
cd sxr-cubemap
./gradlew assembleDebug
adb install -r ./sxrcubemap/build/outputs/apk/app-debug.apk
- if you want to run without loading into a headset, enable Samsung VR Service developer mode:
- go to Settings > Applications > manage applications > Gear VR Service > Manage Storage
- press the VR Service Version 6 times
- if you get a message 'You are a developer' you should see a toggle to enable developer mode
- if you get a message 'You are not a developer' you probably haven't installed a valid apk with your oculus signature - run the
adb install -r ./sxrcubemap/build/outputs/apk/app-debug.apk
command on at least one project, then the service should discover you
A minimal sample showing how to display an equirectangular (360) photo.
A minimal sample showing how to display an equirectangular (360) video using either Android's MediaPlayer class or the ExoPlayer class.
A simplified version of the sxr-3dcursor sample that shows how to use the 3DCursor plugin.
Shows how to use the 3DCursor plugin.
Shows how to use SXR's accessibility classes. For example: InvertedColors, TextToSpeech, and Zoom.
Simple sample showing how to use SXR with the Physics plugin.
Simple sample showing how to use the camera2 api along with renderscript for use with the passthrough camera.
Simple example of Spatial Audio using GoogleVR's audio library (previously used cardboard's audio library).
A simple sample which can contain as many Stanford bunnies as we want to make it complex
A nice demo that shows input from both the gamepad and touchpad to control a character.
A simple example to show how to load in a cubemap and use it for the background as well as a reflection on an object.
An example showing how to display Android Views inside VR and route events to those views.
A simple picking example.
A minimal example showing how to receive input from a gamepad.
A larger sample that shows a concept of an immersive virtual museum. Uses many features of SXR: picking, TextViews, Video, input, etc.
A minimal example showing how an application can be written with Javascript.
A sample that shows how to create a virtual keyboard, including voice input, and use it in a simple trivia game.
A minimal example showing how an application can be written with Lua.
A simple sample that loads in an animated model and starts the animation.
A viewer that allows you to select and display models stored in /sdcard/SXRModelViewer2/. You can look at the model from different angles, change lighting, look at it in wireframe, and toggle animations. Uses the libGDX plugin for UI.
A simple sample showing how to use multiple lights.
A sample showing how to use multiple render passes with the same geometry to show an outline.
A sample showing how to draw lines.
The remote scripting sample enables the debug server and sets up a text object with the ipaddress of the phone so we know where to telnet into.
Inflates and displays some Android views onto a rotating cube.
Shows how create the various scene object types: quad, cube, sphere, cylinder, cone, passthrough camera, text, video. Tap the touchpad to cycle through the objects.
A sample that shows a light source with shadowing.
A simple sample that creates a quad and applies a texture to it.
A sample that shows both hierarchy and animation.
A sample that shows how to use the SXRSwitch node.
Shows initial scene setup and object creation.
Shows event handling and picking.
Shows creating and using components. In this tutorial, a simple particle system is created.
Shows how to integrate Sound and text.
Shows loading and using model assets.
A movie theater sample. Plays back a video, has playback controls and has two theaters to choose from.
A simple augmented reality sample using the Vuforia computer vision library. It looks for a marker and displays a teapot on top of it. You can use either the stone or chips markers. PDFs for the markers are in sxr-vuforia/app/src/main/.
Loads and displays an X3D model.