HomefieldOfView | SPi-V dev

Legend

  • required
  • not yet implemented

Navigation

user

<panoelement>

Description

Panoelement nodes are very versatile. In their most common form, they specify a projection and orientation for an image node they reference. Apart from image nodes, panoelement nodes can reference behaviors to create interactivity (eg hotspot actions).

A scene can have one or numerous panoelements. Elements with different projections can be mixed (eg adding a flat cap image to a spherical panorama), and panoelements without a visible image can still be used as hotspots.

Lastly, a panoelement is not required in a scene. A scene can also be made up of uielement nodes to display still images only.

Multiple panoelement nodes can be grouped in a panogroup node.

Image nodes, behaviors can either be referenced using their id, or they can be included as children of the panoelement node. Child nodes of one panoelement can still be referenced by other panoelements.

Syntax

<tour>
  <scene>
    <panoelement id="elementID" type="flat" 
      pan="0" tilt="-90" roll="0"
      hfov="20" vfov="20" hoffset="0" voffset="0"
      visible="true" enabled="true" zorder="0" blend="100"
      image="someImage" behavior="someBehavior">
      <image />
      <behavior />
    </panoelement>

    <panogroup>
      <panoelement id="elementID" type="spherical" 
        pan="0" tilt="0" roll="0"
        hfov="360" vfov="180" 
        image="someImage" behavior="someBehavior"  />
      </panoelement>
      ...
    </panogroup>

    <image id="someImage" />
    <behavior id="someBehavior" />
    ...
  </scene>
</tour>

Attributes

  • id
    Unique id to reference the group by.
  • type
    Specifies the projection type to be used by this element.
    Values:
    • flat
      'Normal' rectilinear images. For these images, hfov and vfov are limited to 170 degrees.
    • cubic
      A shortcut for 6 sqaure 'flat' images, collected into either a horizontal or vertical strip. The order of these images is 'front', 'right', 'back', 'left', 'top', 'bottom'. hfov and vfov are ignored for this type, as they are required to be 90. hoffset and voffset are ignored.
    • cylindrical
      Cylindrical projection, output by most single row stitchers. vfov is limited to 170 degrees. hoffset is ignored, use the pan value instead.
    • spherical
      Also known as equirectangular or psphere. hoffset is ignored, use the pan value instead.
    • fisheye
      'Fullframe' fisheye projection. Circular fisheye projections can be simulated by setting a circular alpha channel to the image for the element. hoffset and voffset are ignored.
    If the type attribute is omitted, the viewer can make a guess about the type of the supplied image, looking at the image dimensions:
    • cubic for images where width = 6 * height or height = 6 * width
    • spherical for images where width = 2 * height
    • cylindrical for images where width > 2* height
    • flat for other images
  • pan
    The amount of pan within the scene or panogroup.
    Values: -180 to 180, defaults to 0
  • tilt
    The amount of pan within the scene or panogroup.
    Values: -90 to 90, defaults to 0
  • roll
    The amount of roll within the scene or panogroup.
    Values: -180 to 180, defaults to 0
  • hfov
    Specifies the horizontal field of view of the panoelement. Ignored for cubic panoelements.
    Values: 0 to 360, may be limited by type attribute.Different default values for different projection types:
    • Flat defaults to 8, to facilitate displaying flat, zoomable images
    • Spherical, cylindrical defaults to 360
  • vfov
    This value is optional when hfov is specified, as it normally derives from the hfov, the referred image dimensions and the projection type. Can be used to create panoramas with non-square pixels (ie: different horizontal and vertical resolutions). Ignored for cubic panoelements.
    Values: 0 to 360, may be limited by type attribute
  • hoffset
    Horizontal offset of the element, specified in degrees. Used to display off-center images. Ignored for cubic, cylindrical, spherical and fisheye panoelements.
  • voffset
    Vertical offset of the element, specified in degrees. Used to display off-center images, such as spherical or cylindrical images where the horizon is not in the vertical center of the image. Ignored for cubic and fisheye panoelements.
  • zorder
    Sets the depth sort order of the element within its panogroup or within the scene.
    Values: 0 to 9, defaults to 0
  • blend
    Sets the opacity for the element. If blend is set to 0, behaviors attached to the element are still active even though the element is invisible.
    Values: 0 to 100, defaults to 100
  • visible
    Shows/hides all the the element and enabled/disables behaviors associated to it.
    Values: true/false
  • enabled
    enabled/disables behaviors associated to the element
    Values: true/false
  • antialias
    enabled/disables antialiasing for the image associated to this element
    Values: true/false. Defaults to false for spherical panoelements, and true for other panoelements
  • catchevents
    Marks the object 'active' for picking, even if it has no behaviors attached to it. This way it blocks other 'active' objects underneath it. Elements that are not marked with catchevents are invisible to the pointer; you 'click through' them even if they fully obscure an active element underneath.
    Values: true/false. Defaults to false

Events

  • enter
    Fires when the pointer is moved over the element.
  • leave
    Fires when the pointer leaves the element
  • press
    Fires when the user presses the mouse button while over the element.
  • release
    Fires when the user releases the mouse button after the press event has fired for this element.
  • ready
    Fires when the elements is done building.

Children

History

  • 19-May-09: Added fisheye which is included in SPi-V 1.4.10 and newer
  • 13-Mar-08: Removed references to fisheye, which will not be included in the SPi-V core
  • 01-Apr-07: Removed references to sound, added catchevents attribute
  • 14-Oct-05: Added events
  • 06-Jun-05: Updated zorder attribute
  • 8-Jun-04: Removed superfluous src attribute
  • 15-Apr-04: Initial version

Changing attributes on-the-fly

Currently, you cannot alter the hfov, vfov, hoffset or voffset of a panoelement on-the-fly using setProperty from an action, as these attributes would change the geometry of the displayed image.
Pan/tilt/roll are alterable, so you can make panoelements swing around within the panorama or roll on the spot.

Ian Wood
Spi-V engine 1.3 beta 10

Re: Changing attributes on-the-fly

SPi-V 1.4.3 added the ability to set the hfov, vfov, hoffset or voffset on the fly.