code
parent
7b2f47d6e9
commit
c28dae81d1
4
index.js
4
index.js
|
@ -1,7 +1,7 @@
|
|||
const robot = require('robotjs');
|
||||
const WebSocket = require('ws');
|
||||
|
||||
const mode = 'host'; // 'host' or 'client'
|
||||
const mode = 'client'; // 'host' or 'client'
|
||||
const server = 'ws://node.janderedev.xyz:8080';
|
||||
|
||||
if (mode == 'host') {
|
||||
|
@ -39,7 +39,7 @@ if (mode == 'host') {
|
|||
y += val.y;
|
||||
});
|
||||
|
||||
sockets.forEach(s => s.send(`${x / sockets.length}:${y / sockets.length}`));
|
||||
sockets.forEach(s => s.send(`${x}:${y}`));
|
||||
}, 50);
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue