Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

json-config-parameters.md 8.0 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316
  1. # JSON Configuration File Options
  2. ## General options
  3. ### `type`
  4. This specifies the panorama type. Can be `equirectangular`, `cubemap`, or
  5. `multires`. Defaults to `equirectangular`.
  6. ### `title`
  7. If set, the value is displayed as the panorama's title. If no title is desired,
  8. don't set this parameter.
  9. ### `author`
  10. If set, the value is displayed as the panorama's author. If no author is
  11. desired, don't set this parameter.
  12. ### `basePath`
  13. This specifies a base path to load the images from.
  14. ### `autoLoad`
  15. When set to `true`, the panorama will automatically load. When `false`, the
  16. user needs to click on the load button to load the panorama. Defaults to
  17. `false`.
  18. ### `autoRotate`
  19. Setting this parameter causes the panorama to automatically rotate when loaded.
  20. The value specifies the rotation speed in degrees per second. Positive is
  21. counter-clockwise, and negative is clockwise.
  22. ### `autoRotateInactivityDelay`
  23. Sets the delay, in milliseconds, to start automatically rotating the panorama
  24. after user activity ceases. This parameter only has an effect if the
  25. `autoRotate` parameter is set.
  26. ### `autoRotateStopDelay`
  27. Sets the delay, in milliseconds, to stop automatically rotating the panorama
  28. after it is loaded. This parameter only has an effect if the `autoRotate`
  29. parameter is set.
  30. ### `fallback`
  31. If set, the value is used as a URL for a fallback viewer in case Pannellum is
  32. not supported by the user's device. The user will be given the option to click
  33. a link and visit this URL if Pannellum fails to work.
  34. ### `header`
  35. If this parameter is set, the contents of its value will be inserted into the
  36. header of `pannellum.htm`. This is useful if one wants to modify Pannellum's
  37. CSS.
  38. ### `showZoomCtrl`
  39. If set to `false`, the zoom controls will not be displayed. Defaults to `true`.
  40. ### `showFullscreenCtrl`
  41. If set to `false`, the fullscreen control will not be displayed. Defaults to
  42. `true`. The fullscreen button will only be displayed if the browser supports
  43. the fullscreen API.
  44. ### `yaw`
  45. Sets the panorama's starting yaw position in degrees. Defaults to `0`.
  46. ### `pitch`
  47. Sets the panorama's starting pitch position in degrees. Defaults to `0`.
  48. ### `hfov`
  49. Sets the panorama's starting horizontal field of view in degrees. Defaults to
  50. `100`.
  51. ### `minYaw` and `maxYaw`
  52. Sets the minimum / maximum yaw the viewer can be centered at, in degrees.
  53. Defaults to `-360` / `360`, i.e. no limit.
  54. ### `minPitch` and `maxPitch`
  55. Sets the minimum / maximum pitch the viewer can be centered at, in degrees.
  56. Defaults to `-85` / `85`.
  57. ### `minHfov` and `maxHfov`
  58. Sets the minimum / maximum horizontal field of view, in degrees, that the
  59. viewer can be set to. Defaults to `50` / `120`.
  60. ### `compass`
  61. If `true`, a compass is displayed. Defaults to `false`.
  62. ### `northOffset`
  63. Set the offset, in degrees, of the center of the panorama from North. As this
  64. affects the compass, it only has an effect if `compass` is set to `true`.
  65. ### `hotSpots`
  66. This specifies an array of hot spots that can be links to other scenes,
  67. information, or external links. Each array element has the following properties.
  68. #### `pitch`
  69. Specifies the pitch portion of the hot spot's location.
  70. #### `yaw`
  71. Specifies the yaw portion of the hot spot's location.
  72. #### `type`
  73. Specifies the type of the hot spot. Can be `scene` for scene links or `info`
  74. for information hot spots. A tour configuration file is required for `scene`
  75. hot spots.
  76. #### `text`
  77. This specifies the text that is displayed when the user hovers over the hot
  78. spot.
  79. #### `URL`
  80. If specified for an `info` hot spot, the hot spot links to the specified URL.
  81. Not applicable for `scene` hot spots.
  82. #### `sceneId`
  83. Specifies the ID of the scene to link to for `scene` hot spots. Not applicable
  84. for `info` hot spots.
  85. #### `targetPitch`
  86. Specifies the pitch of the target scene.
  87. #### `targetYaw`
  88. Specifies the yaw of the target scene.
  89. ### `hotSpotDebug`
  90. When `true`, the mouse pointer's pitch and yaw are logged to the console when
  91. the mouse button is clicked. Defaults to `false`.
  92. ### `sceneFadeDuration`
  93. Specifies the fade duration, in milliseconds, when transitioning between
  94. scenes. Not defined by default. Only applicable for tours. Only works with
  95. WebGL renderer.
  96. ## `equirectangular` specific options
  97. ### `panorama`
  98. Sets the URL to the equirectangular panorama image. This is relative to
  99. `basePath` if it is set, else it is relative to the location of
  100. `pannellum.htm`. An absolute URL can also be used.
  101. ### `haov`
  102. Sets the panorama's horizontal angle of view, in degrees. Defaults to `360`.
  103. This is used if the equirectangular image does not cover a full 360 degrees in
  104. the horizontal.
  105. ### `vaov`
  106. Sets the panorama's vertical angle of view, in degrees. Defaults to `180`. This
  107. is used if the equirectangular image does not cover a full 180 degrees in the
  108. vertical.
  109. ### `vOffset`
  110. Sets the vertical offset of the center of the equirectangular image from the
  111. horizon, in degrees. Defaults to `0`. This is used if `vaov` is less than `180`
  112. and the equirectangular image is not cropped symmetrically.
  113. ### `ignoreGPanoXMP`
  114. If set to `true`, any embedded Photo Sphere XMP data will be ignored; else,
  115. said data will override any existing settings. Defaults to `false`.
  116. ## `cubemap` specific options
  117. ### `cubeMap`
  118. This is an array of URLs for the six cube faces in the order front, right,
  119. back, left, up, down. These are relative to `basePath` if it is set, else they
  120. are relative to the location of `pannellum.htm`. Absolute URLs can also be
  121. used.
  122. ## `multires` specific options
  123. ### `multiRes`
  124. This contains information about the multiresolution panorama in sub-keys.
  125. #### `basePath`
  126. This is the base path of the URLs for the multiresolution tiles. It is relative
  127. to the regular `basePath` option if it is defined, else it is relative to the
  128. location of `pannellum.htm`. An absolute URL can also be used.
  129. #### `path`
  130. This is a format string for the location of the multiresolution tiles, relative
  131. to `multiRes.basePath`, which is relative to `basePath`. Format parameters are
  132. `%l` for the zoom level, `%s` for the cube face, `%x` for the x index, and
  133. `%y` for the y index. For each tile, `.extension` is appended.
  134. #### `fallbackPath`
  135. This is a format string for the location of the fallback tiles for the CSS 3D
  136. transform-based renderer if the WebGL renderer is not supported, relative
  137. to `multiRes.basePath`, which is relative to `basePath`. The only format
  138. parameter is `%s`, for the cube face. For each face, `.extension` is appended.
  139. #### `extension`
  140. Specifies the tiles' file extension. Do not include the `.`.
  141. #### `tileResolution`
  142. This specifies the size in pixels of each image tile.
  143. #### `maxLevel`
  144. This specifies the maximum zoom level.
  145. #### `cubeResolution`
  146. This specifies the size in pixels of the full resolution cube faces the image
  147. tiles were created from.
  148. ## Video specific options
  149. Currently, only equirectangular videos are supported.
  150. ### `video`
  151. The panorama is considered a video when this is set to `true`. Defaults to
  152. `false`.
  153. ### `panoramas`
  154. This parameter's value contains an array of objects designating the
  155. equirectangular video in various formats. Each object has a `file` property
  156. that contains the video's URL and a `type` property that contains the video's
  157. MIME type. Pannellum attempts to use video files in the order they are
  158. specified, so preferred formats should be placed first. An error is displayed
  159. if the user's browser does not support any of the specified formats. This
  160. parameter only has an effect is `video` is set to `true`.
  161. ## Additional information for tour configuration files
  162. A tour configuration file contains two top level properties, `default` and
  163. `scenes`. The `default` property contains options that are used for each scene,
  164. but options specified for individual scenes override these options. The
  165. `default` property is required to have a `firstScene` property that contains
  166. the scene ID for the first scene to be displayed. The `scenes` property
  167. contains a dictionary of scenes, specified by scene IDs. The values assigned to
  168. these IDs are specific to each scene.