Update app.py
Browse files
app.py
CHANGED
@@ -771,7 +771,7 @@ async(c, o, p, d, n, m, s)=>{
|
|
771 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
772 |
document.getElementById('seek').innerHTML = '';
|
773 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
774 |
-
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;
|
775 |
}
|
776 |
play();
|
777 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
@@ -1251,7 +1251,7 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1251 |
with gr.Group():
|
1252 |
camera = gr.HTML(value="""<div style='width:128px;height:128px;border:1px dotted gray;padding:0;margin:0;float:left;clear:none;' id='seek'></div>
|
1253 |
<span style='max-width:50%;float:right;clear:none;'>
|
1254 |
-
<a href='#' id='reset_cam' style='
|
1255 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1256 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
1257 |
screenshot: true,
|
@@ -1299,15 +1299,13 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1299 |
}
|
1300 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
1301 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
1302 |
-
'/> <span>1.0</span
|
1303 |
-
snapshot = gr.HTML(value="""<span style='max-width:50%;float:right;clear:none;'>
|
1304 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1305 |
<a href='#' onclick='record_video();'>Record</a>
|
1306 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
1307 |
-
<a href='#' onclick='play();'>Play</a
|
1308 |
-
|
1309 |
<canvas id='cnv_out'></canvas>
|
1310 |
-
</span>
|
1311 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|
1312 |
const model3D = document.getElementById(\"model3D\");
|
1313 |
if (model3D.parentNode.tagName != \"BODY\") {
|
|
|
771 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
772 |
document.getElementById('seek').innerHTML = '';
|
773 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
774 |
+
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;left:'+(56+coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">-'+i+'-</a> ';
|
775 |
}
|
776 |
play();
|
777 |
videoDome.videoTexture.video.oncanplaythrough = null;
|
|
|
1251 |
with gr.Group():
|
1252 |
camera = gr.HTML(value="""<div style='width:128px;height:128px;border:1px dotted gray;padding:0;margin:0;float:left;clear:none;' id='seek'></div>
|
1253 |
<span style='max-width:50%;float:right;clear:none;'>
|
1254 |
+
<a href='#' id='reset_cam' style='float:right;clear:none;color:white' onclick='
|
1255 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1256 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
1257 |
screenshot: true,
|
|
|
1299 |
}
|
1300 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure = this.value;
|
1301 |
this.parentNode.childNodes[2].innerText = BABYLON.Engine.LastCreatedScene.activeCamera.metadata.pipeline.imageProcessing.exposure;
|
1302 |
+
'/> <span>1.0</span><br/>
|
|
|
1303 |
<a href='#' onclick='snapshot();'>Screenshot</a>
|
1304 |
<a href='#' onclick='record_video();'>Record</a>
|
1305 |
<a href='#' onclick='stop_recording();'>Stop rec.</a>
|
1306 |
+
<a href='#' onclick='play();'>Play</a></span>""")
|
1307 |
+
snapshot = gr.HTML(value="""<img src='' id='img_out' onload='var ctxt = document.getElementById(\"cnv_out\").getContext(\"2d\");ctxt.drawImage(this, 0, 0);'/><br/>
|
1308 |
<canvas id='cnv_out'></canvas>
|
|
|
1309 |
<div id='compass_box'><div id='compass'><a id='fullscreen' onclick='
|
1310 |
const model3D = document.getElementById(\"model3D\");
|
1311 |
if (model3D.parentNode.tagName != \"BODY\") {
|