Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Working 'zero build' pano and wrapped Mars pano

  • Loading branch information...
commit 733d68007bffdaddb34fa0ff1079522f6c767a47 1 parent 2d28a35
@dsheets dsheets authored
View
5 pano/.gitignore
@@ -0,0 +1,5 @@
+img/
+panos/
+mars/index.html
+mars/static-manifest.xml
+mars/panos/
View
6 pano/Makefile
@@ -0,0 +1,6 @@
+.PHONY: all static clean
+
+all: static
+
+static:
+ xsltproc demo-lib/static-manifest.xsl pano.html | xsltproc demo-lib/static-assets.xsl - | uniq | sh
2  pano/demo-lib
@@ -1 +1 @@
-Subproject commit 217c5905927571edd54dab071fa372a78a4602a3
+Subproject commit c4abb7643559db969cad1f01a83b5a204a1eb3aa
View
15 pano/mars/Makefile
@@ -0,0 +1,15 @@
+.PHONY: all static clean
+
+all: index.html static
+
+static-manifest.xml: manifest.xml
+ xsltproc ../demo-lib/static-manifest.xsl manifest.xml > static-manifest.xml
+
+index.html: static-manifest.xml
+ xsltproc ../pano.xsl static-manifest.xml > index.html
+
+static: static-manifest.xml
+ xsltproc ../demo-lib/static-assets.xsl static-manifest.xml | uniq | sh
+
+clean:
+ rm static-manifest.xml index.html
View
12 pano/mars/manifest.xml
@@ -1,33 +1,41 @@
<?xml version="1.0" standalone="yes" ?>
<manifest>
<link rel="prefetch" type="image/jpeg" href="panos/MER.jpg"
+ title="MER" name="MER" data-type="pano" data-thumb="panos/t_MER.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MER.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/MER2.jpg"
+ title="MER" name="MER2" data-type="pano" data-thumb="panos/t_MER2.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER2.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MER2.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER2.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/MER3.jpg"
+ title="MER" name="MER3" data-type="pano" data-thumb="panos/t_MER3.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER3.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MER3.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER3.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/MER4.jpg"
+ title="MER" name="MER4" data-type="pano" data-thumb="panos/t_MER4.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER4.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MER4.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER4.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/MER5.jpg"
+ title="MER" name="MER5" data-type="pano" data-thumb="panos/t_MER5.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER5.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MER5.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER5.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/MPF.jpg"
+ title="MPF" name="MPF" data-type="pano" data-thumb="panos/t_MPF.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MPF.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_MPF.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MPF.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/PHX.jpg"
+ title="PHX" name="PHX" data-type="pano" data-thumb="panos/t_PHX.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/PHX.jpg" />
<link rel="prefetch" type="image/jpeg" href="panos/t_PHX.jpg"
data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_PHX.jpg" />
+
<link rel="manifest" type="text/xml" href="../manifest.xml" />
- <a rel="start" href="../pano.html"></a>
-</manifest>
+ <link rel="start" type="text/html" href="../pano.html" />
+</manifest>
View
48 pano/pano.css
@@ -31,35 +31,35 @@ nav.pano {
width:172px;
height:100%;
border-left:1px solid #aaa;
- overflow:scroll;
+ overflow-y: auto;
}
-ul {
- list-style:none;
- }
+ul {
+ list-style:none;
+}
.isResizable {
- display:block;
- -moz-box-flex: 1;
- -webkit-box-flex: 1;
- box-flex: 1;
- clear:both;
- background: rgba(0, 0, 0, 0.0);
- overflow: scroll;
- resize: both;
- padding:0;
- margin:0;
- height:100%;
- width:100%;
- }
+ display:block;
+ -moz-box-flex: 1;
+ -webkit-box-flex: 1;
+ box-flex: 1;
+ clear:both;
+ background: rgba(0, 0, 0, 0.0);
+ overflow: scroll;
+ resize: both;
+ padding:0;
+ margin:0;
+ height:100%;
+ width:100%;
+}
-#zoom {
- width:93px;
- height:34px;
- padding-top:15px;
- padding-left:34px;
- }
-
+#zoom {
+ width:93px;
+ height:34px;
+ padding-top:15px;
+ padding-left:34px;
+}
+
.zoomin, .zoomout {
width:39px;
height:34px;
View
88 pano/pano.html
@@ -1,6 +1,49 @@
<html>
<head>
<title>Multiple Panorama Viewer</title>
+<link rel="prefetch" type="image/jpeg" href="panos/MER.jpg"
+ title="MER" name="MER" data-type="pano" data-thumb="panos/t_MER.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MER.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/MER2.jpg"
+ title="MER" name="MER2" data-type="pano" data-thumb="panos/t_MER2.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER2.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MER2.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER2.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/MER3.jpg"
+ title="MER" name="MER3" data-type="pano" data-thumb="panos/t_MER3.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER3.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MER3.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER3.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/MER4.jpg"
+ title="MER" name="MER4" data-type="pano" data-thumb="panos/t_MER4.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER4.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MER4.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER4.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/MER5.jpg"
+ title="MER" name="MER5" data-type="pano" data-thumb="panos/t_MER5.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MER5.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MER5.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MER5.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/MPF.jpg"
+ title="MPF" name="MPF" data-type="pano" data-thumb="panos/t_MPF.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/MPF.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_MPF.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_MPF.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/PHX.jpg"
+ title="PHX" name="PHX" data-type="pano" data-thumb="panos/t_PHX.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/PHX.jpg" />
+<link rel="prefetch" type="image/jpeg" href="panos/t_PHX.jpg"
+ data-src="http://www.ashimagroup.net/~sheets/pano/mars/panos/t_PHX.jpg" />
+
+<link rel="prefetch" type="image/png" href="img/zoom_more.png"
+ data-src="http://www.ashimagroup.net/~sheets/pano/assets/zoom_more.png" />
+<link rel="prefetch" type="image/png" href="img/zoom_less.png"
+ data-src="http://www.ashimagroup.net/~sheets/pano/assets/zoom_less.png" />
+
+<link rel="manifest" type="text/xml" href="demo-lib/manifest.xml" />
+
<link rel="stylesheet" type="text/css" href="pano.css" />
</head>
<body onload="main()" >
@@ -33,15 +76,16 @@
apv.setImage(d);
}
-var imgs = [
- { file: "MER.jpg", desc: "MER" },
- { file: "MER2.jpg", desc: "MER" },
- { file: "MER3.jpg", desc: "MER" },
- { file: "MER4.jpg", desc: "MER" },
- { file: "MER5.jpg", desc: "MER" },
- { file: "MPF.jpg", desc: "MPF" },
- { file: "PHX.jpg", desc: "PHX" }
- ];
+var panos = [];
+var links = document.getElementsByTagName('link');
+for (var i = 0; i < links.length; i++) {
+ var dt = links[i].attributes['data-type'];
+ if (dt && dt.value == 'pano') {
+ panos[panos.length] = { 'href': links[i].attributes['href'].value,
+ 'thumbhref': links[i].attributes['data-thumb'].value,
+ 'title': links[i].attributes['title'].value };
+ }
+}
gif1x1 = "data:image/gif;base64,R0lGODlhAQABAJEAAP/Mmf/Mmf4BAgAAACH5BAQUAP8ALAAAAAABAAEAAAICRAEAOw==";
@@ -57,13 +101,13 @@
function zoomOut() { zoom = tryZoom( zoom / zoomDelta) }
function switchImage(i) {
- for (var j = 0; j < imgs.length; ++j)
- imgs[j].thumb.className = "thumbInAct";
- imgs[i].thumb.className = "thumbAct";
+ for (var j = 0; j < panos.length; ++j)
+ panos[j].thumb.className = "thumbInAct";
+ panos[i].thumb.className = "thumbAct";
zoom = 1.0;
- apv.setImage(imgs[i].img);
+ apv.setImage(panos[i].img);
}
function loadNext() {
@@ -77,19 +121,19 @@
switchImage(0);
if (curI > 0) {
- e = imgs[curI-1];
- e.thumb.src = "panos/t_" + e.file;
+ e = panos[curI-1];
+ e.thumb.src = e.thumbhref;
addClick(e.thumb, curI-1);
//thumb.className += "thumb";
e.img.parentNode.replaceChild(e.thumb, e.img);
}
- var e = imgs[curI++];
+ var e = panos[curI++];
- if (curI <= imgs.length) {
+ if (curI <= panos.length) {
e.img.onload = loadNext;
e.img.onerror = loadNext;
- e.img.src = "panos/" + e.file;
+ e.img.src = e.href;
}
}
@@ -98,13 +142,13 @@
apv.init( document.getElementById("panodiv") );
d = document.getElementById("thumbs");
- for (var i=0;i<imgs.length;++i) {
- imgs[i].img = img = new Image ;
- imgs[i].thumb = new Image;
+ for (var i=0;i<panos.length;++i) {
+ panos[i].img = img = new Image ;
+ panos[i].thumb = new Image;
//img.className += "thumb";
img.src=gif1x1;
- e = document.createTextNode( imgs[i].desc );
+ e = document.createTextNode( panos[i].title );
f = document.createElement("div");
f.className += "thumb";
Please sign in to comment.
Something went wrong with that request. Please try again.