News Examples Documentation Download Buy Forum Contact

Documentation

Plugins

XML Extensions

Tools


Third Party Software
for krpano

Orientation Plugin orientation.js for HTML5
by Aldo Hoeben - fieldofview.com

Description

This plugin detects changes in the device orientation so the tour can, for example, adjust its interface to either landscape or portrait displays.

Download

orientation.js  (plugin only)

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

fovplugins.zip  (plugin, source code & examples)

Syntax / XML Usage Example

<plugin name="orientation" 
        url="orientation.js" 
        keep="true"
        devices="HTML5"
        onorientationchange="updateorientation();"
        />

Plugin Attributes

onorientationchange
Actions / functions that will be called when there is an orientationchange event occurs.
values: function or action-name
portrait
If true, the device is in portrait mode.
values: true/false, read-only
landscape
If false, the device is in landscape mode.
values: true/false, read-only
orientation
The raw orientation value reported by the browser.
values: 0,90,180,-90, read-only

Example

CLICK TO VIEW EXAMPLE

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 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.

If you use the plugins regularly, you may consider making a donation so I can afford to continue making these plugins and making them available.