Plug-ins seem like a good implementation to use, thanks Patrick, for pointing that out. This works for all 3DMice, not just the Space Navigator. To use the plugin simply include a js file in the html file. I suppose one can add it to any Sandcastle app by inserting the include into the html textarea. Getting the input is very easy. Finding a good way to switch movement modes is something I need to work on (not everyone has multiple 3Dmice plugged in.) Such as 'true Cartesian' like I'm doing in Cesium where XYZ are Earth-Fixed coordinates, or 'curved Cartesian', which was what I was doing in Google Earth API where XY are perpendicular Great circles and Z is radius. At low altitude you don't really notice a difference between the two. Perhaps switch Cartesian modes using a button and enable rotate around a point when pressing the control key.
There are two major caveats, however, which is probably why I didn't release this earlier, as I was awaiting fixes:
First caveat: Each time you boot your computer the order of your controllers in the array is basically random, even they are plugged into the same USB ports as before. So it swaps left and right, so what right, just swap what left and right does? Well for whatever reason different firmware of Space Navigators have different ranges, one goes -4 to 4, while another goes -46 to 46. It's supposed to be -1 to +1, but that is not the case. I could have a calibration function where it asks you to max an axis for it to test to determine its range. There's no other way to tell them apart that I know of.
Second caveat: If you switch tabs, minimize browser, or reload the page, POOF..your controller is disconnected from the browser. Only way to reconnect your controller is to shut down the browser by closing all tabs. Very annoying! This is why I've been using Opera for Cesium; I don't want to close all of my tabs in Chrome all the time! (Opera and Chrome both use Chromium as a base engine.)
To do 3DOF rotation in Google Earth API I had to constantly convert HPR angles to orientation vectors (rotate them) then back to HPR angles. In Cesium I simply call a look function to rotate around any vector. Cesium is very easy to work with!