diff --git a/index.html b/index.html index 23350bd..c52934e 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ border: 1px solid black; } .ball { - -webkit-transition: left 0.5s linear, top 0.5s linear; + -webkit-transition: left 0.1s linear, top 0.1s linear; position: absolute; } .ball .bullet { @@ -133,8 +133,13 @@ } function drawEnd(line){ - console.log(JSON.stringify(line)); drawRemove(line); + line.line_kind = 1; + var packet = { + command: 'add line', + data: line + }; + websocket.send(JSON.stringify(packet)); } function drawRemove(line){ @@ -149,8 +154,11 @@ name: myName, size: {width: window.innerWidth, height: window.innerHeight} }; - - websocket.send(JSON.stringify(myself)); + var packet = { + command: 'update user', + data: myself + }; + websocket.send(JSON.stringify(packet)); } window.addEventListener("load", init, false);