Prechádzať zdrojové kódy

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

David 7 rokov pred
rodič
commit
3599f12b5a

+ 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 => {