Main class
| Name | Type | Description |
|---|---|---|
options |
PSV.Options |
Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
Extends
Members
-
adapter PSV.adapters.AbstractAdapter packagereadonly
Render adapter
-
-
children Array.<PSV.components.AbstractComponent> packagereadonly
All child components
-
-
config PSV.Options readonly
Configuration holder
-
-
Main container
-
-
dataHelper PSV.services.DataHelper readonly
-
-
dynamics Record.<string, PSV.utils.Dynamic> package
-
-
eventsHandler PSV.services.EventsHandler readonly
-
-
loader PSV.components.Loader readonly
-
-
navbar PSV.components.Navbar readonly
-
-
notification PSV.components.Notification readonly
-
-
overlay PSV.components.Overlay readonly
-
-
panel PSV.components.Panel readonly
-
-
Top most parent
-
-
plugins Object.<string, PSV.plugins.AbstractPlugin> packagereadonly
All plugins
-
-
Internal properties
-
Properties:
Name Type Description readyboolean when all components are loaded
uiRefreshboolean if the UI needs to be renderer
needsUpdateboolean if the view needs to be renderer
fullscreenboolean if the viewer is currently fullscreen
directionexternal:THREE.Vector3 direction of the camera
vFovnumber vertical FOV
hFovnumber horizontal FOV
aspectnumber viewer aspect ratio
autorotateEnabledboolean automatic rotation is enabled
animationPromisePSV.utils.Animation promise of the current animation
loadingPromisePromise promise of the setPanorama method
littlePlanetboolean special tweaks for LittlePlanetAdapter
idleTimenumber time of the last user action
objectsObserversobject sizePSV.Size size of the container
panoDataPSV.PanoData panorama metadata, if supported
-
renderer PSV.services.Renderer readonly
-
-
textureLoader PSV.services.TextureLoader readonly
-
-
tooltip PSV.services.TooltipRenderer readonly
-
Methods
-
Stops all current animations
-
Returns:
Type Description Promise -
animate (options)PSV.utils.Animation
Rotates and zooms the view with a smooth animation
-
Name Type Description optionsPSV.AnimateOptions position and/or zoom level
Returns:
Type Description PSV.utils.Animation -
Resizes the canvas when the window is resized
-
Fires:
-
Destroys the viewer
-
The memory used by the ThreeJS context is not totally cleared. This will be fixed as soon as possible.
-
Stops the idle timer
-
-
Enters the fullscreen mode
-
Fires:
-
Exits the fullscreen mode
-
Fires:
-
getPlugin (pluginId)PSV.plugins.AbstractPlugin
Returns the instance of a plugin if it exists
-
Name Type Description pluginIdClass.<PSV.plugins.AbstractPlugin> | string Returns:
Type Description PSV.plugins.AbstractPlugin -
getPosition ()PSV.Position
Returns the current position of the camera
-
Returns:
Type Description PSV.Position -
getSize ()PSV.Size
Returns the current viewer size
-
Returns:
Type Description PSV.Size -
Returns the current zoom level
-
Returns:
Type Description number -
Hides the error message
-
-
Checks if the automatic rotation is enabled
-
Returns:
Type Description boolean -
Checks if the viewer is in fullscreen
-
Returns:
Type Description boolean -
Flags the view has changed for the next render
-
-
Subscribes to events on objects in the scene
-
Name Type Description userDataKeystring only objects with the following
userDatawill be emittedlistenerEventListener must implement
handleEventReturns:
Type Description function call to stop the subscription -
Refresh UI
-
-
Restarts the idle timer (if
autorotateIdle=true) -
-
Resizes the viewer
-
Name Type Description sizePSV.CssSize -
Rotates the view to specific longitude and latitude
-
Name Type Description positionPSV.ExtendedPosition Fires:
-
Update options
-
Name Type Description optionstring valueany Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
Update options
-
Name Type Description optionsPSV.Options Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
Loads a new overlay
-
Name Type Default Description path* URL of the new overlay file
opacitynumber 1 optional Returns:
Type Description Promise -
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.Name Type Description path* URL of the new panorama file
optionsPSV.PanoramaOptions optional Returns:
Type Description Promise.<boolean> resolves false if the loading was aborted by another call -
Displays an error message over the viewer
-
Name Type Description messagestring -
Starts the automatic rotation
-
Fires:
-
Enables the keyboard controls (done automatically when entering fullscreen)
-
-
Stops the ongoing animation
-
The return value is a Promise because the is no guaranty the animation can be stopped synchronously.
Returns:
Type Description Promise Resolved when the animation has ben cancelled -
Stops the automatic rotation
-
Fires:
-
Disables the keyboard controls (done automatically when exiting fullscreen)
-
-
Starts or stops the automatic rotation
-
Fires:
-
Enters or exits the fullscreen mode
-
Fires:
-
Zooms to a specific level between
max_fovandmin_fov -
Name Type Description levelnumber new zoom level from 0 to 100
Fires:
-
Increases the zoom level
-
Name Type Default Description stepnumber 1 optional -
Decreases the zoom level
-
Name Type Default Description stepnumber 1 optional