UPDATE: I haven't touched this in over 4 years and just noticed that it didn't work on new browsers, I got it working again just by altering a few lines (gamepad object detection) and will update on GitHub eventually. For now here's a video collection using a SpaceNavigator with Cesium:
https://www.youtube.com/playlist?list=PLu7ubzox5Ny6JIhF_tfsOuCMDtsro6ENh
Navigate through Space at warp speed, orbit planets, fly over terrain, or take a relaxing stroll through a park.
Be sure to include PI_Manager.js in your app. Place all .js files into the same directory. Be sure to set Hyper.scriptLoader.baseURL in PI_Manager.js accordingly.
NEW keyboard support! Click 3DWindow to activate. Where do you place your fingers? On the home keys http://en.wikipedia.org/wiki/Touch_typing
continuous keys
s-f left-right
e-d forward-back
a-z up-down
j-l yawLeft-yawRight
i-k pitchUp-pitchDown
u-o rollLeft-rollRight (roll in 5DOF controls zoom)
instant keys
m changes movement mode
n flip(nifty feature when you're upside-down in 5DOF mode)
I've created a testapp here http://warpdrive.github.io/Apps/testApp.html
Using a 3DMouse is a MUCH better experience as you can select 350 speeds as opposed to 1 (full speed). Also it requires only 1 hand, freeing the other hand to operate the 2DMouse. To activate a 3DMouse just press one of the 3Dmouse buttons.
Speed is tied to FOV, so if you want to go faster increase your FOV. I cap at 140deg FOV as any more is horribly warped anyways.
To change the movement scheme type for 1st 3DMouse do Hyper.SpaceNav.spaceCon[0]="string", replace "string" with one of the following "sixDofTrue" "sixDofCurved" "fiveDofCamUp" "fiveDof"
Hyper.SpaceNav.keyboardCon = number for keyboard (0='fiveDof',1='fiveDofCamUp',2='sixDofTrue',3='sixDofCurved' (or press m to cycle)
"sixDofTrue" - Just regular 6DOF, this is best for Outer Space travelling
"sixDofCurved" - Movement is along Great Circles instead of 'true' Cartesian, sort of like a 'curved' Cartesian coordinate system
"fiveDof" - vertical controls alter radius while horizontal travels around Great circles
"fiveDofCamUp" - like fiveDof, however your pitch angle dictates how vertical and horizontal movements are divied up
With the 2 fiveDOF options roll action on the 3DMouse controls camera FOV. Also you can have any number of 3DMice working at the same time, I usually have the left 3DMouse for 6DOF and the right 3DMouse for 5DOF with FOV control.
Browser support
Currently only Chromium engine browsers (Chrome and Opera) recognize 3DMice.
Even though they share the same interface, these browsers don't currently recognize 3DMice: https://msdn.microsoft.com/en-us/library/ie/dn753843(v=vs.85).aspx https://developer.mozilla.org/en-US/docs/Web/Guide/API/Gamepad (I can't get Cesium to work on Safari for Windows)
I get the same results using the HTML rocks tester on the various browsers http://www.html5rocks.com/en/tutorials/doodles/gamepad/gamepad-tester/tester.html
TODO list
-place label on Luna so that you can see even from Sol to aid in interplanetary travel.
-Adaptive height adjustment: each frame compare camera ellipsoid height difference between previous and current frame and adjust accordingly.
-2DMouse control over pitch and yaw
-Maybe have a movement scheme that moves along great circles, but maintains a north pole heading.
-Maybe have a movement scheme that moves along latitude and longitude lines