Photo Sphere Viewer controller

Hierarchy

Constructors

Properties

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

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" | "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 Object

      the class of the event

    Parameters

    • type: T
    • callback: EventListenerObject | ((e) => void)
    • Optional options: boolean | AddEventListenerOptions
      Optional

    Returns void

  • Returns the instance of a plugin if it exists

    Type Parameters

    Parameters

    Returns T

    Example

    By plugin identifier

    viewer.getPlugin('markers')
    

    Example

    By plugin class with TypeScript support

    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" | "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 Object

      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" | "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) => void)
    • Optional options: boolean | EventListenerOptions
      Optional

    Returns void

  • Update options

    Type Parameters

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

    Parameters

    Returns void

    Throws

    PSVError if the configuration is invalid

  • Loads a new panorama file

    Parameters

    Returns Promise<boolean>

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

    Description

    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.

  • Stops the ongoing animation

    Returns PromiseLike<any>

    Description

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

  • Unsubscribes to events on objects

    Parameters

    • userDataKey: string

    Returns void

Generated using TypeDoc