Classes
Namespaces
Members
-
PSV.DEFAULTS PSV.Options staticconstant
Default options
-
-
General information about the system
-
Properties:
Name Type Description loaded
boolean Indicates if the system data has been loaded
load
function Loads the system if not already loaded
pixelRatio
number isWebGLSupported
boolean maxCanvasWidth
number mouseWheelEvent
string fullscreenEvent
string getMaxCanvasWidth
function Returns the max width of a canvas allowed by the browser
isTouchEnabled
Object
Methods
-
Register a new button available for all viewers
-
Name Type Description button
Class.<PSV.buttons.AbstractButton> defaultPosition
'start' | 'end' | '[id]:left' | '[id]:right' optional If provided the default configuration of the navbar will be modified.
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
-
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, if applicable
textureY
number <optional>
position on the texture, if applicable
marker
PSV.plugins.MarkersPlugin.Marker <optional>
clicked marker
objects
Array.<THREE.Object3D> <optional>
target
EventTarget <optional>
-
Object defining a size in CSS
-
Properties:
Name Type Argument Description width
string <optional>
height
string <optional>
-
PSV.ExtendedPosition PSV.Position | PSV.Point
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)
-
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 tabbable
boolean <optional>
true -
Viewer options, see https://photo-sphere-viewer.js.org/guide/config.html
-
-
Crop information of the panorama
-
Properties:
Name Type Argument Description fullWidth
number fullHeight
number croppedWidth
number croppedHeight
number croppedX
number croppedY
number poseHeading
number <optional>
posePitch
number <optional>
poseRoll
number <optional>
-
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.ExtendedPosition
Object defining panorama and animation options
-
Properties:
Name Type Argument Default Description caption
string <optional>
new navbar caption
description
string <optional>
new panel description
transition
boolean | number <optional>
1500 duration of the transition between all and new panorama
showLoader
boolean <optional>
true show the loader while loading the new panorama
zoom
number <optional>
new zoom level between 0 and 100
sphereCorrection
PSV.SphereCorrection <optional>
new sphere correction to apply to the panorama
panoData
PSV.PanoData | PSV.PanoDataProvider <optional>
new data used for this panorama
overlay
* <optional>
new overlay to apply to the panorama
overlayOpacity
number <optional>
new overlay opacity
-
Object defining a point
-
Properties:
Name Type Description x
number y
number -
Object defining a spherical position
-
Properties:
Name Type Description longitude
number latitude
number -
Object defining a size
-
Properties:
Name Type Description width
number height
number -
Object defining angular corrections to a sphere
-
Properties:
Name Type Description pan
number tilt
number roll
number -
Result of the PSV.adapters.AbstractAdapter#loadTexture method
-
Properties:
Name Type Argument Description panorama
* texture
external:THREE.Texture | Array.<external:THREE.Texture> | Record.<string, Array.<external:THREE.Texture>> panoData
PSV.PanoData <optional>
Events
-
Triggered when the automatic rotation is enabled/disabled
-
Name Type Description enabled
boolean -
Triggered before a render, used to modify the view
-
Name Type Description timestamp
number time provided by requestAnimationFrame
elapsed
number time elapsed from the previous frame
-
Triggered before a rotate operation, can be cancelled
-
Type Description PSV.ExtendedPosition -
Triggered when the user clicks on the viewer (everywhere excluding the navbar and the side panel)
-
Name Type Description data
PSV.ClickData -
Triggered when the panel is closed
-
Name Type Description id
string optional -
Triggered after a call to setOption/setOptions
-
Name Type Description name
Array.<string> of changed options
-
Triggered when the user double clicks on the viewer. The simple
click
event is always fired beforedblclick
-
Name Type Description data
PSV.ClickData -
Triggered when the fullscreen mode is enabled/disabled
-
Name Type Description enabled
boolean -
Called to alter the target position of an animation
-
Name Type Description position
Position Returns:
Type Description Position -
Called to alter the target position of a rotation
-
Name Type Description position
Position Returns:
Type Description Position -
Triggered when the notification is hidden
-
Name Type Description id
string optional -
Triggered when the overlay is hidden
-
Name Type Description id
string optional -
Triggered when the tooltip is hidden
-
Name Type Description Data
* associated to this tooltip
-
Triggered when a key is pressed, can be cancelled
-
Name Type Description key
string -
Triggered when the loader value changes
-
Name Type Description value
number from 0 to 100
-
Triggered when the panel is opened
-
Name Type Description id
string optional -
Triggered when a panorama image has been loaded
-
Name Type Description textureData
PSV.TextureData -
Triggered when the view longitude and/or latitude changes
-
Name Type Description position
PSV.Position -
Triggered when the panorama image has been loaded and the viewer is ready to perform the first render
-
-
Triggered on each viewer render, this event is triggered very often
-
-
Triggered when the notification is shown
-
Name Type Description id
string optional -
Triggered when the overlay is shown
-
Name Type Description id
string optional -
Triggered when the tooltip is shown
-
Name Type Description Data
* associated to this tooltip
Instance
PSV.components.Tooltip of the tooltip
-
Triggered when the viewer size changes
-
Name Type Description size
PSV.Size -
Triggered when all current animations are stopped
-
-
Triggered when the zoom level changes
-
Name Type Description zoomLevel
number