Plot.plot({
projection: { type: "equal-earth", rotate: [0, 0, 0.000001] },
marks: [
Plot.sphere({
stroke: "black",
fill: "white",
render: function (index, scales, values, dimensions, context, next) {
const g = next(index, scales, values, dimensions, context);
d3.select(g)
.select("path")
.on("click", (event, i) => {
console.log(cell);
mutable start = A5.bigIntToHex(A5.cellToParent(cell));
});
return g;
}
}),
Plot.graticule(),
Plot.geo(A5.cellToChildren(cell, A5.getResolution(cell) + 1), {
geometry: penta,
fill: "orange",
fillOpacity: 0.2,
stroke: "orange",
render: function (index, scales, values, dimensions, context, next) {
const g = next(index, scales, values, dimensions, context);
d3.select(g)
.selectAll("path")
.on("click", (event, i) => {
mutable start = A5.bigIntToHex(this.data[i]);
});
return g;
}
}),
Plot.geo(cell ? [cell] : [], { stroke: "red", geometry: penta })
]
})