Update app.py
Browse files
app.py
CHANGED
|
@@ -637,7 +637,7 @@ async(c, o, p, d, n, m)=>{
|
|
| 637 |
mesh.dispose(false, true);
|
| 638 |
}
|
| 639 |
var dome = [];
|
| 640 |
-
for (var j=0; j<o_.length; j++) {
|
| 641 |
o_[j] = parseInt(o_[j]);
|
| 642 |
dome[j] = new BABYLON.PhotoDome("dome"+j, p[o_[j]].image.url,
|
| 643 |
{
|
|
@@ -650,7 +650,6 @@ async(c, o, p, d, n, m)=>{
|
|
| 650 |
mesh.dispose(false, true);
|
| 651 |
}
|
| 652 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].name = "dome"+j;
|
| 653 |
-
//BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.needDepthPrePass = true;
|
| 654 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].scaling.z = -1;
|
| 655 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = o_.length-j;
|
| 656 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
|
|
@@ -663,10 +662,32 @@ async(c, o, p, d, n, m)=>{
|
|
| 663 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].position.x = coords[o_[j]].lng;
|
| 664 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.y = coords[o_[j]].heading / 180 * Math.PI;
|
| 665 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.z = -coords[o_[j]].pitch / 180 * Math.PI;
|
| 666 |
-
}
|
| 667 |
-
alert(document.getElementById("output_video").innerHTML);
|
| 668 |
-
alert(document.getElementById("depth_video").innerHTML);
|
| 669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
|
| 671 |
|
| 672 |
window.md = false;
|
|
|
|
| 637 |
mesh.dispose(false, true);
|
| 638 |
}
|
| 639 |
var dome = [];
|
| 640 |
+
/*for (var j=0; j<o_.length; j++) {
|
| 641 |
o_[j] = parseInt(o_[j]);
|
| 642 |
dome[j] = new BABYLON.PhotoDome("dome"+j, p[o_[j]].image.url,
|
| 643 |
{
|
|
|
|
| 650 |
mesh.dispose(false, true);
|
| 651 |
}
|
| 652 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].name = "dome"+j;
|
|
|
|
| 653 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].scaling.z = -1;
|
| 654 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = o_.length-j;
|
| 655 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
|
|
|
|
| 662 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].position.x = coords[o_[j]].lng;
|
| 663 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.y = coords[o_[j]].heading / 180 * Math.PI;
|
| 664 |
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].rotation.z = -coords[o_[j]].pitch / 180 * Math.PI;
|
| 665 |
+
}*/
|
| 666 |
+
//alert(document.getElementById("output_video").innerHTML);
|
| 667 |
+
//alert(document.getElementById("depth_video").innerHTML);
|
| 668 |
|
| 669 |
+
const videoDome = new BABYLON.VideoDome(
|
| 670 |
+
"videoDome",
|
| 671 |
+
[document.getElementById("output_video").getElementsByTagName("video")[0].src],
|
| 672 |
+
{
|
| 673 |
+
resolution: 16,
|
| 674 |
+
size: 512
|
| 675 |
+
clickToPlay: false,
|
| 676 |
+
autoPlay: false,
|
| 677 |
+
poster: 'https://freeali.se/assets/images/1x1.png',
|
| 678 |
+
}, BABYLON.Engine.LastCreatedScene
|
| 679 |
+
);
|
| 680 |
+
/*var q = BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-2]._children;
|
| 681 |
+
for (i = 0; i < q.length; i++) {
|
| 682 |
+
let mesh = q[i];
|
| 683 |
+
mesh.dispose(false, true);
|
| 684 |
+
}*/
|
| 685 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].scaling.z = -1;
|
| 686 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.emissiveTexture = videoDome.videoTexture;
|
| 687 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.emissiveTexture.hasAlpha = true;
|
| 688 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromEmissiveTexture = true;
|
| 689 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = 1;
|
| 690 |
+
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
|
| 691 |
|
| 692 |
|
| 693 |
window.md = false;
|