Browse Source

Fixed guitar/solid thingy. Updates lines/balls only when given

master
Joshua Moerman 12 years ago
parent
commit
ef09dd82cd
  1. 16
      index.html

16
index.html

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