Skip to content

generalui/sandcastle-demo

Repository files navigation

Pluto Multi App - Sandcastle

This demo is based on https://mait.pluto.app/tutorials/sandcastle

Getting started

Install

Clone this repo locally:

git clone https://github.com/generalui/sandcastle-demo.git
cd sandcastle-demo

Ensure Nodejs v16 is being used.

If using asdf, there is a .tool-versions file that sets the node version.

asdf install

or using nvm

nvm use 16

Install dependencies:

npm install

Run demo

npm start

Create XR Package

Notes:

  • Current version of xrpk (0.0.83) doesn't seem to be working on M1
  • The version used in the pluto tutorial throws an error (missing file). I was able to fix it by modifying the following:
// node_modules/xrpk/cli.js - line 37
const getContract = () => undefined;

Build the XR package:

npm run build-xrpk

This will begin to build the XR package. During the process, there will be prompts in the terminal:

  1.  ? XR Package name:  (sandcastle-demo)

    Enter genuisandcastledemo and press return.

  2.  ? XR Package Description:  (XR Package)

    Press Enter to accept the default.

  3.  ? Package Type - hit ENTER if unsure (Use arrow keys)
     ❯ webxr-site@0.0.1
       ──────────────
       gltf@0.0.1
       ──────────────
       vrm@0.0.1
       ──────────────
       vox@0.0.1

    Press Enter to accept the default.

  4.  ? URL entry point - hit ENTER if unsure (index.html)

    Press Enter to accept the default.

The XR package genuisandcastledemo.wbn should have been created and be available in the ./dist folder.

Run XR Package

  1. Go to https://launcher.pluto.app/.

  2. Click "Multi Apps".

  3. Select "New Multi App (Upload)"

  4. Upload genuisandcastledemo.wbn from the ./dist folder.

Note: there is currently a bug with the background (dark gray disk)