Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -605,22 +605,24 @@ async(c, o, b, p, d, n, m)=>{
|
|
605 |
|
606 |
if (o == "") {o += n;}
|
607 |
var o_ = o.split(",");
|
|
|
608 |
for (var j=0; j<o_.length; j++) {
|
609 |
o_[j] = parseInt(o_[j]);
|
610 |
-
|
611 |
{
|
612 |
resolution: 16,
|
613 |
size: 512
|
614 |
}, BABYLON.Engine.LastCreatedScene);
|
615 |
-
|
616 |
-
|
|
|
617 |
mesh.dispose(false, true);
|
618 |
}
|
619 |
-
BABYLON.Engine.LastCreatedScene.
|
620 |
if (o_[j] == n) {
|
621 |
-
BABYLON.Engine.LastCreatedScene.
|
622 |
} else {
|
623 |
-
BABYLON.Engine.LastCreatedScene.
|
624 |
}
|
625 |
}
|
626 |
clearInterval(intv);
|
|
|
605 |
|
606 |
if (o == "") {o += n;}
|
607 |
var o_ = o.split(",");
|
608 |
+
var dome = [];
|
609 |
for (var j=0; j<o_.length; j++) {
|
610 |
o_[j] = parseInt(o_[j]);
|
611 |
+
dome[j] = new BABYLON.PhotoDome("dome"+j, p[o_[j]].image.url,
|
612 |
{
|
613 |
resolution: 16,
|
614 |
size: 512
|
615 |
}, BABYLON.Engine.LastCreatedScene);
|
616 |
+
var q = BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-2]._children;
|
617 |
+
for(i = 0; i < q.length; i++) {
|
618 |
+
let mesh = q[i];
|
619 |
mesh.dispose(false, true);
|
620 |
}
|
621 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].scaling.z = -1;
|
622 |
if (o_[j] == n) {
|
623 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(d.background.url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
624 |
} else {
|
625 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].applyDisplacementMap(m[o_[j]].url, 0, 255, function(m){try{alert(BABYLON.Engine.Version);}catch(e){alert(e);}}, null, null, true, function(e){alert(e);});
|
626 |
}
|
627 |
}
|
628 |
clearInterval(intv);
|