Photo Sphere Viewer controller

Hierarchy (view full)

Constructors

Properties

container: HTMLElement
dataHelper: DataHelper
loader: Loader
navbar: Navbar
notification: Notification
overlay: Overlay
panel: Panel
parent: HTMLElement
renderer: Renderer
textureLoader: TextureLoader
useNewAnglesOrder: boolean = true

Change the order in which the panoData and sphereCorrection angles are applied from 'ZXY' to 'YXZ'

Will be removed in version 5.12

Methods

  • Type Parameters

    • T extends
          | "click"
          | "dblclick"
          | "fullscreen"
          | "before-animate"
          | "before-render"
          | "before-rotate"
          | "config-changed"
          | "hide-notification"
          | "hide-overlay"
          | "hide-panel"
          | "hide-tooltip"
          | "key-press"
          | "load-progress"
          | "panorama-load"
          | "panorama-loaded"
          | "panorama-error"
          | "transition-done"
          | "position-updated"
          | "roll-updated"
          | "ready"
          | "render"
          | "show-notification"
          | "show-overlay"
          | "show-panel"
          | "show-tooltip"
          | "size-updated"
          | "stop-all"
          | "zoom-updated"
          | "enter-object"
          | "leave-object"
          | "hover-object"

      the name of event

    • E extends ViewerEvents & {
          type: T;
      }

      the class of the event

    Parameters

    • type: T
    • callback: EventListenerObject | ((e: E) => void)
    • Optionaloptions: boolean | AddEventListenerOptions

    Returns void

  • Returns the instance of a plugin if it exists

    Type Parameters

    Parameters

    Returns T

    viewer.getPlugin('markers')
    
    viewer.getPlugin<MarkersPlugin>(MarkersPlugin)
    
  • Request the scene to be continuously renderer (when using videos)

    Parameters

    • enabled: boolean

    Returns void

  • Subscribes to events on objects in the three.js scene

    Parameters

    • userDataKey: string

      only objects with the following userData will be observed

    Returns void

  • Type Parameters

    • T extends
          | "click"
          | "dblclick"
          | "fullscreen"
          | "before-animate"
          | "before-render"
          | "before-rotate"
          | "config-changed"
          | "hide-notification"
          | "hide-overlay"
          | "hide-panel"
          | "hide-tooltip"
          | "key-press"
          | "load-progress"
          | "panorama-load"
          | "panorama-loaded"
          | "panorama-error"
          | "transition-done"
          | "position-updated"
          | "roll-updated"
          | "ready"
          | "render"
          | "show-notification"
          | "show-overlay"
          | "show-panel"
          | "show-tooltip"
          | "size-updated"
          | "stop-all"
          | "zoom-updated"
          | "enter-object"
          | "leave-object"
          | "hover-object"

      the name of event

    • E extends ViewerEvents & {
          type: T;
      }

      the class of the event

    Parameters

    • type:
          | "click"
          | "dblclick"
          | "fullscreen"
          | "before-animate"
          | "before-render"
          | "before-rotate"
          | "config-changed"
          | "hide-notification"
          | "hide-overlay"
          | "hide-panel"
          | "hide-tooltip"
          | "key-press"
          | "load-progress"
          | "panorama-load"
          | "panorama-loaded"
          | "panorama-error"
          | "transition-done"
          | "position-updated"
          | "roll-updated"
          | "ready"
          | "render"
          | "show-notification"
          | "show-overlay"
          | "show-panel"
          | "show-tooltip"
          | "size-updated"
          | "stop-all"
          | "zoom-updated"
          | "enter-object"
          | "leave-object"
          | "hover-object"
    • callback: EventListenerObject | ((e: E) => void)
    • Optionaloptions: boolean | EventListenerOptions

    Returns void

  • Update options

    Type Parameters

    • T extends
          | "description"
          | "caption"
          | "mousemove"
          | "defaultYaw"
          | "defaultPitch"
          | "moveInertia"
          | "fisheye"
          | "requestHeaders"
          | "navbar"
          | "keyboard"
          | "downloadUrl"
          | "downloadName"
          | "loadingImg"
          | "loadingTxt"
          | "size"
          | "minFov"
          | "maxFov"
          | "defaultZoomLvl"
          | "sphereCorrection"
          | "moveSpeed"
          | "zoomSpeed"
          | "mousewheel"
          | "mousewheelCtrlKey"
          | "touchmoveTwoFingers"
          | "canvasBackground"
          | "rendererParameters"
          | "withCredentials"
          | "lang"
          | "keyboardActions"

    Parameters

    Returns void

    PSVError if the configuration is invalid

  • Loads a new panorama file Loads a new panorama file, optionally changing the camera position/zoom and activating the transition animation.
    If the "options" parameter is not defined, the camera will not move and the ongoing animation will continue.
    If another loading is already in progress it will be aborted.

    Parameters

    Returns Promise<boolean>

    promise resolved with false if the loading was aborted by another call

  • Stops the ongoing animation The return value is a Promise because the is no guaranty the animation can be stopped synchronously.

    Returns PromiseLike<any>