Sample code for the Mixed Reality Extension SDK (https://github.com/Microsoft/mixed-reality-extension-sdk)
Перейти к файлу
Steven Vergenz a4d359db48 Update samples to MRE 0.15, TS 3.7, ESLint 2020-01-23 15:13:29 -08:00
.vscode [Samples] Remove ForwardPromise from actor creation calls (#39) 2019-07-10 14:26:02 -07:00
samples Update samples to MRE 0.15, TS 3.7, ESLint 2020-01-23 15:13:29 -08:00
scripts Change indentation to tabs from spaces (#43) 2019-08-20 17:00:10 -07:00
.editorconfig Add first sample setup (not compiling) 2018-11-30 16:56:04 -08:00
.gitignore Update samples to MRE 0.15, TS 3.7, ESLint 2020-01-23 15:13:29 -08:00
DEVELOPER.md updated paths after removing the node subfolder of the sdk 2018-12-18 09:33:06 -08:00
LICENSE Initial commit 2018-11-29 10:26:39 -08:00
README.md Grammar 2019-01-11 10:58:01 -08:00

README.md

Mixed Reality Extension SDK Samples

The Mixed Reality Extension SDK Samples is the easiest way to build and run your first AltspaceVR extension using the Mixed Reality Extension SDK.

Prerequisites

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

How to Build and Run the Hello World sample

From command prompt:

  • git clone http://github.com/microsoft/mixed-reality-extension-sdk-samples
  • cd mixed-reality-extension-sdk-samples\samples\hello-world
  • npm install This will install all dependent packages. (and will do very little if there are no changes)
  • npm run build This should not report any errors.
  • npm start This should print "INF: Multi-peer Adapter listening on..."

In AltspaceVR

  • Go to your personal home
  • Make sure you are signed in properly, not a guest
  • Activate the Space Editor
  • Click Basics group
  • Click on SDKApp
  • For the URL field, enter ws://localhost:3901
  • Enter a session ID (This step will eventually be optional. For now, put in any random value)
  • Click Confirm
  • If the app doesn't seem to load, click on the gear icon next the MRE object in to the present objects list, and make sure "Is Playing" is checked.
  • After the app has been placed, you will see the MRE Anchor (the white box with red/green/blue spikes on it), rendering on top of the MRE. You can use the anchor to move the MRE around. To hide the anchor, uncheck "Edit Mode".

You should now see the words "Hello World" above a spinning cube. Congratulations, you have now deployed a Node.js server with the MRE SDK onto your local machine and connected to it from AltspaceVR.

Hosting in the Cloud

In order for other AltspaceVR users to see your SDK app running, it must be hosted in a way they can connect to it. To learn about cloud hosting and other solutions, checkout DEPLOYING.md in the SDK repo.

To learn more about the SDK, please read the MRE SDK readme.

Sample Descriptions

  • Hello World - shows a text that animates when highlighting or clicking on a cube
  • Solar System - loads a 3d model for each planet, generates keyframe animations, and when all assets are ready, start all animations simultaneously.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.