@babylonjs/ktx2decoder 8.27.2 → 8.28.0
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/package.json +2 -2
- package/transcoder.js +4 -2
- package/transcoder.js.map +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@babylonjs/ktx2decoder",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.28.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"module": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"postcompile": "build-tools -c add-js-to-es6 && build-tools -c cp -f \"../../../tools/babylonServer/public/ktx2Transcoders/1\" -t ./wasm"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
|
-
"@babylonjs/core": "^8.
|
|
22
|
+
"@babylonjs/core": "^8.28.0",
|
|
23
23
|
"@dev/build-tools": "^1.0.0",
|
|
24
24
|
"@tools/ktx2decoder": "^1.0.0"
|
|
25
25
|
},
|
package/transcoder.js
CHANGED
|
@@ -6,8 +6,10 @@ export class Transcoder {
|
|
|
6
6
|
return false;
|
|
7
7
|
}
|
|
8
8
|
static GetWasmUrl(wasmUrl) {
|
|
9
|
-
if (Transcoder.WasmBaseUrl && wasmUrl.startsWith("https://cdn.babylonjs.com
|
|
10
|
-
|
|
9
|
+
if (Transcoder.WasmBaseUrl && wasmUrl.startsWith("https://cdn.babylonjs.com")) {
|
|
10
|
+
// Normalize the base url
|
|
11
|
+
const baseUrl = Transcoder.WasmBaseUrl[Transcoder.WasmBaseUrl.length - 1] === "/" ? Transcoder.WasmBaseUrl.substring(0, Transcoder.WasmBaseUrl.length - 1) : Transcoder.WasmBaseUrl;
|
|
12
|
+
wasmUrl = wasmUrl.replace("https://cdn.babylonjs.com", baseUrl);
|
|
11
13
|
}
|
|
12
14
|
return wasmUrl;
|
|
13
15
|
}
|
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;IAMM,MAAM,CAAC,UAAU,CAAC,OAAe;QACpC,IAAI,UAAU,CAAC,WAAW,IAAI,OAAO,CAAC,UAAU,CAAC,
|
|
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;IAMM,MAAM,CAAC,UAAU,CAAC,OAAe;QACpC,IAAI,UAAU,CAAC,WAAW,IAAI,OAAO,CAAC,UAAU,CAAC,2BAA2B,CAAC,EAAE,CAAC;YAC5E,yBAAyB;YACzB,MAAM,OAAO,GACT,UAAU,CAAC,WAAW,CAAC,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,WAAW,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,WAAW,CAAC;YACxK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC;QACpE,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;;AAtCa,eAAI,GAAG,YAAY,CAAC;AAEpB,sBAAW,GAAG,EAAE,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, 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 public static GetWasmUrl(wasmUrl: string) {\r\n if (Transcoder.WasmBaseUrl && wasmUrl.startsWith(\"https://cdn.babylonjs.com\")) {\r\n // Normalize the base url\r\n const baseUrl =\r\n Transcoder.WasmBaseUrl[Transcoder.WasmBaseUrl.length - 1] === \"/\" ? Transcoder.WasmBaseUrl.substring(0, Transcoder.WasmBaseUrl.length - 1) : Transcoder.WasmBaseUrl;\r\n wasmUrl = wasmUrl.replace(\"https://cdn.babylonjs.com\", baseUrl);\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"]}
|