document.getElementById("canvas"), offscreenCanvas = document.createElement("canvas"); offscreenCtx = offscreenCanvas.getContext('2d'); ctx = canvas.getContext('2d'), xIterations = 500, yIterations = 200, circleRadius = 9; canvas.width = 4500; canvas.height = 1800; offscreenCanvas.width = offscreenCanvas.height = circleRadius * 2 + 2; offscreenCtx.arc(circleRadius, circleRadius, circleRadius, 0, 2 * Math.PI); offscreenCtx.fillStyle = 'lightgreen'; offscreenCtx.strokeStyle = 'black'; offscreenCtx.stroke(); offscreenCtx.fill(); for (let i = 0; i < yIterations; i++) { for (let j = 0; j < xIterations; j++) { ctx.drawImage(offscreenCanvas, j * 2 * circleRadius + 1, i * 2 * circleRadius + 1); } } })(); </script> 20 TIME TO FIRST FRAME