I'm using D3's orthographic projection to build a rotating globe that gets drawn to a canvas. I'm adding shapes to the globe using d3.geo.*
, particuarlly geo.circle
.
I would also like to display text on the globe (also via canvas), with the caveat that the text should exist on the globe, with proper transformation/curvature and clipping, like all the other GeoJSON/TopoJSON features that are rendered. However, only shapes created via d3.geo.path
can be drawn this way.
Is there a way to take some text (and a point, or perhaps a bounding box) and transform it via d3.geo.path
so that it can be drawn correctly on the globe? Here is a photoshopped (poorly—the shapes aren't quite right) example of the sort of effect I'm after: