freealise commited on
Commit
f6a74ea
1 Parent(s): 0f63565

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -367,7 +367,7 @@ with gr.Blocks(css=css) as demo:
367
  canvas = gr.HTML(value="""<a href='#' onclick=\"
368
  var cntxt = document.getElementsByClassName('model3D')[0].getElementsByTagName('canvas')[0].getContext('webgl2');
369
  this.innerText = cntxt;
370
- BABYLON.Tools.CreateScreenshot(BABYLON.Engine, BABYLON.Engine.LastCreatedScene.activeCamera, {forceDownload: false, precision: 1.0, (durl) => {
371
  document.getElementById('img_out').src = durl;
372
  }});
373
  \">webgl2</a><br/><img src='' id='img_out'/>""")
 
367
  canvas = gr.HTML(value="""<a href='#' onclick=\"
368
  var cntxt = document.getElementsByClassName('model3D')[0].getElementsByTagName('canvas')[0].getContext('webgl2');
369
  this.innerText = cntxt;
370
+ BABYLON.Tools.CreateScreenshot(BABYLON.Engine.LastCreatedScene.getEngine(), BABYLON.Engine.LastCreatedScene.activeCamera, {forceDownload: false, precision: 1.0, (durl) => {
371
  document.getElementById('img_out').src = durl;
372
  }});
373
  \">webgl2</a><br/><img src='' id='img_out'/>""")