-
Notifications
You must be signed in to change notification settings - Fork 11
Description
Recently I was helping someone make a WWT interactive, and something that we wanted was an annotation in 3D mode (in particular, drawing something in the plane of the Milky Way). This led me to realize that there's no API for specifying 3D coordinates for an annotation; it seems that everything is assumed to be in 2D.
I was able to get around this by doing the following, where ra, dec, and dAu are the coordinates of point to add (distance in AU since that's the conversion that exists):
const ecliptic = Coordinates.meanObliquityOfEcliptic(SpaceTimeController.get_jNow() / 180 * Math.PI);
const pos = Coordinates.geoTo3dRad(ra, dec, dAu);
pos.rotateX(ecliptic);
annotation._points$1.push(pos);
which worked, but is obviously pretty hacky and not at all accessible to the average user. (I needed the ecliptic rotation to make things line up right in that case - not sure how universal this would be). This got me thinking that it might be nice to have some sort of API for making it easier/possible to specify annotation points in 3D.