The demo page is quite anarchic but it's a fun concept. Given a goal there would probably be more incentive for random users to work together on something.
var socket = new Firebase("https://pixelpals-server.firebaseio.com/public");
var w = 150;
var h = 120;
var randColor = function(){
return '#'+Math.floor(Math.random()*16777215).toString(16);
};
for(var i = 0 ; i < h; i++){
for(var j = 0 ; j < w ; j++){
socket.child(i*w + j).set(i%2 ? randColor() : '#000');
}
}
14 comments
[ 2.6 ms ] story [ 39.4 ms ] threadFrom the network inspector, click the one that says "web sockets"
Then select the entry from the list, looks something like ".ws?v=5&ns=pixelpals-server"
Then select frames from the 3 options "Headers Frames Cookies"
Should see the json data
I'm shocked!
(You need to expose the pixelCanvas globally first using a break point or something)