瀏覽代碼

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 年之前
父節點
當前提交
1849053d12
共有 2 個檔案被更改,包括 3 行新增1 行删除
  1. +2
    -1
      doc/url-config-parameters.md
  2. +1
    -0
      src/standalone/standalone.js

+ 2
- 1
doc/url-config-parameters.md 查看文件

@@ -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 查看文件

@@ -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;


Loading…
取消
儲存