plotGlobe = (projection) => {
const svg = d3.select(
Plot.plot({
margin,
width,
height,
projection,
marks: [
Plot.sphere({
stroke: d3.color(color).darker().hex(),
fill:
radios === "Pushed"
? d3.color(color).darker(0.1).hex()
: d3.color(color).brighter(0.2).hex()
}),
Plot.graticule({ stroke: color }),
Plot.geo(countries.features, {
fill: color,
ariaDescription: "land",
stroke: d3.color(color).darker().hex()
}),
Plot.geo(countries, {
stroke: d3.color(color).darker().hex(),
ariaDescription: "landstroke"
})
]
})
);
const defs = svg.append("defs");
const filter =
radios === "Pushed"
? NeumorphismFlat(defs, 10, 20, color)
: NeumorphismPressed(defs, 10, 20, color);
svg.selectAll(`[aria-description="land"]`).style("filter", filter);
return svg.node();
}