Getting Started with CloudXR.js#
This overview outlines a high-level workflow for building CloudXR.js streaming applications.
High-Level Workflow#
Building a CloudXR.js application involves three main steps:
Set up the Server: Install CloudXR Runtime with an OpenXR-compatible server application
Build the Client: Create a web client using CloudXR.js
Connect and Stream: Access your web app from a VR/AR headset or desktop browser
Before proceeding, review the CloudXR.js Requirements for server, client, and network requirements.
Server Setup#
You need CloudXR Runtime with an OpenXR compatible server application. Refer to Getting Started with CloudXR Runtime for detailed server setup instructions.
Important
Ensure CloudXR Runtime is configured with device profile set to auto-webrtc for web clients.
Tip
For the fastest getting-started path, use the LÖVR sample as your server app. In Windows web workflows, run the server with run.bat --webrtc. See Quick Start Guide and End-to-End Example for setup details.
Client Setup#
Download the CloudXR.js npm package tarball from NGC (see Getting CloudXR for details). Install it with:
npm install </path/to/nvidia-cloudxr-<version>.tgz>
We provide sample projects to help you get started:
Simple WebGL Sample: Minimal implementation using vanilla WebGL. See Simple WebGL Sample Workflow.
React Three Fiber Sample: Advanced sample using React and Three.js. See React Sample Workflow.
See Sample Applications for available samples and Client Setup Guide for device configuration.
Connection Modes#
CloudXR.js supports two connection modes:
- HTTP Mode (Development)
Simplest setup - no proxy required
Direct WebSocket connection to CloudXR Runtime
Requires browser flags on Meta Quest
Not supported on Pico 4 Ultra
- HTTPS Mode (Production)
Works on all supported devices including Pico 4 Ultra
Requires WebSocket SSL proxy setup
Production-ready with TLS communication
See WebSocket Proxy Setup for WebSocket proxy setup and Network Setup for network configuration.
Next Steps#
Server Setup: Getting Started with CloudXR Runtime
Easiest Server Option (LÖVR): Quick Start Guide
Client Configuration: Client Setup Guide
Example Applications: Sample Applications
Simple WebGL Workflow: Simple WebGL Sample Workflow
React Workflow: React Sample Workflow
Proxy Setup: WebSocket Proxy Setup
Network Configuration: Network Setup