bouaaaaaaaaaaaah

This commit is contained in:
Guillem George 2026-05-16 16:15:40 +02:00
parent 814e559ccd
commit 8cab4ac558
3 changed files with 84 additions and 14 deletions

View file

@ -12,13 +12,16 @@ import { resetValues } from "./canvas/utils";
// - updateRoom (update a room's configuration)
// - deleteRoom (delete a room)
const roomsConfig = {};
function setCurrentRoomConfig(room, cfg) {
roomsConfig[room] = cfg;
let roomConfig = null;
function setCurrentRoomConfig(cfg) {
roomConfig = cfg;
}
function getCurrentRoomConfig(room) {
return roomsConfig[room];
async function getCurrentRoomConfig() {
if (!roomConfig)
await fetchRoomConfig();
return roomConfig;
}
async function joinRoom(room) {
// socket.on('connection', (sockett) => {