Explorar o código

Merge pull request #3416 from DavidHGillen/master

Fix performance cliff with Video Textures
David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
d2ba02d456
Modificáronse 1 ficheiros con 3 adicións e 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");