소스 검색

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");