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 :)
# Install dependencies
npm install
# Start development server
npm run dev
# Build for production
npm run build
# Start production server
npm start
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
}