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