소스 검색

Multiple createTexture calls were creating large amounts of DOM elements and event listeners causing an eventual performance cliff on looping videos.

David 7 년 전
부모
커밋
3599f12b5a
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      src/Materials/Textures/babylon.videoTexture.ts

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

@@ -49,6 +49,7 @@
 
             if (urls) {
                 this.video.addEventListener("canplay", () => {
+                    if(this._texture !== undefined){ return; }
                     this._createTexture();
                 });
                 urls.forEach(url => {