Przeglądaj źródła

Enable additional URL configuration parameters

Now the following can also be set from URL:
  - minHfov, maxHfov
  - minPitch, maxPitch
  - minYaw, maxYaw

The motivation for this was making it easier to create auto-generated
panoramas using Jekyll/Hugo and other static site generators without
needing to create JSON files for panoramas.

If a given panorama is not a full 360x180 panorama, then the above
parameters are needed in addition to haov and vaov parameters
in order for the user not to see black areas in the panorama.
Hence suggesting adding URL support.
pull/160/head
Janne Cederberg 8 lat temu
rodzic
commit
1849053d12
2 zmienionych plików z 3 dodań i 1 usunięć
  1. +2
    -1
      doc/url-config-parameters.md
  2. +1
    -0
      src/standalone/standalone.js

+ 2
- 1
doc/url-config-parameters.md Wyświetl plik

@@ -14,6 +14,7 @@ Specifies the URL of a JSON configuration file.
## Other parameters

A subset of the JSON configuration file options can be used as URL parameters.
These include `panorama`, `config`, `author`, `title`, `hfov`, `pitch`, `yaw`,
These include `panorama`, `config`, `author`, `title`, `hfov`, `minHfov`, `maxHfov`,
`pitch`, `minPitch`, `maxPitch`, `yaw`, `minYaw`, `maxYaw`,
`haov`, `vaov`, `vOffset`, `autoLoad`, `autoRotate`, `firstScene`,
`ignoreGPanoXMP`, `preview`, and `fallback`.

+ 1
- 0
src/standalone/standalone.js Wyświetl plik

@@ -21,6 +21,7 @@ function parseURLParameters() {
json += '"' + option + '":';
switch(option) {
case 'hfov': case 'pitch': case 'yaw': case 'haov': case 'vaov':
case 'minHfov': case 'maxHfov': case 'minPitch': case 'maxPitch': case 'minYaw': case 'maxYaw':
case 'vOffset': case 'autoRotate':
json += value;
break;


Ładowanie…
Anuluj
Zapisz