News Examples Documentation Download Buy Forum Contact

Documentation

Plugins

XML Extensions

Tools


Third Party Software
for krpano

Gyroscope Plugin gyro.js Version 1.0.8.14
HTML5 only
Select Version:
by Aldo Hoeben - fieldofview.com
With contributions by Sjeiti and Klaus

Description

This plugin uses the gyroscope in iOS devices such as the iPhone 4 and iPad 2 to control the view in krpanoJS.

Note - krpano version 1.0.8.14 or higher is necessary to use this plugin!

Download

gyro.js  (plugin only)

The gyro sources and examples are available as part of the fovplugins package

fovplugins.zip  (plugin, source code & examples)

Syntax / XML Usage Example

<plugin name="gyro" devices="html5"
        url="gyro.js" 
        keep="true"
        enabled="true"
        camroll="true"
        friction="0.5"
        velastic="0.2"
        />

Plugin Attributes

available
This read-only attribute is only set to true if the browser/device is generating deviceorientation events. It can be used to determine if a ui for the gyroscope is applicable.
values: true/false, read-only
enabled
Enabled and/or disables the gyroscope for navigation.
values: true/false, default: true
camroll
Determines whether or not the camera rotates around the roll axis.
values: true/false, default: false
friction
Dampens the gyroscope values, making the result less "twitchy". 0 means no dampening, 1 is infinite dampening (ie: no gyroscope movement)
values: 0-1, default: 0.5
velastic
If set to a value greater than 0, the vlookat parameter returns to the device pitch after manually altering the view. The higher the value, the faster the view returns to the device pitch.
values: 0-1, default: 0

Example

Gyro Example (iPhone 4 and iPad 2 only)

License

CC-BY-3.0 The plugin can be used free of charge, in commercial or non-commercial applications. The source code is available under a Creative Commons Attribution license.

In a nutshell, this means you are free to use the software and its source code in your projects. If you use the source code in a another software project, you are required to add attribution to the author(s). You are encouraged to share the your source code under a similar fashion, but it is not a requirement.