Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -357,10 +357,12 @@ with gr.Blocks(css=css) as demo:
|
|
357 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 0;
|
358 |
}
|
359 |
try {
|
360 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.
|
361 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.
|
|
|
|
|
362 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.zero = new BABYLON.Vector3(0,0,0);
|
363 |
-
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.CoR_At = new BABYLON.Vector3(
|
364 |
|
365 |
BABYLON.Engine.LastCreatedScene.activeCamera.setTarget(BABYLON.Engine.LastCreatedScene.activeCamera.metadata.CoR_At);
|
366 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 255;
|
|
|
357 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 0;
|
358 |
}
|
359 |
try {
|
360 |
+
var x = -255 * Math.cos(BABYLON.Engine.LastCreatedScene.activeCamera.alpha) * Math.sin(BABYLON.Engine.LastCreatedScene.activeCamera.beta)
|
361 |
+
var y = -255 * Math.cos(BABYLON.Engine.LastCreatedScene.activeCamera.beta)
|
362 |
+
var z = -255 * Math.sin(BABYLON.Engine.LastCreatedScene.activeCamera.alpha) * Math.sin(BABYLON.Engine.LastCreatedScene.activeCamera.beta)
|
363 |
+
|
364 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.zero = new BABYLON.Vector3(0,0,0);
|
365 |
+
BABYLON.Engine.LastCreatedScene.activeCamera.metadata.CoR_At = new BABYLON.Vector3(x, y, z);
|
366 |
|
367 |
BABYLON.Engine.LastCreatedScene.activeCamera.setTarget(BABYLON.Engine.LastCreatedScene.activeCamera.metadata.CoR_At);
|
368 |
BABYLON.Engine.LastCreatedScene.activeCamera.radius = 255;
|