Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 
 

77 рядки
4.6 KiB

  1. <!DOCTYPE HTML>
  2. <html>
  3. <head>
  4. <title>Pannellum Embed Configuration</title>
  5. <meta charset="utf-8">
  6. <link type="text/css" rel="Stylesheet" href="css/pannellum.css" />
  7. <script>
  8. function processForm(form) {
  9. var embed_code = document.getElementById('embed_code');
  10. embed_code.innerHTML = '<iframe' +
  11. ' width="' + escape(form.embed_width.value) +
  12. '" height="' + escape(form.embed_height.value) +
  13. '" allowfullscreen style="border-style:none;' +
  14. '" src="' + escape(form.pannellum_url.value) +
  15. '#panorama=' + escape(form.pano_url.value);
  16. if(form.pano_title.value != '')
  17. embed_code.innerHTML += '&amp;amp;title=' + escape(form.pano_title.value);
  18. if(form.pano_author.value != '')
  19. embed_code.innerHTML += '&amp;amp;author=' + escape(form.pano_author.value);
  20. if(form.autoload.checked)
  21. embed_code.innerHTML += '&amp;amp;autoLoad=true';
  22. if(form.autorotate.value != 'none')
  23. embed_code.innerHTML += '&amp;amp;autoRotate=' + escape(form.autorotate.value);
  24. if(form.fallback_url.value != '')
  25. embed_code.innerHTML += '&amp;amp;fallback=' + escape(form.fallback_url.value);
  26. if(form.hfov.value != 0)
  27. embed_code.innerHTML += '&amp;amp;hfov=' + escape(form.hfov.value);
  28. if(form.pitch.value != 0)
  29. embed_code.innerHTML += '&amp;amp;pitch=' + escape(form.pitch.value);
  30. if(form.yaw.value != 0)
  31. embed_code.innerHTML += '&amp;amp;yaw=' + escape(form.yaw.value);
  32. if(form.preview_url.value != '')
  33. embed_code.innerHTML += '&amp;amp;preview=' + escape(form.preview_url.value);
  34. if(form.haov.value != 0)
  35. embed_code.innerHTML += '&amp;amp;haov=' + escape(form.haov.value);
  36. if(form.vaov.value != 0)
  37. embed_code.innerHTML += '&amp;amp;vaov=' + escape(form.vaov.value);
  38. if(form.voffset.value != 0)
  39. embed_code.innerHTML += '&amp;amp;vOffset=' + escape(form.voffset.value);
  40. embed_code.innerHTML += '"></iframe>';
  41. return false;
  42. }
  43. </script>
  44. </head>
  45. <body>
  46. <form name="embed_gen_form" onsubmit="return processForm(embed_gen_form); return false;">
  47. Pannellum Location:<br>
  48. <input name="pannellum_url" placeholder="pannellum.htm Location" required><p>
  49. Panorama URL:<br>
  50. <input name="pano_url" placeholder="Image File" required><p>
  51. Panorama Preview URL (optional):<br>
  52. <input name="preview_url" placeholder="Image File"><p>
  53. Basic Information:<br>
  54. <input name="pano_title" placeholder="Title"> <input name="pano_author" placeholder="Author"><p>
  55. Partial Panorama (degrees) (optional):<br>
  56. <input name="haov" type="number" min="0" max="360" placeholder="Horizontal Angle of View"> <input name="vaov" type="number" min="0" max="180" placeholder="Vertical Angle of View"> <input name="voffset" type="number" min="-90" max="90" placeholder="Vertical Offset"><p>
  57. Embed Size:<br>
  58. <input name="embed_width" type="number" min="200" placeholder="Width" required> <input name="embed_height" type="number" min="150" placeholder="Height" required><p>
  59. Initial Parameters (degrees) (optional):<br>
  60. <input name="hfov" type="number" min="40" max="100" placeholder="Horizontal Field of View"> <input name="pitch" type="number" min="-85" max="85" placeholder="Pitch"> <input name="yaw" type="number" min="-180" max="180" placeholder="Yaw"><p>
  61. Auto Load: <input name="autoload" type="checkbox"><p>
  62. Auto Rotate:
  63. <select name="autorotate">
  64. <option value="none">None</option>
  65. <option value="cw">CW</option>
  66. <option value="ccw">CCW</option>
  67. </select><p>
  68. URL to fall back to if WebGL is not supported:<br>
  69. <input name="fallback_url" placeholder="Fallback URL"><p>
  70. <input type="submit" value="Generate" onclick="document.getElementById('embed_code').innerHTML = ''"><p>
  71. </form>
  72. <textarea id="embed_code" style="resize: none; height:200px;" onclick="this.select()" cols="100" readonly></textarea>
  73. </body>
  74. </html>