Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var numcols = 1600;
- var curcol = 0;
- function flood()
- {
- var pts = [];
- pts.push({x: curcol, y: 0});
- pts.push({x: curcol, y: 100});
- pts.push({x: curcol, y: 200});
- pts.push({x: curcol, y: 300});
- pts.push({x: curcol, y: 400});
- pts.push({x: curcol, y: 500});
- pts.push({x: curcol, y: 600});
- pts.push({x: curcol, y: 700});
- curcol += 4;
- if(curcol >= numcols)
- {
- curcol = 0;
- setTimeout(flood, Math.floor(Math.random()*500));
- return;
- }
- color = Math.floor(Math.random()*16777215).toString(16);
- socket.emit('update', { points: pts, color: color, id: 1 });
- flood();
- }
- flood();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement