canvas = {
const context = DOM.context2d(width, height);
const path = d3.geoPath(projection, context);
while (true) {
for (let i = 0, n = 480; i < n; ++i) {
const t = d3.easeCubic(2 * i > n ? 2 - (2 * i) / n : (2 * i) / n);
projection
.alpha(t)
.rotate([0, 0])
.scale(scale);
context.clearRect(0, 0, width, height);
context.beginPath();
path(land);
context.fillStyle = "rgba(0,0,0,0.15)";
context.fill();
if (showGraticule) {
context.beginPath();
path(graticule);
context.lineWidth = 1;
context.strokeStyle = "#aaa";
context.stroke();
context.beginPath();
path(equator);
context.lineWidth = 1.5;
context.strokeStyle = "#777";
context.stroke();
}
yield context.canvas;
}
}
}