Explorar el Código

Merge pull request #3416 from DavidHGillen/master

Fix performance cliff with Video Textures
David Catuhe hace 7 años
padre
commit
d2ba02d456
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      src/Materials/Textures/babylon.videoTexture.ts

+ 3 - 1
src/Materials/Textures/babylon.videoTexture.ts

@@ -49,7 +49,9 @@
 
             if (urls) {
                 this.video.addEventListener("canplay", () => {
-                    this._createTexture();
+                    if (this._texture === undefined){ 
+                      this._createTexture();
+                    }
                 });
                 urls.forEach(url => {
                     var source = document.createElement("source");