Adds gyroscope controls on mobile devices
Name | Type | Description |
---|---|---|
psv |
PSV.Viewer | |
options |
PSV.plugins.GyroscopePlugin.Options |
Extends
Members
-
Available events
-
-
Unique identifier of the plugin
-
-
psv PSV.Viewer readonly inherited overrides
Reference to main controller
-
Methods
-
destroy () package overrides
-
-
init () package overrides
-
-
Checks if the gyroscope is enabled
-
Returns:
Type Description boolean -
Enables the gyroscope navigation if available
-
Fires:
Throws:
-
if the gyroscope API is not available/granted
- Type
- PSV.PSVError
Returns:
Type Description Promise -
-
Disables the gyroscope navigation
-
Fires:
-
Enables or disables the gyroscope navigation
-
Type Definitions
-
Properties:
Name Type Argument Default Description touchmove
boolean <optional>
true allows to pan horizontally when the gyroscope is enabled (requires global
mousemove=true
)absolutePosition
boolean <optional>
false when true the view will ignore the current direction when enabling gyroscope control
moveMode
'smooth' | 'fast' <optional>
'smooth' How the gyroscope data is used to rotate the panorama.
Events
-
Triggered when the gyroscope mode is enabled/disabled
-
Name Type Description enabled
boolean