canvas = {
const ctx = DOM.canvas(40, 40).getContext('2d');
const canvas = ctx.canvas;
canvas.className = "pixelated";
canvas.style.width = `${Math.min(width, 400)}px`;
canvas.style.height = `${Math.min(width, 400)}px`;
let angle = 0;
let steps = 128;
while(true){
ctx.fillStyle = '#FFFFFF10';
ctx.fillRect(0, 0, 100, 100);
ctx.strokeStyle = 'black';
ctx.beginPath();
ctx.ellipse(20, 20, 25, 20, angle*Math.PI/steps, 0, 2*Math.PI, false);
ctx.stroke();
ctx.beginPath();
ctx.ellipse(20, 20, 20, 15, (steps-1-angle)*Math.PI/steps, 0, 2*Math.PI, false);
ctx.stroke();
ctx.beginPath();
ctx.ellipse(20, 20, 15, 10, angle*Math.PI/steps, 0, 2*Math.PI, false);
ctx.stroke();
ctx.beginPath();
ctx.ellipse(20, 20, 5, 10, (steps-1-angle)*Math.PI/steps, 0, 2*Math.PI, false);
ctx.stroke();
angle = (angle + 1) % steps
yield canvas;
}
}