Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

The Mixed Reality Extension SDK enables developers to build 3D world extensions for AltspaceVR, using Node.JS.

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE_3rdParty.txt
Notifications You must be signed in to change notification settings

willneedit/mixed-reality-extension-sdk

 
 

Repository files navigation

Mixed Reality Extension SDK

The Mixed Reality Extension SDK lets developers and community members extend the AltspaceVR host app's worlds with multi-user games and other dynamic experiences.

Prerequisites

  • Install Git
  • Install Node.js 8.12 or newer, which includes NPM 6.4.1 or newer, from nodejs.org

Get Started

If you want to build the actual SDK itself, or want to build the functional test showcase MRE, jump to Build and Run section of this document

To see the APIs, jump to the current SDK documentation

If you have made a game or application in Unity3D, and you want it to support MREs, or you want to debug into the client runtime code itself, go to the Mixed Reality Extension Unity repository.

Other resources are on AltspaceVR's developer page

Overview

  • Written in TypeScript, and built on top of Node.js.
  • Utilizes a traditional game engine-style client-server model. All logic runs on the server, but the client performs the most CPU intensive and latency-sensitive tasks: animation, collision, rigid body physics simulation, rendering, and input handling.
  • Hides the complexity of multi-user synchronization and prediction, so developers focus on adding content, not debugging networking code.
  • Designed to be secure for users, tolerate high latency, minimize server activity, and seamlessly blend with the host app's native content.

Features

The SDK enables you to create extensions that can

  • Modify the scene graph by loading glTF assets and scene files, instantiating primitives or the host app's built-in assets, or programmatically build meshes.
  • Create actors with 3d meshes (static or skinned), realtime lights and text objects
  • Create, load, and trigger keyframe animations, sounds, music, textures
  • Assign rigid body properties, physics forces, collision geometry, and have objects collide naturally with the host app world, or with other extensions.
  • Filter actors and behaviors to groups of users, or even have single-user actors
  • Apply click detection behaviors and register event handlers on the behaviors.
  • Attach actors to host app's avatars
  • Make actors grabbable and clickable when held

Current State

Developer Preview

Limitations

As of roughly 2020, the development of the MRE SDK - currently Altspace itself - has been all but stopped, resulting that the development is fairly limited. Although the MRE SDK is licensed under the MIT license, Altspace is not. So no new features would be introduced in the Altspace client.

Bugfixes and beautifying in MRE SDK code would be more possible, especially some long-running issues that have left open at the time the development as been stopped.

Goal

I want to deliver a feature-rich set of APIs, enabling creation of high quality, rich 3d experiences. There are many features we want to add, including

  • Stability
  • Leanness, and focusing on memory and CPU footprint
  • Rigid body constraints
  • Input latency improvements
  • 2D UI layout system with common UI controls

However, our highest priority is reliability, predictability, and ease of use, and as a consequence we spend much more time making sure we have a solid, flexible infrastructure are than adding shiny new features.

Major known Issues

  • Rigid body physics state syncronization is jittery.
  • Users can't reliably directly collide with rigid body objects, except by grabbing.
  • A number of client-side errors don't get send to the node log, which makes debugging hard. This includes glTF loading errors and using the wrong name when playing animations.

How to Build and Deploy the SDK and functional tests

From command prompt:

  • git clone http://github.com/willneedit/mixed-reality-extension-sdk
  • cd mixed-reality-extension-sdk
  • npm run build-all This will...
    • install the required packages
    • build the SDK
    • pack the resulting tarballs, ready to include as your project's dependecies.
  • npm start This should print "app: Multi-peer Adapter listening on..."
  • See also: Using Visual Studio Code instead of command line

Testing an MRE In AltspaceVR

  • In AltspaceVR, go to your personal home, or your dedicated development world
  • Make sure you are signed in properly, not a guest
  • Activate the World Editor
  • Click Basics group
  • Click on SDKApp
  • For the URL field, please enter the URL ws://localhost:3901
  • Click Confirm
  • After the app has been placed, you will see the MRE Anchor (the white box with red/green/blue spikes on it), and you can use it to move the MRE around, and you can see the status of the MRE connection by looking at the icon on the anchor. To hide the anchor, uncheck "Edit Mode".

You should now see a functional test load up inside AltspaceVR.

Using Visual Studio Code

We recommend Visual Studio Code, a lightweight code editor, which is easy to use and offers full debugging capabilities for Node.js servers.

  • Install from here: Visual Studio Code
  • You may want to add the ESLint extension to get style tips - use View->Extensions(ctrl+shift+X), search for ESLint, click Install.
  • To build: use Tasks->Run Build Task... (ctrl+shift+B), and you can select npm: Build for some or all packages.
  • To choose which MRE to launch: go to debugger sidebar: (ctrl+shift+D), and from the dropdown choose desired MRE.
  • To launch the MRE server: use Debug->Start Debugging (F5). To stop the server: user Debug->Stop Debugging (shift+F5)

Hosting and Multi-User Testing

To learn about additional deployment options and multi-user testing in AltspaceVR, see DEPLOYING.md

Getting In Touch

To report issues and feature requests: Github issues page.

To chat with the team and other users: join the MRE SDK discord community.


License

New and modified portions of code licensed under the MIT License.

Original and unmodified portions of code licensed under the MIT license, third party text.

About

The Mixed Reality Extension SDK enables developers to build 3D world extensions for AltspaceVR, using Node.JS.

Resources

License

MIT, MIT licenses found

Licenses found

MIT
LICENSE
MIT
LICENSE_3rdParty.txt

Stars

Watchers

Forks

Languages

  • TypeScript 98.4%
  • Other 1.6%