The gyro script has been updated to be an actual js plugin, and is now included as a standard krpano plugin. Read about it here:
iphone4 gyroscope plugin
I have developed a "plugin" for the javascript viewer that uses the iphone4/ipod 4th generation gyroscope with krpano. Currently it is a simple javascript file that you include in the HTML page. It is available for free/open source.
src/download:
https://github.com/fieldOfView/krpano_gyro
demo:
http://fieldofview.com/panoramas/winter-pictura
(or any other panorama on http://fieldofview.com/panoramas)
The plugin uses devicemotion events to control the panorama, but this can be overridden with normal touch control. When you release, viewing reverts back to devicemotion control.
How to use:
Download the script from github, and include it in your page(s) after including swfkrpano.js.
NB: See the note below about using "krpanoDiv"
Known issues:
- Only works on iphone4 and ipod touch 4th generation (and the ipad 2 ofcourse); devices without gyro, but with accelerometer/compass don't generate the required events
- Roll/banking of device is ignored, in part because krpanoJS does not support it and in part because it would conflict with mobile safari changing orientation in 90 degree steps
- As of yet there is no switch to turn the gyro on or off; if you have a gyro-enabled device, you get gyro-control. No opt-out (yet).
- The panorama jumps to a new position if you hold down the panorama, rotate the device, and then let go of the panorama.
- There's a small "stutter" if you drag the panorama and release it with a bit of inertia
- Autorotate is overruled.
- If you don't use "krpanoDiv" as the id of your embed div, you will have to edit the name in krpanogyro.js
I only just noticed the 0.8.14 prerelease; I have not tested with that version, but I don't see why it shouldn't work.
Note to Klaus: In the future (for this and other html viewer plugins) it would be nice if the javascript viewer could include js files as plugins through the xml, like the flash viewer can load (code-only) swf files as plugin.
Aldo