canvas = {
const context = DOM.context2d(width, height);
const coordinates = new Float64Array(points.length * 2);
const voronoi = new d3.Delaunay(coordinates).voronoi([0, 0, width, height]);
while (true) {
const z = performance.now() * 0.0001;
context.clearRect(0, 0, width, height);
for (let i = 0, j = -1; i < points.length; ++i) {
const [x, y] = points[i];
const t = noise(x * config.f, y * config.f, z) * Math.PI;
coordinates[++j] = x + config.l * Math.cos(t);
coordinates[++j] = y + config.l * Math.sin(t);
}
context.beginPath();
voronoi.update().render(context);
context.stroke();
yield context.canvas;
}
}