Ver a proveniência

Allow switching to dynamic scenes (fixes #686).

pull/688/head
Matthew Petroff há 6 anos
ascendente
cometimento
a057211989
2 ficheiros alterados com 14 adições e 0 eliminações
  1. +6
    -0
      doc/json-config-parameters.md
  2. +8
    -0
      src/js/pannellum.js

+ 6
- 0
doc/json-config-parameters.md Ver ficheiro

@@ -446,6 +446,12 @@ Currently, only equirectangular dynamic content is supported.
The panorama source is considered dynamic when this is set to `true`. Defaults
to `false`. This should be set to `true` for video.

### `dynamicUpdate` (boolean)

For dynamic content, viewer will start automatically updating when set to
`true`. Defaults to `false`. If the updates are controlled via the `setUpdate`
method, as with the Video.js plugin, this should be set to `false`.



## Additional information for tour configuration files


+ 8
- 0
src/js/pannellum.js Ver ficheiro

@@ -92,6 +92,7 @@ var defaultConfig = {
northOffset: 0,
showFullscreenCtrl: true,
dynamic: false,
dynamicUpdate: false,
doubleClickZoom: true,
keyboardZoom: true,
mouseZoom: true,
@@ -2287,6 +2288,13 @@ function loadScene(sceneId, targetPitch, targetYaw, targetHfov, fadeDone) {
}
fireEvent('scenechange', sceneId);
load();

// Properly handle switching to dynamic scenes
update = config.dynamicUpdate === true;
if (config.dynamic) {
panoImage = config.panorama;
onImageLoad();
}
}

/**


Carregando…
Cancelar
Guardar