The AltspaceVR SDK can be used together with Three.js or A-Frame to create holographic, multi-user web apps for virtual reality. When running inside AltspaceVR they can be experienced with consumer VR hardware including the Oculus Rift, HTC Vive, Samsung GearVR, and Google Daydream, as well as in non-VR mode for PC, Mac, and Mobile.
If you choose, you can apply for AltspaceVR developer privileges here. You will typically have a response within 2-3 days. Once granted, you will have access to a host of new activity types that are designed for SDK use. This is not required to use the SDK though.
If you are brand new to web development or 3D applications, we recommend you develop with A-Frame, as it's more user-friendly and has more utility built-in. Head over to our A-Frame API Documentation for more info on how to get started using A-Frame with AltspaceVR. You should also check out the official reference from A-Frame.
If you know what you're doing, you have your choice between A-Frame and Three.js. Three.js is lower-level than A-Frame, so it is more flexible, but at the cost of additional complexity. If you think this is for you, you should read our Three.js API Documentation. You'll also need the upstream Three.js Reference.
altspace.js should be included whenever you use the SDK. It contains core utilities and APIs, and is useful both inside and outside of the client.
Many APIs are present in the client without loading
altspace.js, but please still include it, as this may change in the future.
The version baked into the altspace.js script will determine which version of the entire SDK the client will provide your app. This means that if we make any breaking internal changes to things like rendering or cursor events, and you are using an older version of
altspace.js, we will try to return legacy behavior appropriate to your version of
altspace.js. Versioning will follow SEMVER as closely as possible. Details for each version can be found in the Release Notes.
Latest Version: v2.9.0 -- See Changes
Include the latest version of the SDK in your app with:
If you use npm, you can install altspace.js with:
npm install altspace
* For the purposes of cursor collision, meshes are approximated to be a 4/5 scale of their bounding box. If desired, default cursor collision can be disabled.
** Meshes outside the bounds of the enclosure will be culled unless you request full space access.
OSX Debugger - Windows Debugger
(Note that you cannot rename the OSX Debugger from Debugger.app after you extract it, or it won’t run due to legacy .app bundle structure — it needs an Info.plist with metadata.)
More generally, Altspace browsers are implemented using an embedded Chromium which exposes the Chrome debugging protocol version 1.1. You can find documentation on the protocol and usage here. The protocol is exposed via a WebSocket interface on port 9999, rather than 9222 as is typical for the Chrome desktop browser. You can test it out by accessing http://localhost:9999/json while running Altspace to see a list of active in-world browsers and enclosures in JSON format.
There are many third-party tools that speak this protocol which you can point at running Altspace browsers, e.g.:
Note that many of these will expect to be connecting to port 9222, so you might have to forward from that port, e.g. on Windows you can use netsh:
$ netsh interface portproxy add v4tov4 protocol=tcp listenport=9222 listenaddress=127.0.0.1 connectport=9999 connectaddress=127.0.0.1
AltspaceVR supports Three.js versions r73, r74, r76, and r84. r84 is recommended. A-Frame versions 0.3.0 and 0.7.0 are the only versions tested and known to work, though others may as well.
Not currently supported:
wrapTproperty. The value of
wrapSis used for both axes.
Altspace's browser is based on Chromium version 40.
Not currently supported: