canvas = {
const w = width + 28, h = height;
const context = DOM.context2d(w, h, 1);
const image = context.getImageData(0, 0, w, h);
const indexes = [];
let frame = 0;
context.canvas.style.margin = "0 -14px";
const s = new SimplexNoise(myseed.value)
var x = w >> 1, y = h >> 1;
var newx = x, newy = y;
const resolution = 1000
var points = scribble(resolution)
for (var i = 0; i < points.length; i++) {
newx = (w/2) + (w/3) * points[i][0]
newy = (h/2) + (w/3) * points[i][1]
context.beginPath();
context.lineWidth = 1 + Math.abs(4 * s.noise3D(points[i][0], points[i][1], -1))
context.moveTo(x, y);
context.lineTo(newx, newy);
if (i > 0) {
context.stroke();
}
x = newx
y = newy
if (!(++frame % (resolution / 200))) {
yield context.canvas;
}
}
yield context.canvas;
}