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="position:absolute;right:'+(56-coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">
|
786 |
}
|
787 |
play();
|
788 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
@@ -1281,7 +1281,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1281 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
|
1282 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].ondrag = function(e){e.preventDefault();}
|
1283 |
'>Reset camera</a>""")
|
1284 |
-
html = gr.HTML(value="""<span style='float:left'><label for='zoom' style='width:8em'>Zoom</label><input id='zoom' type='range' style='width:128px;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\");
|
1287 |
evt.initEvent(\"click\", true, false);
|
@@ -1292,7 +1292,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1292 |
|
1293 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].style.filter = \"blur(\" + BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1].material.pointSize/2.0*Math.sqrt(2.0) + \"px)\";
|
1294 |
'/> <span>0.8</span></span>""")
|
1295 |
-
contrast = gr.HTML(value="""<span style='float:left'><label for='contrast' style='width:8em'>Contrast</label><input id='contrast' type='range' style='width:128px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
|
1296 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1297 |
var evt = document.createEvent(\"Event\");
|
1298 |
evt.initEvent(\"click\", true, false);
|
@@ -1301,7 +1301,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1301 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = this.value;
|
1302 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast;
|
1303 |
'/> <span>1.0</span></span>""")
|
1304 |
-
exposure = gr.HTML(value="""<span style='float:left'><label for='exposure' style='width:8em'>Exposure</label><input id='exposure' type='range' style='width:128px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
|
1305 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1306 |
var evt = document.createEvent(\"Event\");
|
1307 |
evt.initEvent(\"click\", true, false);
|
@@ -1310,7 +1310,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1310 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
1311 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
1312 |
'/> <span>1.0</span></span>""")
|
1313 |
-
snapshot = gr.HTML(value="""<span style='float:left'>
|
1314 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1315 |
<a href='#' onclick='record_video();'>Record</a>
|
1316 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
|
|
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;
|
|
|
1281 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].oncontextmenu = function(e){e.preventDefault();}
|
1282 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].ondrag = function(e){e.preventDefault();}
|
1283 |
'>Reset camera</a>""")
|
1284 |
+
html = gr.HTML(value="""<span style='max-width:50%;float:left'><label for='zoom' style='width:8em'>Zoom</label><input id='zoom' type='range' style='width:128px;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\");
|
1287 |
evt.initEvent(\"click\", true, false);
|
|
|
1292 |
|
1293 |
document.getElementById(\"model3D\").getElementsByTagName(\"canvas\")[0].style.filter = \"blur(\" + BABYLON.Engine.LastCreatedScene.getNodes()[parseInt(document.getElementById(\"fnum\").getElementsByTagName(\"input\")[0].value)+1].material.pointSize/2.0*Math.sqrt(2.0) + \"px)\";
|
1294 |
'/> <span>0.8</span></span>""")
|
1295 |
+
contrast = gr.HTML(value="""<span style='max-width:50%;float:left'><label for='contrast' style='width:8em'>Contrast</label><input id='contrast' type='range' style='width:128px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
|
1296 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1297 |
var evt = document.createEvent(\"Event\");
|
1298 |
evt.initEvent(\"click\", true, false);
|
|
|
1301 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast = this.value;
|
1302 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.contrast;
|
1303 |
'/> <span>1.0</span></span>""")
|
1304 |
+
exposure = gr.HTML(value="""<span style='max-width:50%;float:left'><label for='exposure' style='width:8em'>Exposure</label><input id='exposure' type='range' style='width:128px;height:1em;' value='1.0' min='0' max='2' step='0.001' oninput='
|
1305 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1306 |
var evt = document.createEvent(\"Event\");
|
1307 |
evt.initEvent(\"click\", true, false);
|
|
|
1310 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
1311 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
1312 |
'/> <span>1.0</span></span>""")
|
1313 |
+
snapshot = gr.HTML(value="""<span style='max-width:50%;float:left'>
|
1314 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1315 |
<a href='#' onclick='record_video();'>Record</a>
|
1316 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|