Update app.py
Browse files
app.py
CHANGED
|
@@ -667,29 +667,8 @@ async(c, o, p, d, n, m)=>{
|
|
| 667 |
alert(document.getElementById("output_video").innerHTML);
|
| 668 |
alert(document.getElementById("depth_video").innerHTML);
|
| 669 |
|
| 670 |
-
const videoDome = new BABYLON.VideoDome(
|
| 671 |
-
"videoDome",
|
| 672 |
-
[document.getElementById("output_video").getElementsByTagName("video")[0].src],
|
| 673 |
-
{
|
| 674 |
-
resolution: 16,
|
| 675 |
-
size: 512
|
| 676 |
-
clickToPlay: false,
|
| 677 |
-
autoPlay: false,
|
| 678 |
-
poster: 'https://freeali.se/assets/images/1x1.png',
|
| 679 |
-
}, BABYLON.Engine.LastCreatedScene
|
| 680 |
-
);
|
| 681 |
-
var q = BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-2]._children;
|
| 682 |
-
for (i = 0; i < q.length; i++) {
|
| 683 |
-
let mesh = q[i];
|
| 684 |
-
mesh.dispose(false, true);
|
| 685 |
-
}
|
| 686 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].scaling.z = -1;
|
| 687 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.emissiveTexture = videoDome.videoTexture;
|
| 688 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.emissiveTexture.hasAlpha = true;
|
| 689 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].material.useAlphaFromEmissiveTexture = true;
|
| 690 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].alphaIndex = 1;
|
| 691 |
-
BABYLON.Engine.LastCreatedScene.meshes[BABYLON.Engine.LastCreatedScene.meshes.length-1].visibility = 0.9999;
|
| 692 |
|
|
|
|
| 693 |
window.md = false;
|
| 694 |
window.r_old = 1.0;
|
| 695 |
window.a_old = 0;
|
|
@@ -701,6 +680,7 @@ async(c, o, p, d, n, m)=>{
|
|
| 701 |
window.yold = 0;
|
| 702 |
window.buffer = null;
|
| 703 |
window.ctx = null;
|
|
|
|
| 704 |
|
| 705 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].addEventListener('pointermove', function(evt) {
|
| 706 |
if (md === true) {
|
|
@@ -773,7 +753,6 @@ async(c, o, p, d, n, m)=>{
|
|
| 773 |
updateMap();
|
| 774 |
});
|
| 775 |
|
| 776 |
-
window.video = document.getElementById("depth_video").getElementsByTagName("video")[0];
|
| 777 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
| 778 |
videoDome.videoTexture.video.play();
|
| 779 |
video.play();
|
|
@@ -924,7 +903,7 @@ if (BABYLON) {
|
|
| 924 |
}
|
| 925 |
window.snapshot = snapshot;
|
| 926 |
|
| 927 |
-
function applyDisplacementMapFromBuffer(
|
| 928 |
mesh,
|
| 929 |
buffer,
|
| 930 |
heightMapWidth,
|
|
|
|
| 667 |
alert(document.getElementById("output_video").innerHTML);
|
| 668 |
alert(document.getElementById("depth_video").innerHTML);
|
| 669 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 670 |
|
| 671 |
+
|
| 672 |
window.md = false;
|
| 673 |
window.r_old = 1.0;
|
| 674 |
window.a_old = 0;
|
|
|
|
| 680 |
window.yold = 0;
|
| 681 |
window.buffer = null;
|
| 682 |
window.ctx = null;
|
| 683 |
+
window.video = document.getElementById("depth_video").getElementsByTagName("video")[0];
|
| 684 |
|
| 685 |
document.getElementById("model3D").getElementsByTagName("canvas")[0].addEventListener('pointermove', function(evt) {
|
| 686 |
if (md === true) {
|
|
|
|
| 753 |
updateMap();
|
| 754 |
});
|
| 755 |
|
|
|
|
| 756 |
videoDome.videoTexture.video.oncanplaythrough = function () {
|
| 757 |
videoDome.videoTexture.video.play();
|
| 758 |
video.play();
|
|
|
|
| 903 |
}
|
| 904 |
window.snapshot = snapshot;
|
| 905 |
|
| 906 |
+
function applyDisplacementMapFromBuffer(
|
| 907 |
mesh,
|
| 908 |
buffer,
|
| 909 |
heightMapWidth,
|