freealise commited on
Commit
b374feb
1 Parent(s): 3fba2f8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -434,15 +434,12 @@ def draw_mask(l, t, v, d, evt: gr.EventData):
434
 
435
  return gr.ImageEditor(value=d)
436
 
437
- def update():
438
- return
439
-
440
 
441
  on_click="""
442
  async()=>{
443
  var intv = setInterval(function(){
444
- if (BABYLON) {
445
- alert(BABYLON);
446
  clearInterval(intv);
447
  }
448
  }, 40);
@@ -906,7 +903,7 @@ with gr.Blocks(css=css) as demo:
906
  <canvas id='cnv_out'/>""")
907
  load_all = gr.Checkbox(label="Load all")
908
  render = gr.Button("Render")
909
- render.click(update, inputs=None, outputs=None, js=on_click)
910
 
911
  def on_submit(uploaded_video,model_type,coordinates,blur):
912
  global locations
 
434
 
435
  return gr.ImageEditor(value=d)
436
 
 
 
 
437
 
438
  on_click="""
439
  async()=>{
440
  var intv = setInterval(function(){
441
+ if (BABYLON && BABYLON.Engine.LastCreatedScene) {
442
+ alert(BABYLON.Engine.LastCreatedScene.activeCamera.fov);
443
  clearInterval(intv);
444
  }
445
  }, 40);
 
903
  <canvas id='cnv_out'/>""")
904
  load_all = gr.Checkbox(label="Load all")
905
  render = gr.Button("Render")
906
+ render.click(None, inputs=None, outputs=None, js=on_click)
907
 
908
  def on_submit(uploaded_video,model_type,coordinates,blur):
909
  global locations