|
@ -69,7 +69,7 @@ |
|
|
var balls_online = new Array(); |
|
|
var balls_online = new Array(); |
|
|
var svglines_online = new Array(); |
|
|
var svglines_online = new Array(); |
|
|
var speed = 100; |
|
|
var speed = 100; |
|
|
var line_kind = 0; |
|
|
var line_kind = 1; |
|
|
|
|
|
|
|
|
function init() { |
|
|
function init() { |
|
|
myName = document.getElementById('loginname').value; |
|
|
myName = document.getElementById('loginname').value; |
|
@ -101,8 +101,14 @@ |
|
|
var balls = ret.balls; |
|
|
var balls = ret.balls; |
|
|
var lines = ret.lines; |
|
|
var lines = ret.lines; |
|
|
|
|
|
|
|
|
updateBalls(balls); |
|
|
if(balls){ |
|
|
updateLines(lines); |
|
|
console.log('updating balls'); |
|
|
|
|
|
updateBalls(balls); |
|
|
|
|
|
} |
|
|
|
|
|
if(lines){ |
|
|
|
|
|
console.log('updating lines'); |
|
|
|
|
|
updateLines(lines); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
setTimeout(function(){ |
|
|
setTimeout(function(){ |
|
|
poll(); |
|
|
poll(); |
|
@ -211,8 +217,8 @@ |
|
|
function changeKind() { |
|
|
function changeKind() { |
|
|
line_kind = line_kind + 1; |
|
|
line_kind = line_kind + 1; |
|
|
line_kind = line_kind % 2; |
|
|
line_kind = line_kind % 2; |
|
|
var kind_str = "guitar"; |
|
|
var kind_str = "solid"; |
|
|
if(line_kind == 1) kind_str = "solid" |
|
|
if(line_kind == 1) kind_str = "guitar" |
|
|
document.getElementById("line_kind").innerHTML = kind_str; |
|
|
document.getElementById("line_kind").innerHTML = kind_str; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|