The client-side code for https://hubs.mozilla.com/, a multi-user experience in WebVR. Built with A-Frame.
To run the client, run:
git clone https://github.com/mozilla/hubs.git
cd hubs
npm ci
npm start
Then visit https://localhost:8080 (note: HTTPS is required)
Note: When running the Hubs client locally, you will still connect to the development versions of our Janus WebRTC and reticulum servers.
To bundle javascript and generate the html templates, run:
npm run build
When running a local copy of Hubs as-is, you'll use Mozilla's "dev" Reticulm and Janus servers for storing your room information and relaying messages between users in the room.
This also means you can upload a modified copy of Hubs to a hosting provider as-is, and use it without having to set up your own servers. Simply run:
npm run build
and then upload the files in the dist
folder to your hosting provider.
If you are running your own servers, you can modify the environment variable
RETICULUM_SERVER
when building to point Hubs to your own infrastructure.
See .env.defaults
for the full set of environment variables that can modify
Hubs' behavior at build time.
When running the full stack for Hubs (which includes Reticulum)
locally it is necessary to add a hosts
entry pointing hubs.local
to your local server's IP.
This will allow the CSP checks to pass that are served up by Reticulum so you can test the whole app. Note that you must also laod hubs.local over https.
allow_multi
- Allow multiple instances off the app in the same browser sessionallow_idle
- Disable the idle detector timeoutidle_timeout
- Idle timeout in secondsavatar_scale
- Scale your self!quality
- Either "low" or "high". Force assets to a certain quality levelmobile
- Force mobile modeno_stats
- Disable performance statsvr_entry_type
- Either "2d", "vr", or "daydream". Used internally to force a VR entry type. Add "_now" to the end of the value to skip the audio check.disable_telemetry
- Iftrue
disables Sentry telemetry.log_filter
- Adebug
style filter for setting the logging level.debug
- Iftrue
performs verbose logging of Janus and NAF traffic. Also enables debug mode on the physics system.vrstats
- Iftrue
shows stats in VR.debug_log
- Iftrue
, enables an on-screen debug log and console. Useful for debugging on mobile devices.userinput_debug
- Iftrue
, enables an on-screen userinput debug status panel. Press "L" on your keyboard to show the panel.thirdPerson
- Enables experimental third person mode.
- Reticulum - Phoenix-based backend for managing state and presence.
- NAF Janus Adapter - A Networked A-Frame adapter for the Janus SFU service.
- Janus Gateway - A WebRTC proxy used for centralizing network traffic in this client.
- Janus SFU Plugin - Plugins for Janus which enables it to act as a SFU.
- Hubs-Ops - Infrastructure as code + management tools for running necessary backend services on AWS.