function render(context, path) {
function draw() {
for (const [value, f] of groups) {
if (isNaN(value)) continue;
context.beginPath();
path(f);
context.fillStyle = color(value);
context.fill();
}
}
context.fillStyle = "#000";
context.fillRect(0, 0, width, height);
context.beginPath();
path({ type: "Sphere" });
context.fillStyle = "#003";
context.fill();
const clipAngle = projection.clipAngle();
context.globalAlpha = 0.3;
projection.clipAngle(180);
draw();
context.globalAlpha = 1;
projection.clipAngle(clipAngle);
draw();
}