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 ready
boolean when all components are loaded
uiRefresh
boolean if the UI needs to be renderer
needsUpdate
boolean if the view needs to be renderer
fullscreen
boolean if the viewer is currently fullscreen
direction
external:THREE.Vector3 direction of the camera
vFov
number vertical FOV
hFov
number horizontal FOV
aspect
number viewer aspect ratio
autorotateEnabled
boolean automatic rotation is enabled
animationPromise
PSV.utils.Animation promise of the current animation
loadingPromise
Promise promise of the setPanorama method
littlePlanet
boolean special tweaks for LittlePlanetAdapter
idleTime
number time of the last user action
objectsObservers
object size
PSV.Size size of the container
panoData
PSV.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 options
PSV.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 pluginId
Class.<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 userDataKey
string only objects with the following
userData
will be emittedlistener
EventListener must implement
handleEvent
Returns:
Type Description function call to stop the subscription -
Refresh UI
-
-
Restarts the idle timer (if
autorotateIdle=true
) -
-
Resizes the viewer
-
Name Type Description size
PSV.CssSize -
Rotates the view to specific longitude and latitude
-
Name Type Description position
PSV.ExtendedPosition Fires:
-
Update options
-
Name Type Description option
string value
any Fires:
Throws:
-
when the configuration is incorrect
- Type
- PSV.PSVError
-
-
Update options
-
Name Type Description options
PSV.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
opacity
number 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
options
PSV.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 message
string -
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_fov
andmin_fov
-
Name Type Description level
number new zoom level from 0 to 100
Fires:
-
Increases the zoom level
-
Name Type Default Description step
number 1 optional -
Decreases the zoom level
-
Name Type Default Description step
number 1 optional