Namespace: PSV

PSV

Classes

Animation

Interpolation helper for animations

PSVError

Custom error used in the lib

Viewer

Main class

ViewerCompat

Compatibility wrapper for version 3

Namespaces

buttons
components
plugins
services
utils

Members

PSV.DEFAULTS PSV.Options staticconstant

Default options

PSV.SYSTEM staticconstant

General information about the system

Properties:
Name Type Description
loaded boolean

Indicates if the system has been loaded yet

load function

Loads the system if not already loaded

pixelRatio number
isWebGLSupported boolean
maxTextureWidth number
maxCanvasWidth number
mouseWheelEvent string
fullscreenEvent string
isTouchEnabled Promise.<boolean>

Methods

PSV.registerButton (button) static

Register a new button available for all viewers

Name Type Description
button Class.<PSV.buttons.AbstractButton>

Type Definitions

PSV.AnimateOptions PSV.ExtendedPosition

Object defining animation options

Properties:
Name Type Argument Description
speed number | string

animation speed or duration (in milliseconds)

zoom number <optional>

new zoom level between 0 and 100

PSV.ClickData Object

Data of the click event

Properties:
Name Type Argument Description
rightclick boolean

if it's a right click

clientX number

position in the browser window

clientY number

position in the browser window

viewerX number

position in the viewer

viewerY number

position in the viewer

longitude number

position in spherical coordinates

latitude number

position in spherical coordinates

textureX number <optional>

position on the texture, undefined for cubemaps

textureY number <optional>

position on the texture, undefined for cubemaps

marker PSV.plugins.MarkersPlugin.Marker <optional>

clicked marker

PSV.CssSize Object

Object defining a size in CSS (px, % or auto)

Properties:
Name Type Argument Description
width string <optional>
height string <optional>

PSV.Cubemap Object

Object defining a cubemap

Properties:
Name Type Description
top string
right string
bottom string
left string
front string
back string

PSV.ExtendedPosition PSV.Position

Object defining a spherical or texture position

A position that can be expressed either in spherical coordinates (radians or degrees) or in texture coordinates (pixels)

Properties:
Name Type Argument Description
longitude number <optional>
latitude number <optional>
x number <optional>
y number <optional>

PSV.NavbarCustomButton Object

Definition of a custom navbar button

Properties:
Name Type Argument Default Description
id string <optional>
title string <optional>
content string <optional>
className string <optional>
onClick function
disabled boolean <optional>
false
visible boolean <optional>
true
collapsable boolean <optional>
true

PSV.Options Object

Viewer options, see http://photo-sphere-viewer.js.org/guide/config.html

PSV.PanoData Object

Crop information of the panorama

Properties:
Name Type Description
fullWidth number
fullHeight number
croppedWidth number
croppedHeight number
croppedX number
croppedX number

PSV.PanoDataProvider (image)PSV.PanoData

Function to compute panorama data once the image is loaded

Name Type Description
image Image

loaded image

Returns:
Type Description
PSV.PanoData computed panorama data

PSV.PanoramaOptions PSV.AnimateOptions

Object defining panorama and animation options

Properties:
Name Type Argument Default Description
transition boolean | number <optional>
1500

duration of the transition between all and new panorama

showLoader boolean <optional>
true

show the loader

sphereCorrection PSV.SphereCorrection <optional>

new sphere correction to apply to the panorama

panoData PSV.PanoData | PSV.PanoDataProvider <optional>

new panorama data used for this panorama

PSV.Point Object

Object defining a point

Properties:
Name Type Description
x number
y number

PSV.Position Object

Object defining a spherical position

Properties:
Name Type Description
longitude number
latitude number

PSV.Size Object

Object defining a size

Properties:
Name Type Description
width number
height number

PSV.SphereCorrection Object

Properties:
Name Type Description
pan number
tilt number
roll number

PSV.TextureData Object

Result of the PSV.TextureLoader#loadTexture method

Properties:
Name Type Argument Description
texture external:THREE.Texture | Array.<external:THREE.Texture>
panoData PSV.PanoData <optional>