This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Warning this is pretty hacky as you need to change the URL for the room to end with the scene ID. Maybe there is a better way to query the scene ID based on the url, but the spoke only allows to set URL so this is what I imagined late in the evening. | |
// open-media-button.js | |
} else if (await isHubsRoomUrl(this.src)) { | |
// Get the 6 last letters of the name of the url (that you set up as the Scene ID) | |
let lastSix = this.src.substr(this.src.length - 6); // Should be something like "avC5IO" | |
// use modified Utopiah script | |
let bestRoom = getBestRoom(lastSix); | |
await exitImmersive(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to the list of commands in message-dispatch.js | |
// Write /note <whatever you want> to spawn a 2D image with the text | |
// Also discovered that this can be done without modification in normal hubs by CTRL+Enter or clicking Create button after writing something | |
case "note": | |
if (args[0]) { | |
const sentence = args.join(" "); | |
spawnChatMessage(sentence); | |
} | |
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require("express"); | |
const app = express(); | |
const fs = require('fs'); | |
const fetch = require('node-fetch'); | |
const tokenFile = './.ret.credentials' | |
const token = JSON.parse(fs.readFileSync(tokenFile, 'utf8')).token; | |
const accountURL = 'https://myhubsURL.com/api/v1/accounts' | |
app.use(express.json()) |