Popov72 пре 5 година
родитељ
комит
aa5a2a7f34

+ 1 - 1
src/Misc/KTX2/KTX2WorkerThread.ts

@@ -35,7 +35,7 @@ export function workerFunc(): void {
 
     onmessage = (event) => {
         if (event.data.action === "init") {
-            postMessage({action: "init"});
+            postMessage({ action: "init" });
         } else if (event.data.action === "createMipmaps") {
             const kfr = new KTX2FileReader(event.data.data);
             _createMipmaps(kfr, event.data.caps).then((mipmaps) => {

+ 5 - 1
src/Misc/KTX2/LiteTranscoder_UASTC_ASTC.ts

@@ -5,12 +5,16 @@ import { LiteTranscoder } from './LiteTranscoder';
  * @hidden
  */
 export class LiteTranscoder_UASTC_ASTC extends LiteTranscoder {
+    /**
+     * URL to use when loading the wasm module for the transcoder
+     */
+    public static WasmModuleURL = "https://preview.babylonjs.com/ktx2Transcoders/uastc_astc.wasm";
 
     public static CanTranscode(src: sourceTextureFormat, dst: transcodeTarget): boolean {
         return src === sourceTextureFormat.UASTC4x4 && dst === transcodeTarget.ASTC_4x4_RGBA;
     }
 
     public initialize(): void {
-        this.setModulePath("https://preview.babylonjs.com/ktx2Transcoders/uastc_astc.wasm");
+        this.setModulePath(LiteTranscoder_UASTC_ASTC.WasmModuleURL);
     }
 }

+ 5 - 1
src/Misc/KTX2/LiteTranscoder_UASTC_BC7.ts

@@ -5,12 +5,16 @@ import { LiteTranscoder } from './LiteTranscoder';
  * @hidden
  */
 export class LiteTranscoder_UASTC_BC7 extends LiteTranscoder {
+    /**
+     * URL to use when loading the wasm module for the transcoder
+     */
+    public static WasmModuleURL = "https://preview.babylonjs.com/ktx2Transcoders/uastc_bc7.wasm";
 
     public static CanTranscode(src: sourceTextureFormat, dst: transcodeTarget): boolean {
         return src === sourceTextureFormat.UASTC4x4 && dst === transcodeTarget.BC7_M5_RGBA;
     }
 
     public initialize(): void {
-        this.setModulePath("https://preview.babylonjs.com/ktx2Transcoders/uastc_bc7.wasm");
+        this.setModulePath(LiteTranscoder_UASTC_BC7.WasmModuleURL);
     }
 }