@babylonjs/ktx2decoder 9.4.1 → 9.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/legacy/legacy.js +4 -5
- package/legacy/legacy.js.map +1 -1
- package/package.json +2 -2
- package/transcoder.js +1 -1
- package/transcoder.js.map +1 -1
package/legacy/legacy.js
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/* eslint-disable @typescript-eslint/no-restricted-imports */
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
2
|
+
// NOTE: The UMD wrapper already assigns the full namespace
|
|
3
|
+
// to globalThis.KTX2DECODER. Manually setting it here to just the KTX2Decoder
|
|
4
|
+
// class would overwrite the namespace object that rollup's `extend: true`
|
|
5
|
+
// passes into the factory, breaking named exports like LiteTranscoder_UASTC_ASTC.
|
|
7
6
|
export * from "../index.js";
|
|
8
7
|
//# sourceMappingURL=legacy.js.map
|
package/legacy/legacy.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../tools/ktx2Decoder/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,6DAA6D;
|
|
1
|
+
{"version":3,"file":"legacy.js","sourceRoot":"","sources":["../../../../tools/ktx2Decoder/src/legacy/legacy.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAE7D,2DAA2D;AAC3D,8EAA8E;AAC9E,0EAA0E;AAC1E,kFAAkF;AAElF,cAAc,UAAU,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-restricted-imports */\r\n\r\n// NOTE: The UMD wrapper already assigns the full namespace\r\n// to globalThis.KTX2DECODER. Manually setting it here to just the KTX2Decoder\r\n// class would overwrite the namespace object that rollup's `extend: true`\r\n// passes into the factory, breaking named exports like LiteTranscoder_UASTC_ASTC.\r\n\r\nexport * from \"../index\";\r\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/ktx2decoder",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.5.1",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"postcompile": "build-tools -c add-js-to-es6 && build-tools -c cp -f \"../../../tools/babylonServer/public/ktx2Transcoders/1\" -t ./wasm && build-tools -c cp -f \"../../../tools/babylonServer/public/zstddec.wasm\" -t ./wasm"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
|
-
"@babylonjs/core": "9.
|
|
23
|
+
"@babylonjs/core": "9.5.1",
|
|
24
24
|
"@dev/build-tools": "^1.0.0",
|
|
25
25
|
"@tools/ktx2decoder": "^1.0.0"
|
|
26
26
|
},
|
package/transcoder.js
CHANGED
|
@@ -43,6 +43,6 @@ Transcoder.WasmBaseUrl = "";
|
|
|
43
43
|
* When set, unversioned CDN URLs will be rewritten to include this version prefix.
|
|
44
44
|
* @internal
|
|
45
45
|
*/
|
|
46
|
-
Transcoder.CdnVersion = "9.
|
|
46
|
+
Transcoder.CdnVersion = "9.5.1";
|
|
47
47
|
Transcoder._DefaultCdnUrl = "https://cdn.babylonjs.com";
|
|
48
48
|
//# sourceMappingURL=transcoder.js.map
|
package/transcoder.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcoder.js","sourceRoot":"","sources":["../../../tools/ktx2Decoder/src/transcoder.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,UAAU;IACZ,MAAM,CAAC,YAAY,CAAC,GAA6B,EAAE,GAAyB,EAAE,cAAuB;QACxG,OAAO,KAAK,CAAC;IACjB,CAAC;IAgBM,MAAM,CAAC,UAAU,CAAC,OAAe;QACpC,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAA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AA2B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type * as KTX2 from \"core/Materials/Textures/ktx2decoderTypes\";\r\n\r\nimport { type WASMMemoryManager } from \"./wasmMemoryManager\";\r\nimport { type KTX2FileReader, type IKTX2_ImageDesc } from \"./ktx2FileReader\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class Transcoder {\r\n public static CanTranscode(src: KTX2.SourceTextureFormat, dst: KTX2.TranscodeTarget, isInGammaSpace: boolean): boolean {\r\n return false;\r\n }\r\n\r\n public static Name = \"Transcoder\";\r\n\r\n public static WasmBaseUrl = \"\";\r\n\r\n /**\r\n * The CDN version to use when constructing versioned CDN URLs.\r\n * Injected at build time by the version update script.\r\n * When set, unversioned CDN URLs will be rewritten to include this version prefix.\r\n * @internal\r\n */\r\n public static CdnVersion = \"9.
|
|
1
|
+
{"version":3,"file":"transcoder.js","sourceRoot":"","sources":["../../../tools/ktx2Decoder/src/transcoder.ts"],"names":[],"mappings":"AAOA;;GAEG;AACH,MAAM,OAAO,UAAU;IACZ,MAAM,CAAC,YAAY,CAAC,GAA6B,EAAE,GAAyB,EAAE,cAAuB;QACxG,OAAO,KAAK,CAAC;IACjB,CAAC;IAgBM,MAAM,CAAC,UAAU,CAAC,OAAe;QACpC,IAAI,OAAO,CAAC,UAAU,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YAChD,IAAI,UAAU,CAAC,WAAW,EAAE,CAAC;gBACzB,yBAAyB;gBACzB,MAAM,OAAO,GAAG,UAAU,CAAC,WAAW,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;gBACpH,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;YAClE,CAAC;iBAAM,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;gBAC/B,MAAM,aAAa,GAAG,GAAG,UAAU,CAAC,cAAc,KAAK,UAAU,CAAC,UAAU,EAAE,CAAC;gBAC/E,iFAAiF;gBACjF,kEAAkE;gBAClE,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,aAAa,CAAC,EAAE,CAAC;oBACrC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,UAAU,CAAC,cAAc,EAAE,aAAa,CAAC,CAAC;gBACxE,CAAC;YACL,CAAC;QACL,CAAC;QACD,OAAO,OAAO,CAAC;IACnB,CAAC;IAEM,OAAO;QACV,OAAO,UAAU,CAAC,IAAI,CAAC;IAC3B,CAAC;IAEM,UAAU,KAAU,CAAC;IAErB,iBAAiB;QACpB,OAAO,KAAK,CAAC;IACjB,CAAC;IAEM,gBAAgB,CAAC,SAA4B,IAAS,CAAC;IAEvD,KAAK,CAAC,SAAS,CAClB,GAA6B,EAC7B,GAAyB,EACzB,KAAa,EACb,KAAa,EACb,MAAc,EACd,sBAA8B,EAC9B,UAA0B,EAC1B,SAAiC,EACjC,WAAuB;QAEvB,OAAO,IAAI,CAAC;IAChB,CAAC;;AAxDa,eAAI,GAAG,YAAY,CAAC;AAEpB,sBAAW,GAAG,EAAE,CAAC;AAE/B;;;;;GAKG;AACW,qBAAU,GAAG,OAAO,CAAC;AAEX,yBAAc,GAAG,2BAA2B,CAAC","sourcesContent":["/* eslint-disable @typescript-eslint/no-unused-vars */\r\n/* eslint-disable @typescript-eslint/naming-convention */\r\nimport type * as KTX2 from \"core/Materials/Textures/ktx2decoderTypes\";\r\n\r\nimport { type WASMMemoryManager } from \"./wasmMemoryManager\";\r\nimport { type KTX2FileReader, type IKTX2_ImageDesc } from \"./ktx2FileReader\";\r\n\r\n/**\r\n * @internal\r\n */\r\nexport class Transcoder {\r\n public static CanTranscode(src: KTX2.SourceTextureFormat, dst: KTX2.TranscodeTarget, isInGammaSpace: boolean): boolean {\r\n return false;\r\n }\r\n\r\n public static Name = \"Transcoder\";\r\n\r\n public static WasmBaseUrl = \"\";\r\n\r\n /**\r\n * The CDN version to use when constructing versioned CDN URLs.\r\n * Injected at build time by the version update script.\r\n * When set, unversioned CDN URLs will be rewritten to include this version prefix.\r\n * @internal\r\n */\r\n public static CdnVersion = \"9.5.1\";\r\n\r\n private static readonly _DefaultCdnUrl = \"https://cdn.babylonjs.com\";\r\n\r\n public static GetWasmUrl(wasmUrl: string) {\r\n if (wasmUrl.startsWith(Transcoder._DefaultCdnUrl)) {\r\n if (Transcoder.WasmBaseUrl) {\r\n // Normalize the base url\r\n const baseUrl = Transcoder.WasmBaseUrl.endsWith(\"/\") ? Transcoder.WasmBaseUrl.slice(0, -1) : Transcoder.WasmBaseUrl;\r\n wasmUrl = wasmUrl.replace(Transcoder._DefaultCdnUrl, baseUrl);\r\n } else if (Transcoder.CdnVersion) {\r\n const versionedBase = `${Transcoder._DefaultCdnUrl}/v${Transcoder.CdnVersion}`;\r\n // Guard against double-versioning if the URL already contains the version prefix\r\n // (e.g. when GetWasmUrl is called multiple times on the same URL)\r\n if (!wasmUrl.startsWith(versionedBase)) {\r\n wasmUrl = wasmUrl.replace(Transcoder._DefaultCdnUrl, versionedBase);\r\n }\r\n }\r\n }\r\n return wasmUrl;\r\n }\r\n\r\n public getName(): string {\r\n return Transcoder.Name;\r\n }\r\n\r\n public initialize(): void {}\r\n\r\n public needMemoryManager(): boolean {\r\n return false;\r\n }\r\n\r\n public setMemoryManager(memoryMgr: WASMMemoryManager): void {}\r\n\r\n public async transcode(\r\n src: KTX2.SourceTextureFormat,\r\n dst: KTX2.TranscodeTarget,\r\n level: number,\r\n width: number,\r\n height: number,\r\n uncompressedByteLength: number,\r\n ktx2Reader: KTX2FileReader,\r\n imageDesc: IKTX2_ImageDesc | null,\r\n encodedData: Uint8Array\r\n ): Promise<Uint8Array | null> {\r\n return null;\r\n }\r\n}\r\n"]}
|