Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -639,13 +639,11 @@ async(p, d, n)=>{
|
|
639 |
resolution: 16,
|
640 |
size: 512
|
641 |
}, BABYLON.Engine.LastCreatedScene);
|
642 |
-
try {
|
643 |
for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
|
644 |
let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
|
645 |
mesh.dispose(false, true);
|
646 |
}
|
647 |
-
BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){BABYLON.Engine.LastCreatedScene.addMesh(m,false);alert(JSON.stringify(m));}, null, null, true, function(e){alert(e);});
|
648 |
-
} catch(e){alert(e);}
|
649 |
});
|
650 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
651 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|
|
|
639 |
resolution: 16,
|
640 |
size: 512
|
641 |
}, BABYLON.Engine.LastCreatedScene);
|
|
|
642 |
for(i = 0; i < BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children.length; i++) {
|
643 |
let mesh = BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh")._children[i];
|
644 |
mesh.dispose(false, true);
|
645 |
}
|
646 |
+
BABYLON.Engine.LastCreatedScene.getMeshByName("dome_mesh").applyDisplacementMap(d.background.url, 0, 255, function(m){try{BABYLON.Engine.LastCreatedScene.addMesh(m,false);alert(JSON.stringify(m));}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
|
|
647 |
});
|
648 |
if (!BABYLON.Engine.LastCreatedScene.activeCamera.metadata) {
|
649 |
BABYLON.Engine.LastCreatedScene.activeCamera.metadata = {
|