A scene that uses a server and a REST API to sync a scene state amongst multiple users. It’s built around the basic “open the door” example.
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode
screenshot
server
src
.dclignore
.gitattributes
.gitignore
Dockerfile
LICENSE
README.md
package-lock.json Initial commit Jan 6, 2019
package.json
scene.json
tsconfig.json Initial commit Jan 6, 2019

README.md

Block Dog

A scene that uses a server and a REST API to sync a scene state amongst multiple users. It’s built around the basic “open the door” example.

  • Create a REST server
  • Call REST API

Install the CLI

Download and install the Decentraland CLI by running the following command

npm i -g decentraland

For a more details, follow the steps in the Installation guide.

Previewing the scene

Once you've installed the CLI, download this example and navigate to its directory from your terminal or command prompt.

Run the REST server

(In another terminal window)

# from the project root
cd server

# install node dependencies
npm install

# start the server
npm start

Run the scene preview

# from the project root
cd scene

# install node dependencies
npm install

# start the preview
dcl start

Open multiple browser tabs by copying the preview URL. Interact with the door on one tab to see that it also changes on other tabs as well.

Any dependencies are installed and then the CLI will open the scene in a new browser tab automatically.

Usage

Click on the door to open or close it. Other users should see the door change state as well.

Learn more about how to build your own scenes in our documentation site.

Copyright info

This scene is protected with a standard Apache 2 licence. See the terms and conditions in the LICENSE file.