lineEmbed = {
let startTime = new Date().getTime(),
seconds = 0,
secondsRounded = 0,
ticks = 0,
speeds = [];
const ctx = DOM.context2d(myBoids.width(), height);
let projection = d3.geoIdentity();
let path = d3.geoPath(projection).context(ctx);
ctx.scale(1.25, 1.25);
ctx.translate(-100, -100);
let holding = false;
while (true && myBoids.flock.length) {
myBoids.tick();
ctx.fillStyle = bgColor;
let cbg = d3.rgb(bgColor);
ctx.fillStyle = `rgba(${cbg.r},${cbg.g},${cbg.b},0.01)`;
ctx.fillRect(0, 0, width, height);
ctx.globalAlpha = 1;
ctx.strokeStyle = strokeColor;
let contours = contour(myBoids.flock);
for (const contour of contours) {
const threshold = contour.value;
ctx.beginPath(),
path(contour),
ctx.stroke();
}
yield ctx.canvas;
}
}