<!DOCTYPE html>
<!--
Author: Twily 2015 - 2020
Website: http://twily.info/
-->
<html>
<head>
<title>>_</title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<!--<link id="favicon" rel="shortcut icon" href="http://twily.info/favicon.ico" />-->
<!--<link rel="stylesheet" type="text/css" href="./css/style.css?v=1" />-->
<style type="text/css">
html,body {
width: 100%; height: 100%; margin: 0; padding: 0; overflow: auto;
font-family: "Droid Sans", "Liberation Sans", "DejaVu Sans", "Segoe UI", Sans;
font-size: 12pt; font-weight: bold;
background: #17181A; color: #AAABAD;
}
* { box-sizing: border-box; }
*:focus { outline: none !important; }
textarea {
width: 100%;
height: 80px;
background: #000;
color: #aaabad;
}
a:link, a:visited { color: #606163; text-decoration: none; }
a:hover, a:active { color: #EA75BC; }
.tbl { display: table; width: 100%; height: 100%; }
.tr { display: table-row; }
.td { display: table-cell; vertical-align: top; border: 1px solid #606163; box-shadow: inset 0 0 2px 2px #000; }
.sidebar { width: 200px; min-width: 100px; }
/*
#wrap { width: 100%; height: 100%; display: flex; position: absolute; z-index: 9; }
#wrap #box { padding: 128px; background: #111113; margin: auto; display: inline-block; position: relative; }*/
</style>
<!--<script type="text/javascript" src="./js/main.js?v=1"></script>-->
<script type="text/javascript">
var $=function(id) { return document.getElementById(id); };
var inc=57.70; // seconds increment
var cur=0;
var h=0;
var m=0;
var s=0;
var hh="";
var mm="";
var ss="";
function processdata() {
var line="";
for(var i=0;i<=125;i++) {
h=0;
m=0;
s=0;
hh="";
mm="";
ss="";
if(cur>=60*60) {
var tmpm=cur/60/60;
h=Math.floor(tmpm);
tmpm-=h;
tmpm*=60;
m=Math.floor(tmpm);
tmpm-=m;
s=tmpm*60;
} else if(cur>=60) {
var tmpm=cur/60;
m=Math.floor(tmpm);
tmpm-=m;
s=tmpm*60;
} else {
s=cur;
}
hh=(h>=10)?h:"0"+h;
mm=(m>=10)?m:"0"+m;
//s=Math.round(s * 100) / 100;
s=s.toFixed(2);
ss=(s>=10)?s:"0"+s;
//line+="cur: "+cur+"] "+hh+":"+mm+":"+ss+"\n";
line+=hh+":"+mm+":"+ss+"\n";
var nextupzoom=0;
if(jsondata['chunk'+(i+1)]) {
nextupzoom=jsondata['chunk'+(i+1)]['zoom'][0];
}
line+="chunk"+i+"_zoom "+jsondata['chunk'+i]['zoom'].join(' ')+" "+nextupzoom+"\n";
line+="chunk"+i+"_fade "+jsondata['chunk'+i]['fade'].join(' ')+" -\n";
cur+=inc;
}
$('output').innerHTML=line;
}
function ajaxSource(cb) {
var xhr;
if(window.XMLHttpRequest) xhr=new XMLHttpRequest();
else xhr=new ActiveXObject("Microsoft.XMLHTTP");
var data;
xhr.onreadystatechange=function() {
if(xhr.readyState==4 && xhr.status==200) {
cb(data=xhr.responseText);
//console.log(data);
}
}
xhr.open("GET","./mapslideshowdata.json",true);
xhr.send(null);
}
var jsondata={};
function init() {
ajaxSource(function(data) {
jsondata=JSON.parse(data);
console.dir(jsondata);
processdata();
});
}
</script>
</head>
<body onload="init();">
<br />
<hr />
<br />
<pre id="output"></pre>
</body>
</html>
Top