Update app.py
Browse files
app.py
CHANGED
@@ -707,7 +707,8 @@ async(c, o, p, d, n, m, s)=>{
|
|
707 |
window.xold = 0;
|
708 |
window.yold = 0;
|
709 |
window.buffer = null;
|
710 |
-
window.
|
|
|
711 |
window.video = document.getElementById("depth_video").getElementsByTagName("video")[0];
|
712 |
window.parallax = 0;
|
713 |
window.xdir = new BABYLON.Vector3(1, 0, 0);
|
@@ -772,7 +773,6 @@ async(c, o, p, d, n, m, s)=>{
|
|
772 |
|
773 |
function requestMap() {
|
774 |
try {
|
775 |
-
alert(video.videoWidth);
|
776 |
alert(ctx);
|
777 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
778 |
if (buffer) {
|
@@ -792,10 +792,8 @@ async(c, o, p, d, n, m, s)=>{
|
|
792 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
793 |
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;left:'+(56+coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">-'+i+'-</a> ';
|
794 |
}
|
795 |
-
|
796 |
-
|
797 |
-
canvas.height = video.videoHeight;
|
798 |
-
ctx = canvas.getContext("2d", { willReadFrequently: true });
|
799 |
|
800 |
videoPlay();
|
801 |
};
|
|
|
707 |
window.xold = 0;
|
708 |
window.yold = 0;
|
709 |
window.buffer = null;
|
710 |
+
window.bufferCanvas = document.createElement("canvas");
|
711 |
+
window.ctx = bufferCanvas.getContext("2d", { willReadFrequently: true });
|
712 |
window.video = document.getElementById("depth_video").getElementsByTagName("video")[0];
|
713 |
window.parallax = 0;
|
714 |
window.xdir = new BABYLON.Vector3(1, 0, 0);
|
|
|
773 |
|
774 |
function requestMap() {
|
775 |
try {
|
|
|
776 |
alert(ctx);
|
777 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
778 |
if (buffer) {
|
|
|
792 |
for (var i=0; i<videoDome.videoTexture.video.duration; i++) {
|
793 |
document.getElementById('seek').innerHTML += '<a href="#" style="position:absolute;left:'+(56+coords[i].lng/2)+'px;top:'+(56-coords[i].lat/2)+'px;" onclick="seek('+i+');">-'+i+'-</a> ';
|
794 |
}
|
795 |
+
bufferCanvas.width = video.videoWidth;
|
796 |
+
bufferCanvas.height = video.videoHeight;
|
|
|
|
|
797 |
|
798 |
videoPlay();
|
799 |
};
|