Update app.py
Browse files
app.py
CHANGED
@@ -772,6 +772,7 @@ async(c, o, p, d, n, m, s)=>{
|
|
772 |
|
773 |
|
774 |
function requestMap() {
|
|
|
775 |
try {
|
776 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
777 |
if (buffer) {
|
@@ -781,8 +782,8 @@ async(c, o, p, d, n, m, s)=>{
|
|
781 |
}
|
782 |
buffer = ctx.getImageData(0, 0, video.videoWidth, video.videoHeight).data;
|
783 |
applyDisplacementMapFromBuffer(videoDomeMesh, buffer, video.videoWidth, video.videoHeight, 0, 1, null, null, true);
|
784 |
-
|
785 |
} catch(e) {alert(e)}
|
|
|
786 |
}
|
787 |
window.requestMap = requestMap;
|
788 |
|
@@ -1049,9 +1050,8 @@ window.videoPlay = videoPlay;
|
|
1049 |
|
1050 |
position.toArray(positions, index);
|
1051 |
}
|
1052 |
-
|
1053 |
|
1054 |
-
alert('!');
|
1055 |
requestAnimationFrame(requestMap);
|
1056 |
return mesh;
|
1057 |
} catch(e) {alert(e)}
|
|
|
772 |
|
773 |
|
774 |
function requestMap() {
|
775 |
+
setTimeout(function() {
|
776 |
try {
|
777 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
778 |
if (buffer) {
|
|
|
782 |
}
|
783 |
buffer = ctx.getImageData(0, 0, video.videoWidth, video.videoHeight).data;
|
784 |
applyDisplacementMapFromBuffer(videoDomeMesh, buffer, video.videoWidth, video.videoHeight, 0, 1, null, null, true);
|
|
|
785 |
} catch(e) {alert(e)}
|
786 |
+
}, 1000);
|
787 |
}
|
788 |
window.requestMap = requestMap;
|
789 |
|
|
|
1050 |
|
1051 |
position.toArray(positions, index);
|
1052 |
}
|
1053 |
+
videoDomeMesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
|
1054 |
|
|
|
1055 |
requestAnimationFrame(requestMap);
|
1056 |
return mesh;
|
1057 |
} catch(e) {alert(e)}
|