48 ms·
Ok that was fun. var socket = new Firebase("https://pixelpals-server.firebaseio.com/public"); var w = 150; var h = 120; var randColor = function(){
by tomasklingen 12y ago
Ok that was fun.
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');
}
}
.. sorry
- jengamaster 12y agoI think some people may be checking wether your script works or not
- Kissy 12y agoYou can even draw the Mona Lisa on it : http://pastebin.com/TUsqeMWT http://pastebin.com/TUsqeMWT (You need to expose the pixelCanvas globally first using a break point or something)
- eternalthinker 12y agoThe scripted experiments are fun indeed :] Also the firebase server usage is shooting up like anything :D