babylonjs-ktx2encoder 0.0.0-stage → 9.35.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.
@@ -0,0 +1,124 @@
1
+
2
+ declare namespace KTX2ENCODER {
3
+ /**
4
+ * Usage determines the format and color metadata of an encoded texture.
5
+ * @experimental
6
+ */
7
+ export type KTX2EncoderUsage = "color" | "data" | "normal";
8
+ /**
9
+ * Options for encoding RGBA8 pixels into a KHR_texture_basisu-compatible KTX2 file.
10
+ * @experimental
11
+ */
12
+ export interface IKTX2EncoderOptions {
13
+ /**
14
+ * Color uses ETC1S and sRGB; data and normal use linear UASTC.
15
+ * @experimental
16
+ */
17
+ usage: KTX2EncoderUsage;
18
+ /**
19
+ * Generate a full mip pyramid. Defaults to true.
20
+ * @experimental
21
+ */
22
+ generateMipmaps?: boolean;
23
+ /**
24
+ * Reverse the input row order in Basis. Defaults to false.
25
+ * @experimental
26
+ */
27
+ flipY?: boolean;
28
+ /**
29
+ * Integer ETC1S quality for color usage only, from 1 to 255. Defaults to 128.
30
+ * @experimental
31
+ */
32
+ etc1sQualityLevel?: number;
33
+ /**
34
+ * Integer ETC1S compression effort for color usage only, from 0 to 6. Defaults to 2.
35
+ * @experimental
36
+ */
37
+ etc1sCompressionLevel?: number;
38
+ /**
39
+ * Integer UASTC quality for data and normal usage only, from 0 to 4. Defaults to 2.
40
+ * @experimental
41
+ */
42
+ uastcQualityLevel?: number;
43
+ /**
44
+ * Use Zstandard with UASTC. Defaults to true for data and normal. Ignored for color.
45
+ * @experimental
46
+ */
47
+ zstandard?: boolean;
48
+ }
49
+ /**
50
+ * Encoder-wide option overrides. Each field applies only to the usages that accept it.
51
+ * @internal
52
+ */
53
+ export type _IKTX2EncoderDefaultOptions = Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
54
+
55
+
56
+ /**
57
+ * Encodes RGBA8 pixel data as KTX2 ETC1S or UASTC data.
58
+ * @experimental
59
+ */
60
+ export class KTX2Encoder {
61
+ /**
62
+ * URL of the Basis encoder JavaScript factory. Configure before constructing an encoder.
63
+ * URL loading evaluates trusted JavaScript and requires CSP 'unsafe-eval'.
64
+ * @experimental
65
+ */
66
+ static JSModuleURL: string;
67
+ /**
68
+ * URL of the Basis encoder WebAssembly binary. Configure before constructing an encoder.
69
+ * @experimental
70
+ */
71
+ static WasmModuleURL: string;
72
+ /**
73
+ * Injected Basis encoder WebAssembly binary, or null to load WasmModuleURL.
74
+ * Configure before constructing an encoder.
75
+ * @experimental
76
+ */
77
+ static WasmBinary: ArrayBuffer | null;
78
+ /**
79
+ * Injected Basis encoder factory, or null to load JSModuleURL.
80
+ * Configure before constructing an encoder.
81
+ * @experimental
82
+ */
83
+ static JSModule: unknown;
84
+ /**
85
+ * Encoder-wide options that override per-call options, as KTX2Decoder.DefaultDecoderOptions does.
86
+ * ETC1S fields apply only to color usage; uastcQualityLevel and zstandard apply only to data and normal usage.
87
+ * Undefined fields leave per-call options and built-in defaults in effect. Read at each encode call.
88
+ * @experimental
89
+ */
90
+ static DefaultEncoderOptions: Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
91
+ private readonly _configuration;
92
+ private _basisModule?;
93
+ private _initializationPromise?;
94
+ /**
95
+ * Captures the static resource settings without loading the codec.
96
+ * The first encode initializes the codec lazily.
97
+ * @experimental
98
+ */
99
+ constructor();
100
+ /** @internal */
101
+ _initializeAsync(): Promise<void>;
102
+ private _loadAsync;
103
+ /**
104
+ * Encodes an RGBA8 image.
105
+ * Loads the codec on first use. The official Basis v2_50 factory requires CSP 'unsafe-eval' for Embind.
106
+ * Compression is synchronous after initialization; calls on this thread cannot overlap.
107
+ * @param rgba RGBA8 source pixels, top-down unless `flipY` is true.
108
+ * @param width Source width in pixels.
109
+ * @param height Source height in pixels.
110
+ * @param options Encoding options. Defined DefaultEncoderOptions fields for this usage take priority.
111
+ * @returns The encoded KTX2 file.
112
+ * @experimental
113
+ */
114
+ encode(rgba: Uint8Array, width: number, height: number, options: IKTX2EncoderOptions): Promise<Uint8Array>;
115
+ }
116
+
117
+
118
+
119
+
120
+
121
+ }
122
+
123
+
124
+
@@ -0,0 +1,2 @@
1
+ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KTX2ENCODER=e.KTX2ENCODER||{})}(this,function(e){"use strict";const t=Symbol("KTX2EncoderBasisInitialized"),s=16384,o=12582912,i=async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load the Basis encoder JavaScript module from '${e}': ${t.status} ${t.statusText}.`);const s=await t.text();if("object"==typeof process&&process.versions?.node){const e=process.cwd(),t=`${e}/basis_encoder.js`,o=process.getBuiltinModule("module").createRequire(t);return Function("require","__dirname","__filename",`${s}\nreturn BASIS;`)(o,e,t)}return Function(`${s}\nreturn BASIS;`)()};class a{constructor(){this._configuration={jsModule:a.JSModule,wasmBinary:a.WasmBinary,jsModuleURL:a.JSModuleURL,wasmModuleURL:a.WasmModuleURL}}async _initializeAsync(){const e=this._initializationPromise??=this._loadAsync();try{await e}catch(t){throw this._initializationPromise===e&&(this._initializationPromise=void 0),t}}async _loadAsync(){const e=this._configuration;if(!e.jsModule&&!e.jsModuleURL)throw new Error("A Basis encoder JSModule or JSModuleURL is required.");if(!e.wasmBinary&&!e.wasmModuleURL)throw new Error("A Basis encoder WasmBinary or WasmModuleURL is required.");const[s,o]=await Promise.all([e.jsModule??i(e.jsModuleURL),(async()=>{if(e.wasmBinary)return e.wasmBinary;const t=await fetch(e.wasmModuleURL);if(!t.ok)throw new Error(`Failed to load the Basis encoder WebAssembly module from '${e.wasmModuleURL}': ${t.status} ${t.statusText}.`);return await t.arrayBuffer()})()]),a=await s({wasmBinary:o});a[t]||(a.initializeBasis(),a[t]=!0),this._basisModule=a}async encode(e,t,i,r){if(!Number.isInteger(t)||!Number.isInteger(i)||t<=0||i<=0||t%4!=0||i%4!=0)throw new Error("KTX2 encoder width and height must be positive multiples of 4.");if(t>s||i>s)throw new Error(`KTX2 encoder width and height cannot exceed ${s.toLocaleString("en-US")} pixels.`);if(t*i>o)throw new Error(`KTX2 encoder images cannot exceed ${o.toLocaleString("en-US")} pixels.`);const n=t*i*4;if(e.byteLength!==n)throw new Error(`RGBA input byte length must be ${n} for a ${t}x${i} image, but received ${e.byteLength}.`);if("color"!==r.usage&&"data"!==r.usage&&"normal"!==r.usage)throw new Error("usage must be 'color', 'data', or 'normal'.");const l=a.DefaultEncoderOptions,c={...r,..."color"===r.usage?{etc1sQualityLevel:l.etc1sQualityLevel??r.etc1sQualityLevel,etc1sCompressionLevel:l.etc1sCompressionLevel??r.etc1sCompressionLevel}:{uastcQualityLevel:l.uastcQualityLevel??r.uastcQualityLevel,zstandard:l.zstandard??r.zstandard}};this._basisModule||await this._initializeAsync();const u=this._basisModule,d=new u.BasisEncoder;try{const s="color"===c.usage;if("normal"===c.usage&&d.setNormalMapPreset(),d.setCreateKTX2File(!0),d.setTexType(u.basis_texture_type.cBASISTexType2D.value),d.setFormatMode((s?u.basis_tex_format.cETC1S:u.basis_tex_format.cUASTC_LDR_4x4).value),d.setPerceptual(s),d.setMipSRGB(s),d.setKTX2AndBasisSRGBTransferFunc(s),d.setMipGen(c.generateMipmaps??!0),d.setYFlip(c.flipY??!1),s?(d.setQualityLevel(c.etc1sQualityLevel??128),d.setETC1SCompressionLevel(c.etc1sCompressionLevel??2)):(d.setPackUASTCFlags(c.uastcQualityLevel??2),d.setKTX2UASTCSupercompression(c.zstandard??!0)),!d.setSliceSourceImage(0,e,t,i,0))throw new Error(`Basis rejected the ${t}x${i} RGBA source image.`);let o=new Uint8Array(e.byteLength+65536),a=d.encode(o);if(0===a&&(o=new Uint8Array(2*o.byteLength),a=d.encode(o)),0===a)throw new Error(`Basis failed to encode the ${t}x${i} '${c.usage}' texture.`);const r=o.slice(0,a);return s||(e=>{if(e.byteLength<52)throw new Error("Basis produced an invalid KTX2 file without a complete header.");const t=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(48,!0)+13;if(t>=e.byteLength)throw new Error("Basis produced an invalid KTX2 file with an out-of-range DFD.");e[t]=0})(r),r}finally{d.delete()}}}a.JSModuleURL="https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.js",a.WasmModuleURL="https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.wasm",a.WasmBinary=null,a.JSModule=null,a.DefaultEncoderOptions={},e.KTX2Encoder=a});
2
+ //# sourceMappingURL=babylon.ktx2Encoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babylon.ktx2Encoder.js","sources":["file:///Users/raananweber/GithubCopilot/copilot-worktrees/babylon.js/raananw-fluffy-memory/packages/tools/ktx2Encoder/dist/ktx2Encoder.js"],"sourcesContent":["const OutputBufferPadding = 65_536;\nconst KTX2DFDOffsetPosition = 48;\nconst KTX2PrimariesOffsetInDFD = 13;\nconst BasisInitialized = Symbol(\"KTX2EncoderBasisInitialized\");\nconst MaxDimension = 16_384;\nconst MaxPixels = 12_582_912;\nconst PatchDFDPrimaries = (data) => {\n if (data.byteLength < KTX2DFDOffsetPosition + 4) {\n throw new Error(\"Basis produced an invalid KTX2 file without a complete header.\");\n }\n const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n const dfdByteOffset = dataView.getUint32(KTX2DFDOffsetPosition, true);\n const primariesPosition = dfdByteOffset + KTX2PrimariesOffsetInDFD;\n if (primariesPosition >= data.byteLength) {\n throw new Error(\"Basis produced an invalid KTX2 file with an out-of-range DFD.\");\n }\n data[primariesPosition] = 0;\n};\nconst LoadFactoryAsync = async (url) => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to load the Basis encoder JavaScript module from '${url}': ${response.status} ${response.statusText}.`);\n }\n const source = await response.text();\n if (typeof process === \"object\" && process.versions?.node) {\n // WASM is supplied directly, so the factory only needs Node's built-ins.\n const directory = process.cwd();\n const filename = `${directory}/basis_encoder.js`;\n const nodeRequire = process.getBuiltinModule(\"module\").createRequire(filename);\n return Function(\"require\", \"__dirname\", \"__filename\", `${source}\\nreturn BASIS;`)(nodeRequire, directory, filename);\n }\n return Function(`${source}\\nreturn BASIS;`)();\n};\n/**\n * Encodes RGBA8 pixel data as KTX2 ETC1S or UASTC data.\n * @experimental\n */\nexport class KTX2Encoder {\n /**\n * Captures the static resource settings without loading the codec.\n * The first encode initializes the codec lazily.\n * @experimental\n */\n constructor() {\n this._configuration = {\n jsModule: KTX2Encoder.JSModule,\n wasmBinary: KTX2Encoder.WasmBinary,\n jsModuleURL: KTX2Encoder.JSModuleURL,\n wasmModuleURL: KTX2Encoder.WasmModuleURL,\n };\n }\n /** @internal */\n async _initializeAsync() {\n const initialization = (this._initializationPromise ??= this._loadAsync());\n try {\n await initialization;\n }\n catch (error) {\n if (this._initializationPromise === initialization) {\n this._initializationPromise = undefined;\n }\n throw error;\n }\n }\n async _loadAsync() {\n const config = this._configuration;\n if (!config.jsModule && !config.jsModuleURL) {\n throw new Error(\"A Basis encoder JSModule or JSModuleURL is required.\");\n }\n if (!config.wasmBinary && !config.wasmModuleURL) {\n throw new Error(\"A Basis encoder WasmBinary or WasmModuleURL is required.\");\n }\n const [factory, wasmBinary] = await Promise.all([\n config.jsModule ?? LoadFactoryAsync(config.jsModuleURL),\n (async () => {\n if (config.wasmBinary) {\n return config.wasmBinary;\n }\n const response = await fetch(config.wasmModuleURL);\n if (!response.ok) {\n throw new Error(`Failed to load the Basis encoder WebAssembly module from '${config.wasmModuleURL}': ${response.status} ${response.statusText}.`);\n }\n return await response.arrayBuffer();\n })(),\n ]);\n const basisModule = await factory({ wasmBinary });\n if (!basisModule[BasisInitialized]) {\n basisModule.initializeBasis();\n basisModule[BasisInitialized] = true;\n }\n this._basisModule = basisModule;\n }\n /**\n * Encodes an RGBA8 image.\n * Loads the codec on first use. The official Basis v2_50 factory requires CSP 'unsafe-eval' for Embind.\n * Compression is synchronous after initialization; calls on this thread cannot overlap.\n * @param rgba RGBA8 source pixels, top-down unless `flipY` is true.\n * @param width Source width in pixels.\n * @param height Source height in pixels.\n * @param options Encoding options. Defined DefaultEncoderOptions fields for this usage take priority.\n * @returns The encoded KTX2 file.\n * @experimental\n */\n async encode(rgba, width, height, options) {\n if (!Number.isInteger(width) || !Number.isInteger(height) || width <= 0 || height <= 0 || width % 4 !== 0 || height % 4 !== 0) {\n throw new Error(\"KTX2 encoder width and height must be positive multiples of 4.\");\n }\n if (width > MaxDimension || height > MaxDimension) {\n throw new Error(`KTX2 encoder width and height cannot exceed ${MaxDimension.toLocaleString(\"en-US\")} pixels.`);\n }\n if (width * height > MaxPixels) {\n throw new Error(`KTX2 encoder images cannot exceed ${MaxPixels.toLocaleString(\"en-US\")} pixels.`);\n }\n const expectedByteLength = width * height * 4;\n if (rgba.byteLength !== expectedByteLength) {\n throw new Error(`RGBA input byte length must be ${expectedByteLength} for a ${width}x${height} image, but received ${rgba.byteLength}.`);\n }\n if (options.usage !== \"color\" && options.usage !== \"data\" && options.usage !== \"normal\") {\n throw new Error(\"usage must be 'color', 'data', or 'normal'.\");\n }\n const defaults = KTX2Encoder.DefaultEncoderOptions;\n const effectiveOptions = {\n ...options,\n ...(options.usage === \"color\"\n ? {\n etc1sQualityLevel: defaults.etc1sQualityLevel ?? options.etc1sQualityLevel,\n etc1sCompressionLevel: defaults.etc1sCompressionLevel ?? options.etc1sCompressionLevel,\n }\n : {\n uastcQualityLevel: defaults.uastcQualityLevel ?? options.uastcQualityLevel,\n zstandard: defaults.zstandard ?? options.zstandard,\n }),\n };\n if (!this._basisModule) {\n await this._initializeAsync();\n }\n const basisModule = this._basisModule;\n const encoder = new basisModule.BasisEncoder();\n try {\n const isColor = effectiveOptions.usage === \"color\";\n if (effectiveOptions.usage === \"normal\") {\n encoder.setNormalMapPreset();\n }\n encoder.setCreateKTX2File(true);\n encoder.setTexType(basisModule.basis_texture_type.cBASISTexType2D.value);\n encoder.setFormatMode((isColor ? basisModule.basis_tex_format.cETC1S : basisModule.basis_tex_format.cUASTC_LDR_4x4).value);\n encoder.setPerceptual(isColor);\n encoder.setMipSRGB(isColor);\n encoder.setKTX2AndBasisSRGBTransferFunc(isColor);\n encoder.setMipGen(effectiveOptions.generateMipmaps ?? true);\n encoder.setYFlip(effectiveOptions.flipY ?? false);\n if (isColor) {\n encoder.setQualityLevel(effectiveOptions.etc1sQualityLevel ?? 128);\n encoder.setETC1SCompressionLevel(effectiveOptions.etc1sCompressionLevel ?? 2);\n }\n else {\n encoder.setPackUASTCFlags(effectiveOptions.uastcQualityLevel ?? 2);\n encoder.setKTX2UASTCSupercompression(effectiveOptions.zstandard ?? true);\n }\n if (!encoder.setSliceSourceImage(0, rgba, width, height, 0)) {\n throw new Error(`Basis rejected the ${width}x${height} RGBA source image.`);\n }\n let output = new Uint8Array(rgba.byteLength + OutputBufferPadding);\n let encodedByteLength = encoder.encode(output);\n if (encodedByteLength === 0) {\n output = new Uint8Array(output.byteLength * 2);\n encodedByteLength = encoder.encode(output);\n }\n if (encodedByteLength === 0) {\n throw new Error(`Basis failed to encode the ${width}x${height} '${effectiveOptions.usage}' texture.`);\n }\n const encoded = output.slice(0, encodedByteLength);\n if (!isColor) {\n PatchDFDPrimaries(encoded);\n }\n return encoded;\n }\n finally {\n encoder.delete();\n }\n }\n}\n/**\n * URL of the Basis encoder JavaScript factory. Configure before constructing an encoder.\n * URL loading evaluates trusted JavaScript and requires CSP 'unsafe-eval'.\n * @experimental\n */\nKTX2Encoder.JSModuleURL = \"https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.js\";\n/**\n * URL of the Basis encoder WebAssembly binary. Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.WasmModuleURL = \"https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.wasm\";\n/**\n * Injected Basis encoder WebAssembly binary, or null to load WasmModuleURL.\n * Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.WasmBinary = null;\n/**\n * Injected Basis encoder factory, or null to load JSModuleURL.\n * Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.JSModule = null;\n/**\n * Encoder-wide options that override per-call options, as KTX2Decoder.DefaultDecoderOptions does.\n * ETC1S fields apply only to color usage; uastcQualityLevel and zstandard apply only to data and normal usage.\n * Undefined fields leave per-call options and built-in defaults in effect. Read at each encode call.\n * @experimental\n */\nKTX2Encoder.DefaultEncoderOptions = {};\n//# sourceMappingURL=ktx2Encoder.js.map"],"names":["BasisInitialized","Symbol","MaxDimension","MaxPixels","LoadFactoryAsync","async","url","response","fetch","ok","Error","status","statusText","source","text","process","versions","node","directory","cwd","filename","nodeRequire","getBuiltinModule","createRequire","Function","KTX2Encoder","constructor","this","_configuration","jsModule","JSModule","wasmBinary","WasmBinary","jsModuleURL","JSModuleURL","wasmModuleURL","WasmModuleURL","_initializeAsync","initialization","_initializationPromise","_loadAsync","error","undefined","config","factory","Promise","all","arrayBuffer","basisModule","initializeBasis","_basisModule","encode","rgba","width","height","options","Number","isInteger","toLocaleString","expectedByteLength","byteLength","usage","defaults","DefaultEncoderOptions","effectiveOptions","etc1sQualityLevel","etc1sCompressionLevel","uastcQualityLevel","zstandard","encoder","BasisEncoder","isColor","setNormalMapPreset","setCreateKTX2File","setTexType","basis_texture_type","cBASISTexType2D","value","setFormatMode","basis_tex_format","cETC1S","cUASTC_LDR_4x4","setPerceptual","setMipSRGB","setKTX2AndBasisSRGBTransferFunc","setMipGen","generateMipmaps","setYFlip","flipY","setQualityLevel","setETC1SCompressionLevel","setPackUASTCFlags","setKTX2UASTCSupercompression","setSliceSourceImage","output","Uint8Array","encodedByteLength","encoded","slice","data","KTX2DFDOffsetPosition","primariesPosition","DataView","buffer","byteOffset","getUint32","PatchDFDPrimaries","delete"],"mappings":"iQAAA,MAGMA,EAAmBC,OAAO,+BAC1BC,EAAe,MACfC,EAAY,SAaZC,EAAmBC,MAAOC,IAC5B,MAAMC,Q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"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).KTX2ENCODER=e.KTX2ENCODER||{})}(this,function(e){"use strict";const t=Symbol("KTX2EncoderBasisInitialized"),s=16384,o=12582912,i=async e=>{const t=await fetch(e);if(!t.ok)throw new Error(`Failed to load the Basis encoder JavaScript module from '${e}': ${t.status} ${t.statusText}.`);const s=await t.text();if("object"==typeof process&&process.versions?.node){const e=process.cwd(),t=`${e}/basis_encoder.js`,o=process.getBuiltinModule("module").createRequire(t);return Function("require","__dirname","__filename",`${s}\nreturn BASIS;`)(o,e,t)}return Function(`${s}\nreturn BASIS;`)()};class a{constructor(){this._configuration={jsModule:a.JSModule,wasmBinary:a.WasmBinary,jsModuleURL:a.JSModuleURL,wasmModuleURL:a.WasmModuleURL}}async _initializeAsync(){const e=this._initializationPromise??=this._loadAsync();try{await e}catch(t){throw this._initializationPromise===e&&(this._initializationPromise=void 0),t}}async _loadAsync(){const e=this._configuration;if(!e.jsModule&&!e.jsModuleURL)throw new Error("A Basis encoder JSModule or JSModuleURL is required.");if(!e.wasmBinary&&!e.wasmModuleURL)throw new Error("A Basis encoder WasmBinary or WasmModuleURL is required.");const[s,o]=await Promise.all([e.jsModule??i(e.jsModuleURL),(async()=>{if(e.wasmBinary)return e.wasmBinary;const t=await fetch(e.wasmModuleURL);if(!t.ok)throw new Error(`Failed to load the Basis encoder WebAssembly module from '${e.wasmModuleURL}': ${t.status} ${t.statusText}.`);return await t.arrayBuffer()})()]),a=await s({wasmBinary:o});a[t]||(a.initializeBasis(),a[t]=!0),this._basisModule=a}async encode(e,t,i,r){if(!Number.isInteger(t)||!Number.isInteger(i)||t<=0||i<=0||t%4!=0||i%4!=0)throw new Error("KTX2 encoder width and height must be positive multiples of 4.");if(t>s||i>s)throw new Error(`KTX2 encoder width and height cannot exceed ${s.toLocaleString("en-US")} pixels.`);if(t*i>o)throw new Error(`KTX2 encoder images cannot exceed ${o.toLocaleString("en-US")} pixels.`);const n=t*i*4;if(e.byteLength!==n)throw new Error(`RGBA input byte length must be ${n} for a ${t}x${i} image, but received ${e.byteLength}.`);if("color"!==r.usage&&"data"!==r.usage&&"normal"!==r.usage)throw new Error("usage must be 'color', 'data', or 'normal'.");const l=a.DefaultEncoderOptions,c={...r,..."color"===r.usage?{etc1sQualityLevel:l.etc1sQualityLevel??r.etc1sQualityLevel,etc1sCompressionLevel:l.etc1sCompressionLevel??r.etc1sCompressionLevel}:{uastcQualityLevel:l.uastcQualityLevel??r.uastcQualityLevel,zstandard:l.zstandard??r.zstandard}};this._basisModule||await this._initializeAsync();const u=this._basisModule,d=new u.BasisEncoder;try{const s="color"===c.usage;if("normal"===c.usage&&d.setNormalMapPreset(),d.setCreateKTX2File(!0),d.setTexType(u.basis_texture_type.cBASISTexType2D.value),d.setFormatMode((s?u.basis_tex_format.cETC1S:u.basis_tex_format.cUASTC_LDR_4x4).value),d.setPerceptual(s),d.setMipSRGB(s),d.setKTX2AndBasisSRGBTransferFunc(s),d.setMipGen(c.generateMipmaps??!0),d.setYFlip(c.flipY??!1),s?(d.setQualityLevel(c.etc1sQualityLevel??128),d.setETC1SCompressionLevel(c.etc1sCompressionLevel??2)):(d.setPackUASTCFlags(c.uastcQualityLevel??2),d.setKTX2UASTCSupercompression(c.zstandard??!0)),!d.setSliceSourceImage(0,e,t,i,0))throw new Error(`Basis rejected the ${t}x${i} RGBA source image.`);let o=new Uint8Array(e.byteLength+65536),a=d.encode(o);if(0===a&&(o=new Uint8Array(2*o.byteLength),a=d.encode(o)),0===a)throw new Error(`Basis failed to encode the ${t}x${i} '${c.usage}' texture.`);const r=o.slice(0,a);return s||(e=>{if(e.byteLength<52)throw new Error("Basis produced an invalid KTX2 file without a complete header.");const t=new DataView(e.buffer,e.byteOffset,e.byteLength).getUint32(48,!0)+13;if(t>=e.byteLength)throw new Error("Basis produced an invalid KTX2 file with an out-of-range DFD.");e[t]=0})(r),r}finally{d.delete()}}}a.JSModuleURL="https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.js",a.WasmModuleURL="https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.wasm",a.WasmBinary=null,a.JSModule=null,a.DefaultEncoderOptions={},e.KTX2Encoder=a});
2
+ //# sourceMappingURL=babylon.ktx2Encoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"babylon.ktx2Encoder.js","sources":["file:///Users/raananweber/GithubCopilot/copilot-worktrees/babylon.js/raananw-fluffy-memory/packages/tools/ktx2Encoder/dist/ktx2Encoder.js"],"sourcesContent":["const OutputBufferPadding = 65_536;\nconst KTX2DFDOffsetPosition = 48;\nconst KTX2PrimariesOffsetInDFD = 13;\nconst BasisInitialized = Symbol(\"KTX2EncoderBasisInitialized\");\nconst MaxDimension = 16_384;\nconst MaxPixels = 12_582_912;\nconst PatchDFDPrimaries = (data) => {\n if (data.byteLength < KTX2DFDOffsetPosition + 4) {\n throw new Error(\"Basis produced an invalid KTX2 file without a complete header.\");\n }\n const dataView = new DataView(data.buffer, data.byteOffset, data.byteLength);\n const dfdByteOffset = dataView.getUint32(KTX2DFDOffsetPosition, true);\n const primariesPosition = dfdByteOffset + KTX2PrimariesOffsetInDFD;\n if (primariesPosition >= data.byteLength) {\n throw new Error(\"Basis produced an invalid KTX2 file with an out-of-range DFD.\");\n }\n data[primariesPosition] = 0;\n};\nconst LoadFactoryAsync = async (url) => {\n const response = await fetch(url);\n if (!response.ok) {\n throw new Error(`Failed to load the Basis encoder JavaScript module from '${url}': ${response.status} ${response.statusText}.`);\n }\n const source = await response.text();\n if (typeof process === \"object\" && process.versions?.node) {\n // WASM is supplied directly, so the factory only needs Node's built-ins.\n const directory = process.cwd();\n const filename = `${directory}/basis_encoder.js`;\n const nodeRequire = process.getBuiltinModule(\"module\").createRequire(filename);\n return Function(\"require\", \"__dirname\", \"__filename\", `${source}\\nreturn BASIS;`)(nodeRequire, directory, filename);\n }\n return Function(`${source}\\nreturn BASIS;`)();\n};\n/**\n * Encodes RGBA8 pixel data as KTX2 ETC1S or UASTC data.\n * @experimental\n */\nexport class KTX2Encoder {\n /**\n * Captures the static resource settings without loading the codec.\n * The first encode initializes the codec lazily.\n * @experimental\n */\n constructor() {\n this._configuration = {\n jsModule: KTX2Encoder.JSModule,\n wasmBinary: KTX2Encoder.WasmBinary,\n jsModuleURL: KTX2Encoder.JSModuleURL,\n wasmModuleURL: KTX2Encoder.WasmModuleURL,\n };\n }\n /** @internal */\n async _initializeAsync() {\n const initialization = (this._initializationPromise ??= this._loadAsync());\n try {\n await initialization;\n }\n catch (error) {\n if (this._initializationPromise === initialization) {\n this._initializationPromise = undefined;\n }\n throw error;\n }\n }\n async _loadAsync() {\n const config = this._configuration;\n if (!config.jsModule && !config.jsModuleURL) {\n throw new Error(\"A Basis encoder JSModule or JSModuleURL is required.\");\n }\n if (!config.wasmBinary && !config.wasmModuleURL) {\n throw new Error(\"A Basis encoder WasmBinary or WasmModuleURL is required.\");\n }\n const [factory, wasmBinary] = await Promise.all([\n config.jsModule ?? LoadFactoryAsync(config.jsModuleURL),\n (async () => {\n if (config.wasmBinary) {\n return config.wasmBinary;\n }\n const response = await fetch(config.wasmModuleURL);\n if (!response.ok) {\n throw new Error(`Failed to load the Basis encoder WebAssembly module from '${config.wasmModuleURL}': ${response.status} ${response.statusText}.`);\n }\n return await response.arrayBuffer();\n })(),\n ]);\n const basisModule = await factory({ wasmBinary });\n if (!basisModule[BasisInitialized]) {\n basisModule.initializeBasis();\n basisModule[BasisInitialized] = true;\n }\n this._basisModule = basisModule;\n }\n /**\n * Encodes an RGBA8 image.\n * Loads the codec on first use. The official Basis v2_50 factory requires CSP 'unsafe-eval' for Embind.\n * Compression is synchronous after initialization; calls on this thread cannot overlap.\n * @param rgba RGBA8 source pixels, top-down unless `flipY` is true.\n * @param width Source width in pixels.\n * @param height Source height in pixels.\n * @param options Encoding options. Defined DefaultEncoderOptions fields for this usage take priority.\n * @returns The encoded KTX2 file.\n * @experimental\n */\n async encode(rgba, width, height, options) {\n if (!Number.isInteger(width) || !Number.isInteger(height) || width <= 0 || height <= 0 || width % 4 !== 0 || height % 4 !== 0) {\n throw new Error(\"KTX2 encoder width and height must be positive multiples of 4.\");\n }\n if (width > MaxDimension || height > MaxDimension) {\n throw new Error(`KTX2 encoder width and height cannot exceed ${MaxDimension.toLocaleString(\"en-US\")} pixels.`);\n }\n if (width * height > MaxPixels) {\n throw new Error(`KTX2 encoder images cannot exceed ${MaxPixels.toLocaleString(\"en-US\")} pixels.`);\n }\n const expectedByteLength = width * height * 4;\n if (rgba.byteLength !== expectedByteLength) {\n throw new Error(`RGBA input byte length must be ${expectedByteLength} for a ${width}x${height} image, but received ${rgba.byteLength}.`);\n }\n if (options.usage !== \"color\" && options.usage !== \"data\" && options.usage !== \"normal\") {\n throw new Error(\"usage must be 'color', 'data', or 'normal'.\");\n }\n const defaults = KTX2Encoder.DefaultEncoderOptions;\n const effectiveOptions = {\n ...options,\n ...(options.usage === \"color\"\n ? {\n etc1sQualityLevel: defaults.etc1sQualityLevel ?? options.etc1sQualityLevel,\n etc1sCompressionLevel: defaults.etc1sCompressionLevel ?? options.etc1sCompressionLevel,\n }\n : {\n uastcQualityLevel: defaults.uastcQualityLevel ?? options.uastcQualityLevel,\n zstandard: defaults.zstandard ?? options.zstandard,\n }),\n };\n if (!this._basisModule) {\n await this._initializeAsync();\n }\n const basisModule = this._basisModule;\n const encoder = new basisModule.BasisEncoder();\n try {\n const isColor = effectiveOptions.usage === \"color\";\n if (effectiveOptions.usage === \"normal\") {\n encoder.setNormalMapPreset();\n }\n encoder.setCreateKTX2File(true);\n encoder.setTexType(basisModule.basis_texture_type.cBASISTexType2D.value);\n encoder.setFormatMode((isColor ? basisModule.basis_tex_format.cETC1S : basisModule.basis_tex_format.cUASTC_LDR_4x4).value);\n encoder.setPerceptual(isColor);\n encoder.setMipSRGB(isColor);\n encoder.setKTX2AndBasisSRGBTransferFunc(isColor);\n encoder.setMipGen(effectiveOptions.generateMipmaps ?? true);\n encoder.setYFlip(effectiveOptions.flipY ?? false);\n if (isColor) {\n encoder.setQualityLevel(effectiveOptions.etc1sQualityLevel ?? 128);\n encoder.setETC1SCompressionLevel(effectiveOptions.etc1sCompressionLevel ?? 2);\n }\n else {\n encoder.setPackUASTCFlags(effectiveOptions.uastcQualityLevel ?? 2);\n encoder.setKTX2UASTCSupercompression(effectiveOptions.zstandard ?? true);\n }\n if (!encoder.setSliceSourceImage(0, rgba, width, height, 0)) {\n throw new Error(`Basis rejected the ${width}x${height} RGBA source image.`);\n }\n let output = new Uint8Array(rgba.byteLength + OutputBufferPadding);\n let encodedByteLength = encoder.encode(output);\n if (encodedByteLength === 0) {\n output = new Uint8Array(output.byteLength * 2);\n encodedByteLength = encoder.encode(output);\n }\n if (encodedByteLength === 0) {\n throw new Error(`Basis failed to encode the ${width}x${height} '${effectiveOptions.usage}' texture.`);\n }\n const encoded = output.slice(0, encodedByteLength);\n if (!isColor) {\n PatchDFDPrimaries(encoded);\n }\n return encoded;\n }\n finally {\n encoder.delete();\n }\n }\n}\n/**\n * URL of the Basis encoder JavaScript factory. Configure before constructing an encoder.\n * URL loading evaluates trusted JavaScript and requires CSP 'unsafe-eval'.\n * @experimental\n */\nKTX2Encoder.JSModuleURL = \"https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.js\";\n/**\n * URL of the Basis encoder WebAssembly binary. Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.WasmModuleURL = \"https://cdn.babylonjs.com/basisEncoder/v2_50/basis_encoder.wasm\";\n/**\n * Injected Basis encoder WebAssembly binary, or null to load WasmModuleURL.\n * Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.WasmBinary = null;\n/**\n * Injected Basis encoder factory, or null to load JSModuleURL.\n * Configure before constructing an encoder.\n * @experimental\n */\nKTX2Encoder.JSModule = null;\n/**\n * Encoder-wide options that override per-call options, as KTX2Decoder.DefaultDecoderOptions does.\n * ETC1S fields apply only to color usage; uastcQualityLevel and zstandard apply only to data and normal usage.\n * Undefined fields leave per-call options and built-in defaults in effect. Read at each encode call.\n * @experimental\n */\nKTX2Encoder.DefaultEncoderOptions = {};\n//# sourceMappingURL=ktx2Encoder.js.map"],"names":["BasisInitialized","Symbol","MaxDimension","MaxPixels","LoadFactoryAsync","async","url","response","fetch","ok","Error","status","statusText","source","text","process","versions","node","directory","cwd","filename","nodeRequire","getBuiltinModule","createRequire","Function","KTX2Encoder","constructor","this","_configuration","jsModule","JSModule","wasmBinary","WasmBinary","jsModuleURL","JSModuleURL","wasmModuleURL","WasmModuleURL","_initializeAsync","initialization","_initializationPromise","_loadAsync","error","undefined","config","factory","Promise","all","arrayBuffer","basisModule","initializeBasis","_basisModule","encode","rgba","width","height","options","Number","isInteger","toLocaleString","expectedByteLength","byteLength","usage","defaults","DefaultEncoderOptions","effectiveOptions","etc1sQualityLevel","etc1sCompressionLevel","uastcQualityLevel","zstandard","encoder","BasisEncoder","isColor","setNormalMapPreset","setCreateKTX2File","setTexType","basis_texture_type","cBASISTexType2D","value","setFormatMode","basis_tex_format","cETC1S","cUASTC_LDR_4x4","setPerceptual","setMipSRGB","setKTX2AndBasisSRGBTransferFunc","setMipGen","generateMipmaps","setYFlip","flipY","setQualityLevel","setETC1SCompressionLevel","setPackUASTCFlags","setKTX2UASTCSupercompression","setSliceSourceImage","output","Uint8Array","encodedByteLength","encoded","slice","data","KTX2DFDOffsetPosition","primariesPosition","DataView","buffer","byteOffset","getUint32","PatchDFDPrimaries","delete"],"mappings":"iQAAA,MAGMA,EAAmBC,OAAO,+BAC1BC,EAAe,MACfC,EAAY,SAaZC,EAAmBC,MAAOC,IAC5B,MAAMC,QAAiBC,MAAMF,GAC7B,IAAKC,EAASE,GACV,MAAM,IAAIC,MAAM,4DAA4DJ,OAASC,EAASI,UAAUJ,EAASK,eAErH,MAAMC,QAAeN,EAASO,OAC9B,GAAuB,iBAAZC,SAAwBA,QAAQC,UAAUC,KAAM,CAEvD,MAAMC,EAAYH,QAA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B,KAC9DI,EAAQqB,yBAAyB1B,EAAiBE,uBAAyB,KAG3EG,EAAQsB,kBAAkB3B,EAAiBG,mBAAqB,GAChEE,EAAQuB,6BAA6B5B,EAAiBI,YAAa,KAElEC,EAAQwB,oBAAoB,EAAGzC,EAAMC,EAAOC,EAAQ,GACrD,MAAM,IAAI5C,MAAM,sBAAsB2C,KAASC,wBAEnD,IAAIwC,EAAS,IAAIC,WAAW3C,EAAKQ,WAlKjB,OAmKZoC,EAAoB3B,EAAQlB,OAAO2C,GAKvC,GAJ0B,IAAtBE,IACAF,EAAS,IAAIC,WAA+B,EAApBD,EAAOlC,YAC/BoC,EAAoB3B,EAAQlB,OAAO2C,IAEb,IAAtBE,EACA,MAAM,IAAItF,MAAM,8BAA8B2C,KAASC,MAAWU,EAAiBH,mBAEvF,MAAMoC,EAAUH,EAAOI,MAAM,EAAGF,GAIhC,OAHKzB,GAtKS,CAAC4B,IACvB,GAAIA,EAAKvC,WAAawC,GAClB,MAAM,IAAI1F,MAAM,kEAEpB,MAEM2F,EAFW,IAAIC,SAASH,EAAKI,OAAQJ,EAAKK,WAAYL,EAAKvC,YAClC6C,UAVL,IAUsC,GATnC,GAW7B,GAAIJ,GAAqBF,EAAKvC,WAC1B,MAAM,IAAIlD,MAAM,iEAEpByF,EAAKE,GAAqB,GA6JdK,CAAkBT,GAEfA,CACX,CACR,QACY5B,EAAQsC,QACZ,CACJ,EAOJlF,EAAYS,YAAc,gEAK1BT,EAAYW,cAAgB,kEAM5BX,EAAYO,WAAa,KAMzBP,EAAYK,SAAW,KAOvBL,EAAYsC,sBAAwB,CAAA"}
@@ -0,0 +1,252 @@
1
+
2
+ declare module "babylonjs-ktx2encoder/ktx2encoderTypes" {
3
+ /**
4
+ * Usage determines the format and color metadata of an encoded texture.
5
+ * @experimental
6
+ */
7
+ export type KTX2EncoderUsage = "color" | "data" | "normal";
8
+ /**
9
+ * Options for encoding RGBA8 pixels into a KHR_texture_basisu-compatible KTX2 file.
10
+ * @experimental
11
+ */
12
+ export interface IKTX2EncoderOptions {
13
+ /**
14
+ * Color uses ETC1S and sRGB; data and normal use linear UASTC.
15
+ * @experimental
16
+ */
17
+ usage: KTX2EncoderUsage;
18
+ /**
19
+ * Generate a full mip pyramid. Defaults to true.
20
+ * @experimental
21
+ */
22
+ generateMipmaps?: boolean;
23
+ /**
24
+ * Reverse the input row order in Basis. Defaults to false.
25
+ * @experimental
26
+ */
27
+ flipY?: boolean;
28
+ /**
29
+ * Integer ETC1S quality for color usage only, from 1 to 255. Defaults to 128.
30
+ * @experimental
31
+ */
32
+ etc1sQualityLevel?: number;
33
+ /**
34
+ * Integer ETC1S compression effort for color usage only, from 0 to 6. Defaults to 2.
35
+ * @experimental
36
+ */
37
+ etc1sCompressionLevel?: number;
38
+ /**
39
+ * Integer UASTC quality for data and normal usage only, from 0 to 4. Defaults to 2.
40
+ * @experimental
41
+ */
42
+ uastcQualityLevel?: number;
43
+ /**
44
+ * Use Zstandard with UASTC. Defaults to true for data and normal. Ignored for color.
45
+ * @experimental
46
+ */
47
+ zstandard?: boolean;
48
+ }
49
+ /**
50
+ * Encoder-wide option overrides. Each field applies only to the usages that accept it.
51
+ * @internal
52
+ */
53
+ export type _IKTX2EncoderDefaultOptions = Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
54
+
55
+ }
56
+ declare module "babylonjs-ktx2encoder/ktx2Encoder" {
57
+ import { IKTX2EncoderOptions } from "babylonjs-ktx2encoder/ktx2encoderTypes";
58
+ export type { IKTX2EncoderOptions, KTX2EncoderUsage } from "babylonjs-ktx2encoder/ktx2encoderTypes";
59
+ /**
60
+ * Encodes RGBA8 pixel data as KTX2 ETC1S or UASTC data.
61
+ * @experimental
62
+ */
63
+ export class KTX2Encoder {
64
+ /**
65
+ * URL of the Basis encoder JavaScript factory. Configure before constructing an encoder.
66
+ * URL loading evaluates trusted JavaScript and requires CSP 'unsafe-eval'.
67
+ * @experimental
68
+ */
69
+ static JSModuleURL: string;
70
+ /**
71
+ * URL of the Basis encoder WebAssembly binary. Configure before constructing an encoder.
72
+ * @experimental
73
+ */
74
+ static WasmModuleURL: string;
75
+ /**
76
+ * Injected Basis encoder WebAssembly binary, or null to load WasmModuleURL.
77
+ * Configure before constructing an encoder.
78
+ * @experimental
79
+ */
80
+ static WasmBinary: ArrayBuffer | null;
81
+ /**
82
+ * Injected Basis encoder factory, or null to load JSModuleURL.
83
+ * Configure before constructing an encoder.
84
+ * @experimental
85
+ */
86
+ static JSModule: unknown;
87
+ /**
88
+ * Encoder-wide options that override per-call options, as KTX2Decoder.DefaultDecoderOptions does.
89
+ * ETC1S fields apply only to color usage; uastcQualityLevel and zstandard apply only to data and normal usage.
90
+ * Undefined fields leave per-call options and built-in defaults in effect. Read at each encode call.
91
+ * @experimental
92
+ */
93
+ static DefaultEncoderOptions: Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
94
+ private readonly _configuration;
95
+ private _basisModule?;
96
+ private _initializationPromise?;
97
+ /**
98
+ * Captures the static resource settings without loading the codec.
99
+ * The first encode initializes the codec lazily.
100
+ * @experimental
101
+ */
102
+ constructor();
103
+ /** @internal */
104
+ _initializeAsync(): Promise<void>;
105
+ private _loadAsync;
106
+ /**
107
+ * Encodes an RGBA8 image.
108
+ * Loads the codec on first use. The official Basis v2_50 factory requires CSP 'unsafe-eval' for Embind.
109
+ * Compression is synchronous after initialization; calls on this thread cannot overlap.
110
+ * @param rgba RGBA8 source pixels, top-down unless `flipY` is true.
111
+ * @param width Source width in pixels.
112
+ * @param height Source height in pixels.
113
+ * @param options Encoding options. Defined DefaultEncoderOptions fields for this usage take priority.
114
+ * @returns The encoded KTX2 file.
115
+ * @experimental
116
+ */
117
+ encode(rgba: Uint8Array, width: number, height: number, options: IKTX2EncoderOptions): Promise<Uint8Array>;
118
+ }
119
+
120
+ }
121
+ declare module "babylonjs-ktx2encoder/index" {
122
+ export * from "babylonjs-ktx2encoder/ktx2Encoder";
123
+
124
+ }
125
+
126
+ declare module "babylonjs-ktx2encoder" {
127
+ export * from "babylonjs-ktx2encoder/index";
128
+ }
129
+
130
+
131
+ declare namespace KTX2ENCODER {
132
+ /**
133
+ * Usage determines the format and color metadata of an encoded texture.
134
+ * @experimental
135
+ */
136
+ export type KTX2EncoderUsage = "color" | "data" | "normal";
137
+ /**
138
+ * Options for encoding RGBA8 pixels into a KHR_texture_basisu-compatible KTX2 file.
139
+ * @experimental
140
+ */
141
+ export interface IKTX2EncoderOptions {
142
+ /**
143
+ * Color uses ETC1S and sRGB; data and normal use linear UASTC.
144
+ * @experimental
145
+ */
146
+ usage: KTX2EncoderUsage;
147
+ /**
148
+ * Generate a full mip pyramid. Defaults to true.
149
+ * @experimental
150
+ */
151
+ generateMipmaps?: boolean;
152
+ /**
153
+ * Reverse the input row order in Basis. Defaults to false.
154
+ * @experimental
155
+ */
156
+ flipY?: boolean;
157
+ /**
158
+ * Integer ETC1S quality for color usage only, from 1 to 255. Defaults to 128.
159
+ * @experimental
160
+ */
161
+ etc1sQualityLevel?: number;
162
+ /**
163
+ * Integer ETC1S compression effort for color usage only, from 0 to 6. Defaults to 2.
164
+ * @experimental
165
+ */
166
+ etc1sCompressionLevel?: number;
167
+ /**
168
+ * Integer UASTC quality for data and normal usage only, from 0 to 4. Defaults to 2.
169
+ * @experimental
170
+ */
171
+ uastcQualityLevel?: number;
172
+ /**
173
+ * Use Zstandard with UASTC. Defaults to true for data and normal. Ignored for color.
174
+ * @experimental
175
+ */
176
+ zstandard?: boolean;
177
+ }
178
+ /**
179
+ * Encoder-wide option overrides. Each field applies only to the usages that accept it.
180
+ * @internal
181
+ */
182
+ export type _IKTX2EncoderDefaultOptions = Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
183
+
184
+
185
+ /**
186
+ * Encodes RGBA8 pixel data as KTX2 ETC1S or UASTC data.
187
+ * @experimental
188
+ */
189
+ export class KTX2Encoder {
190
+ /**
191
+ * URL of the Basis encoder JavaScript factory. Configure before constructing an encoder.
192
+ * URL loading evaluates trusted JavaScript and requires CSP 'unsafe-eval'.
193
+ * @experimental
194
+ */
195
+ static JSModuleURL: string;
196
+ /**
197
+ * URL of the Basis encoder WebAssembly binary. Configure before constructing an encoder.
198
+ * @experimental
199
+ */
200
+ static WasmModuleURL: string;
201
+ /**
202
+ * Injected Basis encoder WebAssembly binary, or null to load WasmModuleURL.
203
+ * Configure before constructing an encoder.
204
+ * @experimental
205
+ */
206
+ static WasmBinary: ArrayBuffer | null;
207
+ /**
208
+ * Injected Basis encoder factory, or null to load JSModuleURL.
209
+ * Configure before constructing an encoder.
210
+ * @experimental
211
+ */
212
+ static JSModule: unknown;
213
+ /**
214
+ * Encoder-wide options that override per-call options, as KTX2Decoder.DefaultDecoderOptions does.
215
+ * ETC1S fields apply only to color usage; uastcQualityLevel and zstandard apply only to data and normal usage.
216
+ * Undefined fields leave per-call options and built-in defaults in effect. Read at each encode call.
217
+ * @experimental
218
+ */
219
+ static DefaultEncoderOptions: Pick<IKTX2EncoderOptions, "etc1sQualityLevel" | "etc1sCompressionLevel" | "uastcQualityLevel" | "zstandard">;
220
+ private readonly _configuration;
221
+ private _basisModule?;
222
+ private _initializationPromise?;
223
+ /**
224
+ * Captures the static resource settings without loading the codec.
225
+ * The first encode initializes the codec lazily.
226
+ * @experimental
227
+ */
228
+ constructor();
229
+ /** @internal */
230
+ _initializeAsync(): Promise<void>;
231
+ private _loadAsync;
232
+ /**
233
+ * Encodes an RGBA8 image.
234
+ * Loads the codec on first use. The official Basis v2_50 factory requires CSP 'unsafe-eval' for Embind.
235
+ * Compression is synchronous after initialization; calls on this thread cannot overlap.
236
+ * @param rgba RGBA8 source pixels, top-down unless `flipY` is true.
237
+ * @param width Source width in pixels.
238
+ * @param height Source height in pixels.
239
+ * @param options Encoding options. Defined DefaultEncoderOptions fields for this usage take priority.
240
+ * @returns The encoded KTX2 file.
241
+ * @experimental
242
+ */
243
+ encode(rgba: Uint8Array, width: number, height: number, options: IKTX2EncoderOptions): Promise<Uint8Array>;
244
+ }
245
+
246
+
247
+
248
+
249
+
250
+ }
251
+
252
+
package/license.md ADDED
@@ -0,0 +1,71 @@
1
+ # Apache License 2.0 (Apache)
2
+
3
+ Apache License
4
+ Version 2.0, January 2004
5
+ <http://www.apache.org/licenses/>
6
+
7
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
+
9
+ ## Definitions
10
+
11
+ "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
16
+
17
+ "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
18
+
19
+ "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
20
+
21
+ "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
22
+
23
+ "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
24
+
25
+ "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
26
+
27
+ "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
28
+
29
+ "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
30
+
31
+ ## Grant of Copyright License
32
+
33
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
34
+
35
+ ## Grant of Patent License
36
+
37
+ Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
38
+
39
+ ## Redistribution
40
+
41
+ You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
42
+
43
+ 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
44
+
45
+ 2. You must cause any modified files to carry prominent notices stating that You changed the files; and
46
+
47
+ 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
48
+
49
+ 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
50
+
51
+ You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
52
+
53
+ ## Submission of Contributions
54
+
55
+ Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
56
+
57
+ ## Trademarks
58
+
59
+ This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
60
+
61
+ ## Disclaimer of Warranty
62
+
63
+ Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
64
+
65
+ ## Limitation of Liability
66
+
67
+ In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
68
+
69
+ ## Accepting Warranty or Additional Liability
70
+
71
+ While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
- "name": "babylonjs-ktx2encoder",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
2
+ "name": "babylonjs-ktx2encoder",
3
+ "version": "9.35.0",
4
+ "main": "babylon.ktx2Encoder.js",
5
+ "types": "babylon.ktx2Encoder.module.d.ts",
6
+ "files": [
7
+ "babylon.ktx2Encoder*",
8
+ "license.md"
9
+ ],
10
+ "scripts": {
11
+ "build": "npm run clean && npm run build:prod && npm run build:declaration",
12
+ "build:dev": "rollup -c rollup.config.umd.mjs",
13
+ "build:dev:fast": "rollup -c rollup.config.umd.mjs --environment ROLLUP_DEVMODE:true",
14
+ "build:prod": "rollup -c rollup.config.umd.mjs --environment ROLLUP_MODE:production",
15
+ "build:declaration": "npm run compile -w @tools/ktx2encoder && build-tools -c pud --config ./config.json",
16
+ "clean": "rimraf dist && rimraf babylon*.* -g"
17
+ },
18
+ "devDependencies": {
19
+ "@dev/build-tools": "1.0.0",
20
+ "@tools/ktx2encoder": "1.0.0"
21
+ },
22
+ "keywords": [
23
+ "3D",
24
+ "javascript",
25
+ "html5",
26
+ "webgl",
27
+ "babylon.js",
28
+ "KTX2",
29
+ "Basis Universal"
30
+ ],
31
+ "license": "Apache-2.0",
32
+ "sideEffects": true,
33
+ "homepage": "https://www.babylonjs.com",
34
+ "repository": {
35
+ "type": "git",
36
+ "url": "https://github.com/BabylonJS/Babylon.js.git"
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/BabylonJS/Babylon.js/issues"
40
+ }
6
41
  }
package/README.md DELETED
@@ -1,3 +0,0 @@
1
- # Temporary Holding Version
2
-
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.