Преглед изворни кода

Merge pull request #3416 from DavidHGillen/master

Fix performance cliff with Video Textures
David Catuhe пре 7 година
родитељ
комит
d2ba02d456
1 измењених фајлова са 3 додато и 1 уклоњено
  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");