X-Ptviewer

Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.


Goal

To enable PmWiki users to embed interactive panoramas into Wiki pages

Solution

Discussion

PTViewer is a java applet for viewing panoramas in web pages. This script enables PmWiki users to easily embed interactive panoramas into Wiki Pagesusing this applet.

Once installed (hopefully) the wiki markup:

 [[x-ptviewer:file=pano.jpg]]

will insert an interactive panorama using the image file 'pano.jpg' (which should be in an Equirectangular potential)

You can interact with the panorama by clicking and moving the mouse to pan and tilt; While panning, the control and shift keys zoom in and out; Alternatively, the arrow keys can be used for panning and tilting, and + and -, or > and < keys to zoom.

X-Ptviewer needs at least the variable 'file'.

Other (optional) variables include;-

  • width (320), width of panorama
  • height' (200), height of panorama
  • auto (0), auto pan speed
  • pfov (360), horizontal field of view of panorama
  • fov (70), initial field of view
  • fovmin (12) minimum field of view
  • fovmax (165) maximum field of view

Additional documentation is available within the script.

There are far more available parameters for PTViewer see the links below.

The PTViewer java program was written by Helmut Dersch, but is no longer available from his website. A slightly modified version by 'Big Ben' is available [(approve links) edit diff]. This has the additional pfov parameter which allows direct use of partial (<360 deg) panoramas.

Exstensive documentation for Helmut's version of PTViewer is available here and some on '[(approve links) edit diff]

The panorama file can be created from scratch or existing panoramas can be converted to Equirectangular projection using the [(approve links) edit diff] bundle of software. Note that some photo stitching software refer to Equirectangular projection as Spherical. (E.g [(approve links) edit diff])

Files

Installation

  1. Save the file x-ptviewer.php.0.1.1.txt to pmwiki/local/scripts
  2. Rename the file to x-ptviewer.php
  3. Next, add this line to your config.php file:
    include_once("local/scripts/x-ptviewer.php");
  4. Unzip the ptviewer.zip file and put the ptviewer.jar file into your pub directory.

History

  • Nov 18, 2004 - 0.1 Beta Release (Feel free improve/bug fix this).
  • Nov 19, 2004 - 0.1.1 Any parameter can now be passed to the ptviewer applet.
  • Nov 20, 2004 - 0.1.2 'Fixed' the problem Internet Explorer has width and height parameters.

Comments & Bugs

Contributors

pmwiki-2.3.32 -- Last modified by {{Chris Drew}}

from IP: 85.171.160.186 ip should be disabled by default for security reasons