Parcourir la source

Added ability to display a preview image.

pull/1/merge
Matthew Petroff il y a 12 ans
Parent
révision
b29a56dbba
5 fichiers modifiés avec 19 ajouts et 9 suppressions
  1. +6
    -1
      configuration.htm
  2. +1
    -1
      examples/example-minified.htm
  3. +1
    -1
      examples/example.htm
  4. +6
    -6
      src/css/pannellum.css
  5. +5
    -0
      src/js/pannellum.js

+ 6
- 1
configuration.htm Voir le fichier

@@ -45,6 +45,9 @@
if(form.lon.value != 0) {
embed_code.innerHTML += '&lon=' + escape(form.lon.value);
}
if(form.preview_url.value != '') {
embed_code.innerHTML += '&preview=' + escape(form.preview_url.value);
}
embed_code.innerHTML += '"></iframe>';
return false;
}
@@ -67,6 +70,8 @@
<input name="pannellum_url" placeholder="pannellum.htm Location" required><p>
Panorama URL:<br>
<input name="pano_url" placeholder="Image File" required><p>
Panorama Preview URL (optional):<br>
<input name="preview_url" placeholder="Image File"><p>
Basic Information:<br>
<input name="pano_title" placeholder="Title"> <input name="pano_author" placeholder="Author"><p>
Embed Size:<br>
@@ -92,4 +97,4 @@
<textarea id="embed_code" style="resize: none; height:200px;" onclick="this.select()" cols="100" readonly></textarea>
</body>
</html>
</html>

+ 1
- 1
examples/example-minified.htm Voir le fichier

@@ -5,6 +5,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<iframe title="pannellum panorama viewer" width="480" height="390" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style:none;" id="pannellum_JVU18uzhW5" src="../build/pannellum.htm?panorama=../examples/examplepano.jpg&amp;logo=yes&amp;title=Jordan%20Pond&amp;author=Matthew%20Petroff&amp;license=1"></iframe>
<iframe title="pannellum panorama viewer" width="480" height="390" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style:none;" id="pannellum_JVU18uzhW5" src="../build/pannellum.htm?panorama=../examples/examplepano.jpg&amp;logo=yes&amp;title=Jordan%20Pond&amp;author=Matthew%20Petroff&amp;license=1&amp;preview=../examples/examplepano-preview.jpg"></iframe>
</body>
</html>

+ 1
- 1
examples/example.htm Voir le fichier

@@ -5,6 +5,6 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<body>
<iframe title="pannellum panorama viewer" width="480" height="390" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style:none;" id="pannellum_JVU18uzhW5" src="../src/pannellum.htm?panorama=../examples/examplepano.jpg&amp;logo=yes&amp;title=Jordan%20Pond&amp;author=Matthew%20Petroff&amp;license=1"></iframe>
<iframe title="pannellum panorama viewer" width="480" height="390" webkitAllowFullScreen mozallowfullscreen allowFullScreen style="border-style:none;" id="pannellum_JVU18uzhW5" src="../src/pannellum.htm?panorama=../examples/examplepano.jpg&amp;logo=yes&amp;title=Jordan%20Pond&amp;author=Matthew%20Petroff&amp;license=1&amp;preview=../examples/examplepano-preview.jpg"></iframe>
</body>
</html>

+ 6
- 6
src/css/pannellum.css Voir le fichier

@@ -1,11 +1,5 @@
html {
height: 100%;
background-color: #666;
background-image: -webkit-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: -moz-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: -o-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-size:20px 20px;
}

body {
@@ -15,6 +9,12 @@ body {
cursor:default;
width: 100%;
font-family:serif;
background-color: #666;
background-image: -webkit-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: -moz-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: -o-linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-image: linear-gradient(-45deg, #999 24%, #666 26%, #666 49%, #999 51%, #999 74%, #666 76%, #666);
background-size:20px 20px;
}

.grab {


+ 5
- 0
src/js/pannellum.js Voir le fichier

@@ -66,6 +66,11 @@ if(getURLParameter('fallback')) {
document.getElementById('nocanvas').innerHTML = '<p>Your browser does not support WebGL.<br><a href="' + getURLParameter('fallback') + '" target="_blank">Click here to view this panorama in an alternative viewer.</a></p>';
}

if(getURLParameter('preview')) {
document.body.style.backgroundImage = "url('" + getURLParameter('preview') + "')";
document.body.style.backgroundSize = "auto";
}

var fov = 70, lat = 0, lon = 0;
if(getURLParameter('fov')) {
fov = parseFloat(getURLParameter('fov'));


Chargement…
Annuler
Enregistrer