Update app.py
Browse files
app.py
CHANGED
@@ -1260,7 +1260,8 @@ with gr.Blocks(css=css, js=js, head=head) as demo:
|
|
1260 |
load_all = gr.Checkbox(label="Load all")
|
1261 |
|
1262 |
with gr.Group():
|
1263 |
-
camera = gr.HTML(value="""<
|
|
|
1264 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1265 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
1266 |
screenshot: true,
|
@@ -1279,8 +1280,7 @@ 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 |
-
<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\");
|
|
|
1260 |
load_all = gr.Checkbox(label="Load all")
|
1261 |
|
1262 |
with gr.Group():
|
1263 |
+
camera = gr.HTML(value="""<div style='width:128px;height:128px;border:1px dotted gray;padding:0;margin:0;float:right;' id='seek'></div>
|
1264 |
+
<a href='#' id='reset_cam' style='float:right;color:white' onclick='
|
1265 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
1266 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
1267 |
screenshot: true,
|
|
|
1280 |
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)\";
|
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="""<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\");
|