Skip to content
/ Vus Public

Platform for persistent Multi-User VR across the web.

License

Notifications You must be signed in to change notification settings

ahomentc/Vus

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VUS

Build Status NPM version NPM downloads

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.


Getting Started

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.

MAKE SURE YOUR LINKS ARE RELATIVE, NOT ABSOLUTE

Scene component

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

Connecting

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');

Creating Networked Entities

<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.

About

Platform for persistent Multi-User VR across the web.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published