This commit is contained in:
Jan 2020-12-24 14:55:16 +01:00
parent 7b2f47d6e9
commit c28dae81d1

View file

@ -1,7 +1,7 @@
const robot = require('robotjs'); const robot = require('robotjs');
const WebSocket = require('ws'); const WebSocket = require('ws');
const mode = 'host'; // 'host' or 'client' const mode = 'client'; // 'host' or 'client'
const server = 'ws://node.janderedev.xyz:8080'; const server = 'ws://node.janderedev.xyz:8080';
if (mode == 'host') { if (mode == 'host') {
@ -39,7 +39,7 @@ if (mode == 'host') {
y += val.y; y += val.y;
}); });
sockets.forEach(s => s.send(`${x / sockets.length}:${y / sockets.length}`)); sockets.forEach(s => s.send(`${x}:${y}`));
}, 50); }, 50);
}); });
} }