xxxxxxxxxx
15
function setup() {
createCanvas(10, 10);
workers = new Worker('worker.js');
workers.onmessage = workerDone;
workers.postMessage({
message_1: 'first message',
message_2: 'another message'
});
}
function draw() {}
function workerDone(e) {
console.log(e.data);
}