You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

configuration.htm 5.5 KiB

13 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. {
  10. var embed_code = document.getElementById('embed_code');
  11. embed_code.innerHTML = '<iframe title="pannellum panorama viewer"' +
  12. ' width="' + escape(form.embed_width.value) +
  13. '" height="' + escape(form.embed_height.value) +
  14. '" allowfullscreen' +
  15. ' style="border-style:none;"' +
  16. '" src="' + escape(form.pannellum_url.value) +
  17. '?' +
  18. 'panorama=' + escape(form.pano_url.value);
  19. if(form.pano_title.value != '') {
  20. embed_code.innerHTML += '&amp;amp;title=' + escape(form.pano_title.value);
  21. }
  22. if(form.pano_author.value != '') {
  23. embed_code.innerHTML += '&amp;amp;author=' + escape(form.pano_author.value);
  24. }
  25. if(form.autoload.checked) {
  26. embed_code.innerHTML += '&amp;amp;autoLoad=true';
  27. }
  28. if(form.autorotate.value != 'none') {
  29. embed_code.innerHTML += '&amp;amp;autoRotate=' + escape(form.autorotate.value);
  30. }
  31. if(form.fallback_url.value != '') {
  32. embed_code.innerHTML += '&amp;amp;fallback=' + escape(form.fallback_url.value);
  33. }
  34. if(form.hfov.value != 0) {
  35. embed_code.innerHTML += '&amp;amp;hfov=' + escape(form.hfov.value);
  36. }
  37. if(form.pitch.value != 0) {
  38. embed_code.innerHTML += '&amp;amp;pitch=' + escape(form.pitch.value);
  39. }
  40. if(form.yaw.value != 0) {
  41. embed_code.innerHTML += '&amp;amp;yaw=' + escape(form.yaw.value);
  42. }
  43. if(form.preview_url.value != '') {
  44. embed_code.innerHTML += '&amp;amp;preview=' + escape(form.preview_url.value);
  45. }
  46. if(form.haov.value != 0) {
  47. embed_code.innerHTML += '&amp;amp;haov=' + escape(form.haov.value);
  48. }
  49. if(form.vaov.value != 0) {
  50. embed_code.innerHTML += '&amp;amp;vaov=' + escape(form.vaov.value);
  51. }
  52. if(form.voffset.value != 0) {
  53. embed_code.innerHTML += '&amp;amp;vOffset=' + escape(form.voffset.value);
  54. }
  55. embed_code.innerHTML += '"></iframe>';
  56. return false;
  57. }
  58. function randomString()
  59. {
  60. var chars = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";
  61. var randomstring = '';
  62. for (var i=0;i<10;i++) {
  63. var rnum = Math.floor(Math.random() * chars.length);
  64. randomstring += chars.substring(rnum,rnum+1);
  65. }
  66. return randomstring;
  67. }
  68. </script>
  69. </head>
  70. <body>
  71. <form name="embed_gen_form" onsubmit="return processForm(embed_gen_form); return false;">
  72. Pannellum Location:<br>
  73. <input name="pannellum_url" placeholder="pannellum.htm Location" required><p>
  74. Panorama URL:<br>
  75. <input name="pano_url" placeholder="Image File" required><p>
  76. Panorama Preview URL (optional):<br>
  77. <input name="preview_url" placeholder="Image File"><p>
  78. Basic Information:<br>
  79. <input name="pano_title" placeholder="Title"> <input name="pano_author" placeholder="Author"><p>
  80. Partial Panorama (degrees) (optional):<br>
  81. <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>
  82. Embed Size:<br>
  83. <input name="embed_width" type="number" min="200" placeholder="Width" required> <input name="embed_height" type="number" min="150" placeholder="Height" required><p>
  84. Initial Parameters (degrees) (optional):<br>
  85. <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>
  86. Auto Load: <input name="autoload" type="checkbox"><p>
  87. Auto Rotate:
  88. <select name="autorotate">
  89. <option value="none">None</option>
  90. <option value="cw">CW</option>
  91. <option value="ccw">CCW</option>
  92. </select><p>
  93. URL to fall back to if WebGL is not supported:<br>
  94. <input name="fallback_url" placeholder="Fallback URL"><p>
  95. <input type="submit" value="Generate" onclick="document.getElementById('embed_code').innerHTML = ''"><p>
  96. </form>
  97. <textarea id="embed_code" style="resize: none; height:200px;" onclick="this.select()" cols="100" readonly></textarea>
  98. </body>
  99. </html>