bouaaaaaaaaaaaah
This commit is contained in:
parent
814e559ccd
commit
8cab4ac558
3 changed files with 84 additions and 14 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue