Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -357,7 +357,7 @@ with gr.Blocks(css=css) as demo:
|
|
357 |
BABYLON.Engine.LastCreatedScene.getNodes()[1].rotation.y = 0;
|
358 |
}
|
359 |
try {
|
360 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 255;
|
361 |
var tg = new BABYLON.Vector3(BABYLON.Engine.LastCreatedScene.activeCamera.position.x, BABYLON.Engine.LastCreatedScene.activeCamera.position.y, BABYLON.Engine.LastCreatedScene.activeCamera.position.z);
|
362 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 0;
|
363 |
|
@@ -407,7 +407,7 @@ with gr.Blocks(css=css) as demo:
|
|
407 |
BABYLON.Tools.CreateScreenshotUsingRenderTarget(BABYLON.Engine.LastCreatedScene.getEngine(), BABYLON.Engine.LastCreatedScene.activeCamera,
|
408 |
{ width: 1024 }, (durl) => {
|
409 |
document.getElementById(\"img_out\").onload = function() {
|
410 |
-
var svgd = `<svg id=\"svg_out\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">
|
411 |
<defs>
|
412 |
<filter id=\"blur\" x=\"0\" y=\"0\" xmlns=\"http://www.w3.org/2000/svg\">
|
413 |
<feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"` + BABYLON.Engine.LastCreatedScene.getNodes()[1].material.pointSize/Math.sqrt(2.0) + `\" />
|
|
|
357 |
BABYLON.Engine.LastCreatedScene.getNodes()[1].rotation.y = 0;
|
358 |
}
|
359 |
try {
|
360 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.radius = -255;
|
361 |
var tg = new BABYLON.Vector3(BABYLON.Engine.LastCreatedScene.activeCamera.position.x, BABYLON.Engine.LastCreatedScene.activeCamera.position.y, BABYLON.Engine.LastCreatedScene.activeCamera.position.z);
|
362 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 0;
|
363 |
|
|
|
407 |
BABYLON.Tools.CreateScreenshotUsingRenderTarget(BABYLON.Engine.LastCreatedScene.getEngine(), BABYLON.Engine.LastCreatedScene.activeCamera,
|
408 |
{ width: 1024 }, (durl) => {
|
409 |
document.getElementById(\"img_out\").onload = function() {
|
410 |
+
var svgd = `<svg id=\"svg_out\" viewBox=\"0 0 ` + document.getElementById(\"img_out\").width + ` ` + document.getElementById(\"img_out\").height + `\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">
|
411 |
<defs>
|
412 |
<filter id=\"blur\" x=\"0\" y=\"0\" xmlns=\"http://www.w3.org/2000/svg\">
|
413 |
<feGaussianBlur in=\"SourceGraphic\" stdDeviation=\"` + BABYLON.Engine.LastCreatedScene.getNodes()[1].material.pointSize/Math.sqrt(2.0) + `\" />
|