// Demonstrates large-scale changes using tools/queue.js; pastes a character (once) over a large area // This demo puts a bunch of z's on yourworldoftext.com/zworld (scroll up because it's a big area) const Socket = require('../socket.js'); const Space = require('../space.js'); const Queue = require('../tools/queue.js'); let width = 801; let height = 801; let sends = width*height; let copyspace = new Space(); copyspace.loc = [-400,-400]; let row = 'z'.repeat(width)+'\n'; let tot = row.repeat(height); copyspace.adhoc(tot); let main = new Socket('zworld'); let writect = 0; let writes = new Queue(1000, 200, w => { main.write(w); writect += 200; console.log(writect + '/' + sends)}); writes.enqueue(copyspace.towrite()); main.on('open',()=>{writes.enable(); console.log('enabled');});