Skip to content
This repository has been archived by the owner on Mar 14, 2023. It is now read-only.

gathertown/door-by-api

Repository files navigation

! UPDATE !

We now have much better ways of doing this! Add a built-in password door like this. Or use our newer, better API yourself.

Leaving the rest of this README in place because it's still an example of how to cleverly use the http API and iFrames.

.

.

.

.

gather-doors

A basic example of dynamically editing the map using the API

Instantiated by the always handy simple-react-full-stack

The code for the door in the Gather office

Warning: this code is not officially supported and you will likely have to modify it to suit your needs! Better, more powerful objects, like doors, are a work in progress and it will be easier soonish :)

Quick Start

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Start production server
npm start

Documentation

needs config.js in the server directory with the following:

module.exports = {
  ROOM_ID: "YourSpaceId12345\\Space Name",
  MAP_ID: "custom_entrance",
  API_KEY: "[your api key]",
  DOOR_IMAGES: {
    "open": "image url here",
    "closed": "image url here"
    "width": // width in Gather tiles (pixels / 32) of the door images
    "height": // height in Gather tiles (pixels / 32) of the door images
  },
  DOOR_POS: {
    "x": [x coor],
    "y": [y coor]
  },
  PASSWORD: "[password to door]",
  DOOR_URL: "url to wherever you're hosting the server", // note: http://localhost:3000 will NOT work, because only https is allowed in iFrames on https domains :P
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published