Platform for Multi-User VR on the Web
Platform for developers to upload their multi-user VR experiences.
We currently support AFRAME and NETWORKED-AFRAME VR experiences.
For networked-aframe: Follow the NAF Getting Started tutorial to build your own example from scratch, including setting up a local server.
To upload your files, go to the add button on the platform. Include all of your files there.
Required on the A-Frame <a-scene>
component.
<a-scene networked-scene="
serverURL: /;
app: <appId>;
room: <roomName>;
connectOnLoad: true;
onConnect: onConnect;
adapter: wseasyrtc;
audio: false;
debug: false;
">
...
</a-scene>
Property | Description | Default Value |
---|---|---|
serverURL | Choose where the WebSocket / signalling server is located. | / |
app | Unique app name. Spaces are not allowed. | default |
room | Unique room name. Can be multiple per app. Spaces are not allowed. There can be multiple rooms per app and clients can only connect to clients in the same app & room. | default |
connectOnLoad | Connect to the server as soon as the webpage loads. | true |
onConnect | Function to be called when client has successfully connected to the server. | onConnect |
adapter | The network service that you wish to use, see adapters. | wseasyrtc |
audio | Turn on / off microphone audio streaming for your app. Only works if the chosen adapter supports it. | false |
debug | Turn on / off Networked-Aframe debug logs. | false |
By default, networked-scene
will connect to your server automatically. To prevent this and instead have control over when to connect, set connectOnLoad
to false in networked-scene
. When you are ready to connect emit the connect
event on the a-scene
element.
AFRAME.scenes[0].emit('connect');
<a-assets>
<template id="my-template">
<a-entity>
<a-sphere color="#f00"></a-sphere>
</a-entity>
</template>
<a-assets>
<!-- Attach local template by default -->
<a-entity networked="template: #my-template">
</a-entity>
<!-- Do not attach local template -->
<a-entity networked="template:#my-template;attachTemplateToLocal:false">
</a-entity>
Create an instance of a template to be synced across clients. The position and rotation will be synced by default. The aframe-lerp-component
is added to allow for less network updates while keeping smooth motion.
Templates must only have one root element. When attachTemplateToLocal
is set to true, the attributes on this element will be copied to the local entity and the children will be appended to the local entity. Remotely instantiated entities will be a copy of the root element of the template with the networked
component added to it.