Update app.py
Browse files
app.py
CHANGED
@@ -773,7 +773,6 @@ async(c, o, p, d, n, m, s)=>{
|
|
773 |
|
774 |
function requestMap() {
|
775 |
try {
|
776 |
-
alert(ctx);
|
777 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
778 |
if (buffer) {
|
779 |
counter = parseInt(video.currentTime);
|
@@ -782,7 +781,8 @@ async(c, o, p, d, n, m, s)=>{
|
|
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 |
-
|
|
|
786 |
} catch(e) {alert(e)}
|
787 |
}
|
788 |
window.requestMap = requestMap;
|
@@ -1008,6 +1008,7 @@ window.videoPlay = videoPlay;
|
|
1008 |
uvScale,
|
1009 |
forceUpdate
|
1010 |
) {
|
|
|
1011 |
if (!mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
|
1012 |
let positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);
|
1013 |
let normals = [];
|
@@ -1051,6 +1052,7 @@ window.videoPlay = videoPlay;
|
|
1051 |
}
|
1052 |
mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
|
1053 |
return mesh;
|
|
|
1054 |
}
|
1055 |
window.applyDisplacementMapFromBuffer = applyDisplacementMapFromBuffer;
|
1056 |
|
|
|
773 |
|
774 |
function requestMap() {
|
775 |
try {
|
|
|
776 |
ctx.drawImage(video, 0, 0, video.videoWidth, video.videoHeight);
|
777 |
if (buffer) {
|
778 |
counter = parseInt(video.currentTime);
|
|
|
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 |
+
alert('!');
|
785 |
+
requestAnimationFrame(requestMap);
|
786 |
} catch(e) {alert(e)}
|
787 |
}
|
788 |
window.requestMap = requestMap;
|
|
|
1008 |
uvScale,
|
1009 |
forceUpdate
|
1010 |
) {
|
1011 |
+
try {
|
1012 |
if (!mesh.isVerticesDataPresent(BABYLON.VertexBuffer.NormalKind)) {
|
1013 |
let positions = mesh.getVerticesData(BABYLON.VertexBuffer.PositionKind);
|
1014 |
let normals = [];
|
|
|
1052 |
}
|
1053 |
mesh.setVerticesData(BABYLON.VertexBuffer.PositionKind, positions);
|
1054 |
return mesh;
|
1055 |
+
} catch(e) {alert(e)}
|
1056 |
}
|
1057 |
window.applyDisplacementMapFromBuffer = applyDisplacementMapFromBuffer;
|
1058 |
|