From e8d1fec9b67c8622578ade3578146e41d5fff7c4 Mon Sep 17 00:00:00 2001 From: Ben Burlingham Date: Fri, 26 Jun 2020 18:02:18 -0700 Subject: [PATCH] Memoizing client connections in messenger. --- README.txt | 1 + assets/comet.svg | 2 +- client/controls.js | 7 +++++ client/icons.js | 39 ------------------------- index.html | 6 ++-- server/ricochet.js | 69 ++++++++++++++++----------------------------- socket/messenger.js | 69 ++++++++++++++++++++++++++------------------- socket/server.js | 33 ++++++++++++++++------ 8 files changed, 101 insertions(+), 125 deletions(-) delete mode 100644 client/icons.js diff --git a/README.txt b/README.txt index bc3e548..606bb0d 100644 --- a/README.txt +++ b/README.txt @@ -16,6 +16,7 @@ Icons from [https://game-icons.net](https://game-icons.net) - win declare - replay stack - countdown skip +- Extract loader from join.css and kill join.css, join.js - slide arrows - chat box - no cancel from name prompt diff --git a/assets/comet.svg b/assets/comet.svg index 38c600c..78abf67 100644 --- a/assets/comet.svg +++ b/assets/comet.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/client/controls.js b/client/controls.js index 82f7d43..9f3ba5d 100644 --- a/client/controls.js +++ b/client/controls.js @@ -1,6 +1,13 @@ //===== Constructor const Controls = function() { this.names = {}; + + + + const evt = new Event('L-join'); + document.dispatchEvent(evt); + + // this.starts = []; // this.timers = {}; diff --git a/client/icons.js b/client/icons.js deleted file mode 100644 index 5794a7a..0000000 --- a/client/icons.js +++ /dev/null @@ -1,39 +0,0 @@ -const Icons = { - comet: (color) => { - // const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg"); - // star.setAttribute("viewBox", '0 0 100 100'); - - // const path = document.createElementNS("http://www.w3.org/2000/svg", 'path'); - - const obj = document.getElementById('TEST_OBJECT_SVG'); - - console.log(obj); - console.log(obj.contentDocument) - - return obj; - }, - - moon: (color) => { - - }, - - planet: (color) => { - - }, - - rocket: (color) => { - - }, - - spacesuit: (color) => { - - }, - - spider: (color) => { - - }, - - ufo: (color) => { - - }, -}; \ No newline at end of file diff --git a/index.html b/index.html index 1ac1932..fd6faca 100644 --- a/index.html +++ b/index.html @@ -14,11 +14,10 @@ - -
+
Global
@@ -106,7 +105,6 @@