Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -378,14 +378,11 @@ with gr.Blocks(css=css) as demo:
|
|
378 |
this.innerText = cntxt;
|
379 |
|
380 |
BABYLON.Engine.LastCreatedScene.getEngine().onEndFrameObservable.add(function() {
|
381 |
-
alert(\"begin\");
|
382 |
if (BABYLON.Engine.LastCreatedScene.activeCamera.metadata.screenshot === true) {
|
383 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.screenshot = false;
|
384 |
-
alert(\"do\");
|
385 |
try {
|
386 |
-
Tools.CreateScreenshotUsingRenderTarget(BABYLON.Engine.LastCreatedScene.getEngine(), BABYLON.Engine.LastCreatedScene.activeCamera, { width: 310 }, (durl) => { document.getElementById(\"img_out\").src = durl; });
|
387 |
} catch(e) { alert(e); }
|
388 |
-
alert(\"ok\");
|
389 |
}
|
390 |
});
|
391 |
'/>webgl2</a><br/><img src='' id='img_out'/>""")
|
|
|
378 |
this.innerText = cntxt;
|
379 |
|
380 |
BABYLON.Engine.LastCreatedScene.getEngine().onEndFrameObservable.add(function() {
|
|
|
381 |
if (BABYLON.Engine.LastCreatedScene.activeCamera.metadata.screenshot === true) {
|
382 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.screenshot = false;
|
|
|
383 |
try {
|
384 |
+
BABYLON.Tools.CreateScreenshotUsingRenderTarget(BABYLON.Engine.LastCreatedScene.getEngine(), BABYLON.Engine.LastCreatedScene.activeCamera, { width: 310 }, (durl) => { document.getElementById(\"img_out\").src = durl; });
|
385 |
} catch(e) { alert(e); }
|
|
|
386 |
}
|
387 |
});
|
388 |
'/>webgl2</a><br/><img src='' id='img_out'/>""")
|