Spaces:
Running
Running
Update app.py
Browse files
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'/>""")
|