Browse Source

handle context restore

Trevor Baron 6 năm trước cách đây
mục cha
commit
1aec037010

+ 4 - 0
src/Materials/Textures/Loaders/babylon.ktxTextureLoader.ts

@@ -32,6 +32,10 @@ module BABYLON {
          */
         public transformUrl(rootUrl: string, textureFormatInUse: Nullable<string>): string {
             var lastDot = rootUrl.lastIndexOf('.');
+            if (lastDot != -1 && rootUrl.substring(lastDot + 1) == "ktx") {
+                // Already transformed
+                return rootUrl;
+            }
             return (lastDot > -1 ? rootUrl.substring(0, lastDot) : rootUrl) + textureFormatInUse;
         }