From 17b4df5c4bf5531caad728bc521b3393b01f2d99 Mon Sep 17 00:00:00 2001 From: catvayor Date: Fri, 9 Sep 2022 14:43:41 +0200 Subject: [PATCH] added image and made it work with 1 client --- def.png | Bin 0 -> 6059 bytes map.html | 35 +++++++++++++++++++++++++++-------- track.png | Bin 0 -> 590 bytes traque.js | 9 +-------- 4 files changed, 28 insertions(+), 16 deletions(-) create mode 100644 def.png create mode 100644 track.png diff --git a/def.png b/def.png new file mode 100644 index 0000000000000000000000000000000000000000..b1a2a138e16f7d3c3f22472a1e564198d77fcc94 GIT binary patch literal 6059 zcmeHKdpMNo`=8dQge7`yqQxogNYP2w#X?$TZ%?m zill?mDwIPZscdW7D3z4mSgQkR`@J)&t?T!_uHV&l{l5P-$LGDD`~E!l{dw-^e(!ge zueaMQy@h%R1Y#D`-NhgN*NpY1PlJEc@Ex@X1hPGb6|C@QN28=N2_F)ID8&{jhys-m zAAwM++k-=LFE5`v(Gf8EoqJUJ8gn==0HACpo2 zu%KAiUy}y1U+H1@3vU`3_@PhWFNJiE)&4RPIx-ZamV~p6a`qT{f?+aDWh<36WMX`-9VGrBTujQt#qxbtr=93O%67%f7X68s z#|}s0goW`VLgQGJUMP}3$H>fgnnH9O;~QUaYZmGZsfljvf^2FcBnSfj9Q98N>GB0+(7R(5){aLrW&l5buYqZJ&7BxvVXEMaTezF9OvRp=k#Ujfx{VQ zP5B&envqQ}#>_ilwbkR@PK222N}9^)x~oBeaC2jxFNevJCB>DMSBx**biB0x=zeJW zaR1uylSgvxqJvBCKCc-nYCafaTB*ieo=usUPV95H7%D5T>Zx7no3^HFl;yE7c|GZN za%E(F)dAbinJG}~9Q#$I<Q zG}n;vNWbTv9kUE}6m^zoi>=-FyA$v3=mCJ@#(d;(c$;JXSorE9JCR~4F6h;VJiOG)AVss<_2z&@(1zE$dyM`(-Z4O3@TtVTW^f>Nsz{Y~as3VQq0Z_VYKBqVg~D3mBg+};e!_T^)7`C%UQGBRXtXOa z=%)ko`&m#v&5g(F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LwF{ ziMWu-t_q#6=t2lR7)DTHramW%NqCO0d-(Wz7vovp=l&eMO3q|}PavLUx?vG-5KnJf zI_G`j2rEho@j3CBK^G)`x%kia6AAVPqQDoQBBLX1|86cZ`hk9+tB9luB}nOr3> zax9<%6_Voz|AXJ%n)%5IHz^zkI$mu1V+82j1sXNm{yw(t#t9I32ClT0zfuQgK1r{& zwCEAgw+&oew={VVxZD8-o^;8O94SE4pU(sDXY@^3p#K)=UUPeE?&I_UNK;qI8{ps& z7%foty2rai?Y;ebrrF;Q7S3{ljcz0100006VoOIv0RI600RN!9r;`8x010qNS#tmY zE+YT{E+YYWr9XB6000McNliru<_QQ3COXaPt=0el02y>eSad^gZEa<4bO1wgWnpw> zWFU8GbZ8()Nlj2!fese{001UQL_t&-(_>&j1OFKq{{LrS_>V5m#6TpVzCuQ9?xDy; ch9Tf<06!rL21nCly8r+H07*qoM6N<$g0fZd8UO$Q literal 0 HcmV?d00001 diff --git a/traque.js b/traque.js index d24fa13..ee692c6 100644 --- a/traque.js +++ b/traque.js @@ -60,32 +60,25 @@ io.sockets.on('connection', function(socket){ socket.shown = true; socket.color = 0; socket.on('geoLoc', function(d){ - console.log("new loc :", d); socket.position = d.position; if(socket.shown) for(i in equipes) equipes[i].emit('moving', {"id": socket.id, "position": d.position}); }); socket.on('changeColor', function(d){ - console.log(d); socket.color = d.color - 0; - console.log("new color2"); if(d.color == -1) socket.shown = false; else{ - console.log("new color3"); if(!socket.shown) for(i in equipes) equipes[i].emit('moving', {"id": socket.id, "position": socket.position}); socket.shown = true; - console.log("new color4"); } for(i in equipes) equipes[i].emit('changeColor', {"id": socket.id, "color": d.color}); - console.log("new color5"); }); socket.on('setName', function(d){ - console.log("new name"); socket.name = d.name; for(i in equipes) equipes[i].emit('setName', {"id": socket.id, "name": d.name}); @@ -95,4 +88,4 @@ io.sockets.on('connection', function(socket){ console.log("Launch server"); server.listen(9000); -console.log("Running!"); +console.log("Running !");