class WorkletPainter {
paint(ctx, geom, properties) {
const size = 32;
for(let y = 0; y < geom.height/size; y++) {
for(let x = 0; x < geom.width/size; x++) {
const color = `rgb(${~~(Math.random() * 240)}, 150, 200)`;
ctx.beginPath();
ctx.fillStyle = color;
ctx.rect(x * size, y * size, size, size);
ctx.fill();
}
}
}
}