diff --git a/docs/guide/config.md b/docs/guide/config.md index 32dcb8658..22674df2f 100644 --- a/docs/guide/config.md +++ b/docs/guide/config.md @@ -6,10 +6,6 @@ Photo Sphere Viewer uses a lot of angles for its configuration, most of them can be defined in radians by using a simple number (`3.5`) or in degrees using the "deg" suffix (`'55deg'`). ::: -::: tip Positions definitions -Some methods takes positionnal arguments, this is either on combination `yaw` and `pitch` (radians or degrees) or `textureX` and `textureY` properties (corresponding to the pixel position on the source panorama file). -::: - ## Standard options #### `container` (required) @@ -348,7 +344,7 @@ keyboardActions: { Configure keyboard actions. It is a map defining key code->action. (all the available actions are listed above) -Since 5.0.2 you can configure an arbitrary callback to any key. +You can also configure an arbitrary callback to any key. ```js keyboardActions: { @@ -367,6 +363,10 @@ keyboardActions: { }, ``` +::: warning +Keyboard actions will only be available in fullscreen by default, this can be changed with the [`keyboard` option](#keyboard). +::: + #### `rendererParameters` - type: [`WebGLRendererParameters`](https://threejs.org/docs/#api/en/renderers/WebGLRenderer) diff --git a/docs/guide/methods.md b/docs/guide/methods.md index dea580e0f..a26cde197 100644 --- a/docs/guide/methods.md +++ b/docs/guide/methods.md @@ -27,6 +27,10 @@ viewer.addEventListener('ready', () => { This section describes the most useful methods available. +::: tip Positions definitions +Some methods takes positionnal arguments, this is either on combination `yaw` and `pitch` (radians or degrees) or `textureX` and `textureY` properties, corresponding to the pixel position on the source panorama file. +::: + ### `animate(options): Animation` Rotate and zoom the view with a smooth animation. You can change the position (`yaw`, `pitch` or `textureX`, `textureY`) and the zoom level (`zoom`). @@ -49,6 +53,10 @@ viewer.animate({ Remove the viewer from the page and free the memory used by Three.js. +### `getPlugin(pluginId): PluginInstance` + +Return the instance of plugin, more details on [the dedicated page](../plugins/README.md). + ### `getPosition(): Position` Return the current position of the view. @@ -109,6 +117,10 @@ viewer.setPanorama('image.jpg', { }); ``` -### `zoom(level)` | `zoomIn()` | `zoomOut()` +### `setOverlay(overlay[, opacity]): Promise` + +Change the current [overlay](./config.md#overlay) without changing the panorama. + +### `zoom(level)` | `zoomIn([step = 1])` | `zoomOut([step = 1])` Change the zoom level without animation.