Update app.py
Browse files
app.py
CHANGED
@@ -782,7 +782,7 @@ async(c, o, p, d, n, m, s)=>{
|
|
782 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
783 |
document.getElementById('seek').innerHTML = '';
|
784 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
785 |
-
document.getElementById('seek').innerHTML += '<a href="#" style="
|
786 |
}
|
787 |
play();
|
788 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
@@ -1279,7 +1279,8 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1279 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].style.filter = \"blur(\" + Math.ceil(Math.log2(Math.PI/document.getElementById(\"zoom\").value))/2.0*Math.sqrt(2.0) + \"px)\";
|
1280 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
|
1281 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].ondrag = function(e){e.preventDefault();}
|
1282 |
-
'>Reset camera</a>
|
|
|
1283 |
html = gr.HTML(value="""<label for='zoom' style='width:5em'>Zoom</label><input id='zoom' type='range' style='width:256px;height:1em;' value='0.8' min='0.157' max='1.57' step='0.001' oninput='
|
1284 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1285 |
var evt = document.createEvent(\"Event\");
|
@@ -1313,7 +1314,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1313 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1314 |
<a href='#' onclick='record_video();'>Record</a>
|
1315 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
1316 |
-
<
|
1317 |
<img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
|
1318 |
<canvas id='cnv_out'></canvas>
|
1319 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|
|
|
782 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
783 |
document.getElementById('seek').innerHTML = '';
|
784 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
785 |
+
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;right:'+(56+coords[i].lng/2)+'px;top:'+(56+coords[i].lat/2)+'px;" onclick="seek('+i+');"> '+i+' </a> ';
|
786 |
}
|
787 |
play();
|
788 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
|
|
1279 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].style.filter = \"blur(\" + Math.ceil(Math.log2(Math.PI/document.getElementById(\"zoom\").value))/2.0*Math.sqrt(2.0) + \"px)\";
|
1280 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
|
1281 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].ondrag = function(e){e.preventDefault();}
|
1282 |
+
'>Reset camera</a>
|
1283 |
+
<div style='width:128px;height:128px;border:1px dotted gray;padding:0;margin:0;float:right;' id='seek'></div>""")
|
1284 |
html = gr.HTML(value="""<label for='zoom' style='width:5em'>Zoom</label><input id='zoom' type='range' style='width:256px;height:1em;' value='0.8' min='0.157' max='1.57' step='0.001' oninput='
|
1285 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1286 |
var evt = document.createEvent(\"Event\");
|
|
|
1314 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1315 |
<a href='#' onclick='record_video();'>Record</a>
|
1316 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
1317 |
+
<a href='#' onclick='play();'>Play</a><br/>
|
1318 |
<img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
|
1319 |
<canvas id='cnv_out'></canvas>
|
1320 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|