A minimal WebGL example demonstrating WebXR streaming from a CloudXR server to a web browser. This example shows how to integrate WebXR with CloudXR to stream immersive VR/AR content.
Note: This example is for learning purposes, not production use.
Quick Start
Prerequisites
Node.js (v20 or higher)
Installation
Navigate to the example folder
cdsimple
Install Dependencies
# For this early access release, please run the following to install SDK from the given tarball. This step will not be needed when SDK is publicly accessible. npminstall../nvidia-cloudxr-6.0.0-beta.tgz
npminstall
Build the Application
npmrunbuild
Start Development Server
npmrundev-server
Open in Browser
Navigate to http://localhost:8080 (or the port shown in terminal)
For desktop browsers, IWER (Immersive Web Emulator Runtime) will automatically load to emulate a Meta Quest 3 headset
Basic Usage
Configure Connection
Enter CloudXR server IP address (default: localhost)
Set port (default: 49100)
Select AR or VR mode
Adjust Settings (Optional)
Per-eye resolution (must be multiples of 16)
Target frame rate (72, 90, or 120 FPS)
Streaming bitrate
XR reference space and camera offsets
Start Streaming
Click "CONNECT"
Grant XR permissions when prompted
Requirements:
CloudXR server running and accessible
WebXR-compatible device (VR/AR headset) or desktop browser (IWER loads automatically for emulation)
Architecture
CloudXRClient Class
The main application class (CloudXRClient in main.ts) handles:
Initialization:
UI element management and localStorage persistence