cloud-game/web/js/init.js
sergystepanov 9ad3c98a7d
Rework worker selection feature (#365)
We add a new option for manual worker or machine (server with multiple workers) select, depending on the new coordinator option `coordinator.debug` which by default allows machine selection.
2022-04-07 21:04:30 +03:00

13 lines
346 B
JavaScript

settings.init();
log.setLevel(settings.loadOr(opts.LOG_LEVEL, 'debug'));
keyboard.init();
joystick.init();
touch.init();
stream.init();
[roomId, zone] = room.loadMaybe();
// find worker id if present
const wid = new URLSearchParams(document.location.search).get('wid');
// if from URL -> start game immediately!
socket.init(roomId, wid, zone);