@loaders.gl/textures 4.0.0-alpha.9 → 4.0.0-beta.2

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.
Files changed (121) hide show
  1. package/dist/basis-worker-node.js +392 -340
  2. package/dist/basis-worker.js +66 -38
  3. package/dist/compressed-texture-loader.d.ts +2 -35
  4. package/dist/compressed-texture-loader.d.ts.map +1 -1
  5. package/dist/compressed-texture-worker.js +75 -47
  6. package/dist/crunch-loader.d.ts +9 -17
  7. package/dist/crunch-loader.d.ts.map +1 -1
  8. package/dist/crunch-worker.js +53 -25
  9. package/dist/dist.min.js +99 -55
  10. package/dist/es5/compressed-texture-loader.js +15 -17
  11. package/dist/es5/compressed-texture-loader.js.map +1 -1
  12. package/dist/es5/crunch-loader.js +1 -3
  13. package/dist/es5/crunch-loader.js.map +1 -1
  14. package/dist/es5/index.js +14 -0
  15. package/dist/es5/index.js.map +1 -1
  16. package/dist/es5/ktx2-basis-writer.js +5 -5
  17. package/dist/es5/ktx2-basis-writer.js.map +1 -1
  18. package/dist/es5/lib/encoders/encode-ktx2-basis-texture.js +6 -5
  19. package/dist/es5/lib/encoders/encode-ktx2-basis-texture.js.map +1 -1
  20. package/dist/es5/lib/parsers/basis-module-loader.js +26 -21
  21. package/dist/es5/lib/parsers/basis-module-loader.js.map +1 -1
  22. package/dist/es5/lib/parsers/crunch-module-loader.js +6 -1
  23. package/dist/es5/lib/parsers/crunch-module-loader.js.map +1 -1
  24. package/dist/es5/lib/parsers/parse-basis.js +7 -7
  25. package/dist/es5/lib/parsers/parse-basis.js.map +1 -1
  26. package/dist/es5/lib/texture-api/deep-load.js.map +1 -1
  27. package/dist/es5/lib/utils/version.js +1 -1
  28. package/dist/es5/lib/utils/version.js.map +1 -1
  29. package/dist/es5/workers/compressed-texture-worker.js.map +1 -1
  30. package/dist/es5/workers/ktx2-basis-writer-worker-node.js.map +1 -1
  31. package/dist/es5/workers/ktx2-basis-writer-worker.js.map +1 -1
  32. package/dist/esm/compressed-texture-loader.js +10 -11
  33. package/dist/esm/compressed-texture-loader.js.map +1 -1
  34. package/dist/esm/crunch-loader.js +0 -1
  35. package/dist/esm/crunch-loader.js.map +1 -1
  36. package/dist/esm/index.js +2 -0
  37. package/dist/esm/index.js.map +1 -1
  38. package/dist/esm/ktx2-basis-writer.js +6 -5
  39. package/dist/esm/ktx2-basis-writer.js.map +1 -1
  40. package/dist/esm/lib/encoders/encode-ktx2-basis-texture.js +1 -1
  41. package/dist/esm/lib/encoders/encode-ktx2-basis-texture.js.map +1 -1
  42. package/dist/esm/lib/parsers/basis-module-loader.js +13 -10
  43. package/dist/esm/lib/parsers/basis-module-loader.js.map +1 -1
  44. package/dist/esm/lib/parsers/crunch-module-loader.js +4 -1
  45. package/dist/esm/lib/parsers/crunch-module-loader.js.map +1 -1
  46. package/dist/esm/lib/parsers/parse-basis.js +3 -3
  47. package/dist/esm/lib/parsers/parse-basis.js.map +1 -1
  48. package/dist/esm/lib/texture-api/deep-load.js.map +1 -1
  49. package/dist/esm/lib/utils/version.js +1 -1
  50. package/dist/esm/lib/utils/version.js.map +1 -1
  51. package/dist/esm/workers/compressed-texture-worker.js.map +1 -1
  52. package/dist/esm/workers/ktx2-basis-writer-worker-node.js.map +1 -1
  53. package/dist/esm/workers/ktx2-basis-writer-worker.js.map +1 -1
  54. package/dist/index.d.ts +2 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/ktx2-basis-writer-worker-node.js +387 -333
  57. package/dist/ktx2-basis-writer-worker.js +61 -31
  58. package/dist/ktx2-basis-writer.d.ts +8 -7
  59. package/dist/ktx2-basis-writer.d.ts.map +1 -1
  60. package/dist/lib/encoders/encode-ktx2-basis-texture.d.ts.map +1 -1
  61. package/dist/lib/parsers/basis-module-loader.d.ts +11 -1
  62. package/dist/lib/parsers/basis-module-loader.d.ts.map +1 -1
  63. package/dist/lib/parsers/crunch-module-loader.d.ts +4 -0
  64. package/dist/lib/parsers/crunch-module-loader.d.ts.map +1 -1
  65. package/dist/lib/texture-api/deep-load.d.ts.map +1 -1
  66. package/dist/npy-worker.js +9 -4
  67. package/dist/workers/crunch-worker.d.ts +13 -9
  68. package/dist/workers/crunch-worker.d.ts.map +1 -1
  69. package/package.json +7 -7
  70. package/src/compressed-texture-loader.ts +14 -17
  71. package/src/crunch-loader.ts +10 -7
  72. package/src/index.ts +4 -0
  73. package/src/ktx2-basis-writer.ts +14 -13
  74. package/src/lib/encoders/encode-ktx2-basis-texture.ts +6 -1
  75. package/src/lib/parsers/basis-module-loader.ts +19 -16
  76. package/src/lib/parsers/crunch-module-loader.ts +6 -1
  77. package/src/lib/parsers/parse-basis.ts +3 -3
  78. package/src/lib/texture-api/deep-load.ts +0 -1
  79. package/src/workers/compressed-texture-worker.ts +1 -0
  80. package/src/workers/ktx2-basis-writer-worker-node.ts +2 -2
  81. package/src/workers/ktx2-basis-writer-worker.ts +2 -2
  82. package/dist/basis-loader.js +0 -37
  83. package/dist/bundle.js +0 -5
  84. package/dist/compressed-texture-loader.js +0 -64
  85. package/dist/compressed-texture-writer.js +0 -34
  86. package/dist/crunch-loader.js +0 -25
  87. package/dist/index.js +0 -52
  88. package/dist/ktx2-basis-writer.js +0 -26
  89. package/dist/lib/encoders/encode-ktx.js +0 -10
  90. package/dist/lib/encoders/encode-ktx2-basis-texture.js +0 -41
  91. package/dist/lib/encoders/encode-texture.js +0 -27
  92. package/dist/lib/gl-extensions.js +0 -72
  93. package/dist/lib/parsers/basis-module-loader.js +0 -114
  94. package/dist/lib/parsers/crunch-module-loader.js +0 -35
  95. package/dist/lib/parsers/parse-basis.js +0 -245
  96. package/dist/lib/parsers/parse-compressed-texture.js +0 -26
  97. package/dist/lib/parsers/parse-crunch.js +0 -106
  98. package/dist/lib/parsers/parse-dds.js +0 -108
  99. package/dist/lib/parsers/parse-ktx.js +0 -46
  100. package/dist/lib/parsers/parse-npy.js +0 -81
  101. package/dist/lib/parsers/parse-pvr.js +0 -250
  102. package/dist/lib/texture-api/async-deep-map.js +0 -41
  103. package/dist/lib/texture-api/deep-load.js +0 -16
  104. package/dist/lib/texture-api/generate-url.js +0 -17
  105. package/dist/lib/texture-api/load-image-array.js +0 -21
  106. package/dist/lib/texture-api/load-image-cube.js +0 -47
  107. package/dist/lib/texture-api/load-image.js +0 -43
  108. package/dist/lib/texture-api/texture-api-types.js +0 -3
  109. package/dist/lib/utils/extract-mipmap-images.js +0 -50
  110. package/dist/lib/utils/ktx-format-helper.js +0 -125
  111. package/dist/lib/utils/texture-formats.js +0 -51
  112. package/dist/lib/utils/version.js +0 -8
  113. package/dist/npy-loader.js +0 -31
  114. package/dist/types.js +0 -1
  115. package/dist/workers/basis-worker-node.js +0 -7
  116. package/dist/workers/basis-worker.js +0 -5
  117. package/dist/workers/compressed-texture-worker.js +0 -5
  118. package/dist/workers/crunch-worker.js +0 -14
  119. package/dist/workers/ktx2-basis-writer-worker-node.js +0 -28
  120. package/dist/workers/ktx2-basis-writer-worker.js +0 -26
  121. package/dist/workers/npy-worker.js +0 -5
@@ -21408,7 +21408,7 @@ var require_cookie = __commonJS({
21408
21408
  var Store = require_store().Store;
21409
21409
  var MemoryCookieStore = require_memstore().MemoryCookieStore;
21410
21410
  var pathMatch = require_pathMatch().pathMatch;
21411
- var VERSION5 = require_version();
21411
+ var VERSION3 = require_version();
21412
21412
  var punycode;
21413
21413
  try {
21414
21414
  punycode = require("punycode");
@@ -22225,7 +22225,7 @@ var require_cookie = __commonJS({
22225
22225
  type = null;
22226
22226
  }
22227
22227
  var serialized = {
22228
- version: "tough-cookie@" + VERSION5,
22228
+ version: "tough-cookie@" + VERSION3,
22229
22229
  storeType: type,
22230
22230
  rejectPublicSuffixes: !!this.rejectPublicSuffixes,
22231
22231
  cookies: []
@@ -22377,7 +22377,7 @@ var require_cookie = __commonJS({
22377
22377
  CAN_BE_SYNC.forEach(function(method) {
22378
22378
  CookieJar.prototype[method + "Sync"] = syncWrap(method);
22379
22379
  });
22380
- exports2.version = VERSION5;
22380
+ exports2.version = VERSION3;
22381
22381
  exports2.CookieJar = CookieJar;
22382
22382
  exports2.Cookie = Cookie;
22383
22383
  exports2.Store = Store;
@@ -45980,7 +45980,7 @@ var require_form_data = __commonJS({
45980
45980
  var http2 = require("http");
45981
45981
  var https2 = require("https");
45982
45982
  var parseUrl = require("url").parse;
45983
- var fs2 = require("fs");
45983
+ var fs3 = require("fs");
45984
45984
  var mime = require_mime_types();
45985
45985
  var asynckit = require_asynckit();
45986
45986
  var populate = require_populate();
@@ -46044,7 +46044,7 @@ var require_form_data = __commonJS({
46044
46044
  if (value.end != void 0 && value.end != Infinity && value.start != void 0) {
46045
46045
  callback(null, value.end + 1 - (value.start ? value.start : 0));
46046
46046
  } else {
46047
- fs2.stat(value.path, function(err, stat) {
46047
+ fs3.stat(value.path, function(err, stat) {
46048
46048
  var fileSize;
46049
46049
  if (err) {
46050
46050
  callback(err);
@@ -54151,7 +54151,7 @@ var require_promise = __commonJS({
54151
54151
  var require_har2 = __commonJS({
54152
54152
  "../../node_modules/request/lib/har.js"(exports2) {
54153
54153
  "use strict";
54154
- var fs2 = require("fs");
54154
+ var fs3 = require("fs");
54155
54155
  var qs = require("querystring");
54156
54156
  var validate = require_promise();
54157
54157
  var extend = require_extend();
@@ -54285,7 +54285,7 @@ var require_har2 = __commonJS({
54285
54285
  return;
54286
54286
  }
54287
54287
  if (param.fileName && !param.value) {
54288
- attachment.value = fs2.createReadStream(param.fileName);
54288
+ attachment.value = fs3.createReadStream(param.fileName);
54289
54289
  } else if (param.value) {
54290
54290
  attachment.value = param.value;
54291
54291
  }
@@ -56833,7 +56833,7 @@ var require_node_pixels = __commonJS({
56833
56833
  var pack = require_convert();
56834
56834
  var GifReader = require_omggif().GifReader;
56835
56835
  var Bitmap = require_node_bitmap();
56836
- var fs2 = require("fs");
56836
+ var fs3 = require("fs");
56837
56837
  var request = require_request3();
56838
56838
  var mime = require_mime_types();
56839
56839
  var parseDataURI = require_parse_data_uri();
@@ -56985,7 +56985,7 @@ var require_node_pixels = __commonJS({
56985
56985
  doParse(type, body, cb);
56986
56986
  });
56987
56987
  } else {
56988
- fs2.readFile(url, function(err, data) {
56988
+ fs3.readFile(url, function(err, data) {
56989
56989
  if (err) {
56990
56990
  cb(err);
56991
56991
  return;
@@ -62518,6 +62518,275 @@ function btoa(base642) {
62518
62518
  return Buffer.from(base642, "base64").toString("ascii");
62519
62519
  }
62520
62520
 
62521
+ // ../polyfills/src/node/images/encode-image.node.ts
62522
+ var import_save_pixels = __toModule(require_save_pixels());
62523
+ var import_ndarray = __toModule(require_ndarray());
62524
+
62525
+ // ../polyfills/src/node/buffer/to-array-buffer.node.ts
62526
+ function bufferToArrayBuffer(buffer) {
62527
+ if (Buffer.isBuffer(buffer)) {
62528
+ const typedArray = new Uint8Array(buffer);
62529
+ return typedArray.buffer;
62530
+ }
62531
+ return buffer;
62532
+ }
62533
+
62534
+ // ../polyfills/src/node/images/encode-image.node.ts
62535
+ function encodeImageToStreamNode(image, options) {
62536
+ const type = options.type ? options.type.replace("image/", "") : "jpeg";
62537
+ const pixels = (0, import_ndarray.default)(image.data, [image.width, image.height, 4], [4, image.width * 4, 1], 0);
62538
+ return (0, import_save_pixels.default)(pixels, type, options);
62539
+ }
62540
+ function encodeImageNode(image, options) {
62541
+ const imageStream = encodeImageToStreamNode(image, options);
62542
+ return new Promise((resolve) => {
62543
+ const buffers = [];
62544
+ imageStream.on("data", (buffer) => buffers.push(buffer));
62545
+ imageStream.on("end", () => {
62546
+ const buffer = Buffer.concat(buffers);
62547
+ resolve(bufferToArrayBuffer(buffer));
62548
+ });
62549
+ });
62550
+ }
62551
+
62552
+ // ../polyfills/src/node/images/parse-image.node.ts
62553
+ var import_get_pixels = __toModule(require_node_pixels());
62554
+ var NODE_FORMAT_SUPPORT = ["image/png", "image/jpeg", "image/gif"];
62555
+ async function parseImageNode(arrayBuffer, mimeType) {
62556
+ if (!mimeType) {
62557
+ throw new Error("MIMEType is required to parse image under Node.js");
62558
+ }
62559
+ const buffer = arrayBuffer instanceof Buffer ? arrayBuffer : Buffer.from(arrayBuffer);
62560
+ const ndarray2 = await getPixelsAsync(buffer, mimeType);
62561
+ return ndarray2;
62562
+ }
62563
+ function getPixelsAsync(buffer, mimeType) {
62564
+ return new Promise((resolve) => (0, import_get_pixels.default)(buffer, mimeType, (err, ndarray2) => {
62565
+ if (err) {
62566
+ throw err;
62567
+ }
62568
+ const shape = [...ndarray2.shape];
62569
+ const layers = ndarray2.shape.length === 4 ? ndarray2.shape.shift() : 1;
62570
+ const data = ndarray2.data instanceof Buffer ? new Uint8Array(ndarray2.data) : ndarray2.data;
62571
+ resolve({
62572
+ shape,
62573
+ data,
62574
+ width: ndarray2.shape[0],
62575
+ height: ndarray2.shape[1],
62576
+ components: ndarray2.shape[2],
62577
+ layers: layers ? [layers] : []
62578
+ });
62579
+ }));
62580
+ }
62581
+
62582
+ // ../polyfills/src/node/file/readable-stream.ts
62583
+ var import_web_streams_polyfill = __toModule(require_polyfill());
62584
+ delete global.ReadableStream;
62585
+ var ReadableStreamPolyfill = class extends import_web_streams_polyfill.ReadableStream {
62586
+ };
62587
+
62588
+ // ../polyfills/src/node/file/blob-stream-controller.ts
62589
+ var BlobStreamController = class {
62590
+ constructor(chunks) {
62591
+ this.isWorking = false;
62592
+ this.isCancelled = false;
62593
+ this.chunks = chunks;
62594
+ }
62595
+ start(controller) {
62596
+ this.work(controller);
62597
+ }
62598
+ async work(controller) {
62599
+ const { chunks } = this;
62600
+ this.isWorking = true;
62601
+ while (!this.isCancelled && (controller.desiredSize || 0) > 0) {
62602
+ let next;
62603
+ try {
62604
+ next = chunks.next();
62605
+ } catch (error) {
62606
+ controller.error(error);
62607
+ break;
62608
+ }
62609
+ if (next) {
62610
+ if (!next.done && !this.isCancelled) {
62611
+ controller.enqueue(next.value);
62612
+ } else {
62613
+ controller.close();
62614
+ }
62615
+ }
62616
+ }
62617
+ this.isWorking = false;
62618
+ }
62619
+ pull(controller) {
62620
+ if (!this.isWorking) {
62621
+ this.work(controller);
62622
+ }
62623
+ }
62624
+ cancel() {
62625
+ this.isCancelled = true;
62626
+ }
62627
+ };
62628
+
62629
+ // ../polyfills/src/node/file/blob-stream.ts
62630
+ var BlobStream = class extends ReadableStreamPolyfill {
62631
+ constructor(chunks) {
62632
+ super(new BlobStreamController(chunks.values()), { type: "bytes" });
62633
+ this._chunks = chunks;
62634
+ }
62635
+ async *[Symbol.asyncIterator](_options) {
62636
+ const reader = this.getReader();
62637
+ yield* this._chunks;
62638
+ reader.releaseLock();
62639
+ }
62640
+ };
62641
+
62642
+ // ../polyfills/src/node/file/blob.ts
62643
+ var BlobPolyfill = class {
62644
+ constructor(init = [], options = {}) {
62645
+ this.parts = [];
62646
+ this.size = 0;
62647
+ for (const part of init) {
62648
+ if (typeof part === "string") {
62649
+ const bytes = new TextEncoder().encode(part);
62650
+ this.parts.push(bytes);
62651
+ this.size += bytes.byteLength;
62652
+ } else if (part instanceof BlobPolyfill) {
62653
+ this.size += part.size;
62654
+ this.parts.push(...part.parts);
62655
+ } else if (part instanceof ArrayBuffer) {
62656
+ this.parts.push(new Uint8Array(part));
62657
+ this.size += part.byteLength;
62658
+ } else if (part instanceof Uint8Array) {
62659
+ this.parts.push(part);
62660
+ this.size += part.byteLength;
62661
+ } else if (ArrayBuffer.isView(part)) {
62662
+ const { buffer, byteOffset, byteLength } = part;
62663
+ this.parts.push(new Uint8Array(buffer, byteOffset, byteLength));
62664
+ this.size += byteLength;
62665
+ } else {
62666
+ const bytes = new TextEncoder().encode(String(part));
62667
+ this.parts.push(bytes);
62668
+ this.size += bytes.byteLength;
62669
+ }
62670
+ }
62671
+ this.type = readType(options.type);
62672
+ }
62673
+ slice(start = 0, end = this.size, type = "") {
62674
+ const { size, parts } = this;
62675
+ let offset = start < 0 ? Math.max(size + start, 0) : Math.min(start, size);
62676
+ let limit = end < 0 ? Math.max(size + end, 0) : Math.min(end, size);
62677
+ const span = Math.max(limit - offset, 0);
62678
+ const blob = new BlobPolyfill([], { type });
62679
+ if (span === 0) {
62680
+ return blob;
62681
+ }
62682
+ let blobSize = 0;
62683
+ const blobParts = [];
62684
+ for (const part of parts) {
62685
+ const { byteLength } = part;
62686
+ if (offset > 0 && byteLength <= offset) {
62687
+ offset -= byteLength;
62688
+ limit -= byteLength;
62689
+ } else {
62690
+ const chunk = part.subarray(offset, Math.min(byteLength, limit));
62691
+ blobParts.push(chunk);
62692
+ blobSize += chunk.byteLength;
62693
+ offset = 0;
62694
+ if (blobSize >= span) {
62695
+ break;
62696
+ }
62697
+ }
62698
+ }
62699
+ blob.parts = blobParts;
62700
+ blob.size = blobSize;
62701
+ return blob;
62702
+ }
62703
+ async arrayBuffer() {
62704
+ return this._toArrayBuffer();
62705
+ }
62706
+ async text() {
62707
+ const decoder = new TextDecoder();
62708
+ let text = "";
62709
+ for (const part of this.parts) {
62710
+ text += decoder.decode(part);
62711
+ }
62712
+ return text;
62713
+ }
62714
+ stream() {
62715
+ return new BlobStream(this.parts);
62716
+ }
62717
+ toString() {
62718
+ return "[object Blob]";
62719
+ }
62720
+ get [Symbol.toStringTag]() {
62721
+ return "Blob";
62722
+ }
62723
+ _toArrayBuffer() {
62724
+ const buffer = new ArrayBuffer(this.size);
62725
+ const bytes = new Uint8Array(buffer);
62726
+ let offset = 0;
62727
+ for (const part of this.parts) {
62728
+ bytes.set(part, offset);
62729
+ offset += part.byteLength;
62730
+ }
62731
+ return buffer;
62732
+ }
62733
+ };
62734
+ function readType(input = "") {
62735
+ const type = String(input).toLowerCase();
62736
+ return /[^\u0020-\u007E]/.test(type) ? "" : type;
62737
+ }
62738
+
62739
+ // ../polyfills/src/node/file/file.ts
62740
+ var FilePolyfill = class extends BlobPolyfill {
62741
+ constructor(init, name, options = {}) {
62742
+ super(init, options);
62743
+ this.name = "";
62744
+ this.webkitRelativePath = "";
62745
+ this.name = String(name).replace(/\//g, ":");
62746
+ this.lastModified = (options == null ? void 0 : options.lastModified) || Date.now();
62747
+ }
62748
+ get [Symbol.toStringTag]() {
62749
+ return "File";
62750
+ }
62751
+ };
62752
+
62753
+ // ../polyfills/src/filesystems/node-filesystem.ts
62754
+ var import_fs = __toModule(require("fs"));
62755
+ var import_promises = __toModule(require("fs/promises"));
62756
+ var NodeFileSystem = class {
62757
+ constructor(options) {
62758
+ this.fetch = options._fetch;
62759
+ }
62760
+ async readdir(dirname = ".", options) {
62761
+ return await import_promises.default.readdir(dirname, options);
62762
+ }
62763
+ async stat(path2, options) {
62764
+ const info = await import_promises.default.stat(path2, options);
62765
+ return { size: Number(info.size), isDirectory: () => false, info };
62766
+ }
62767
+ async fetch(path2, options) {
62768
+ const fallbackFetch = options.fetch || this.fetch;
62769
+ return fallbackFetch(path2, options);
62770
+ }
62771
+ async open(path2, flags, mode) {
62772
+ return await import_promises.default.open(path2, flags);
62773
+ }
62774
+ async close(fd) {
62775
+ import_fs.default.close(fd);
62776
+ }
62777
+ async fstat(fd) {
62778
+ return await new Promise((resolve, reject) => import_fs.default.fstat(fd, (err, info) => err ? reject(err) : resolve(info)));
62779
+ }
62780
+ async read(fd, { buffer = null, offset = 0, length = buffer.byteLength, position = null }) {
62781
+ let totalBytesRead = 0;
62782
+ while (totalBytesRead < length) {
62783
+ const { bytesRead } = await new Promise((resolve, reject) => import_fs.default.read(fd, buffer, offset + totalBytesRead, length - totalBytesRead, position + totalBytesRead, (err, bytesRead2, buffer2) => err ? reject(err) : resolve({ bytesRead: bytesRead2, buffer: buffer2 })));
62784
+ totalBytesRead += bytesRead;
62785
+ }
62786
+ return { bytesRead: totalBytesRead, buffer };
62787
+ }
62788
+ };
62789
+
62521
62790
  // ../polyfills/src/node/fetch/headers.node.ts
62522
62791
  var Headers = class {
62523
62792
  constructor(headers) {
@@ -62764,48 +63033,12 @@ var Response = class {
62764
63033
  // ../polyfills/src/node/fetch/fetch.node.ts
62765
63034
  var import_http = __toModule(require("http"));
62766
63035
  var import_https = __toModule(require("https"));
62767
-
62768
- // ../polyfills/src/node/fetch/fetch-file.node.ts
62769
- var import_fs = __toModule(require("fs"));
62770
- async function fetchFileNode(url, options) {
62771
- const noqueryUrl = url.split("?")[0];
62772
- try {
62773
- const body = await new Promise((resolve, reject) => {
62774
- const stream = import_fs.default.createReadStream(noqueryUrl, { encoding: null });
62775
- stream.once("readable", () => resolve(stream));
62776
- stream.on("error", (error) => reject(error));
62777
- });
62778
- const status = 200;
62779
- const statusText = "OK";
62780
- const headers = getHeadersForFile(noqueryUrl);
62781
- return new Response(body, { headers, status, statusText, url });
62782
- } catch (error) {
62783
- const status = 400;
62784
- const statusText = error.message;
62785
- const headers = {};
62786
- return new Response(error.message, { headers, status, statusText, url });
62787
- }
62788
- }
62789
- function getHeadersForFile(noqueryUrl) {
62790
- const headers = {};
62791
- if (!headers["content-length"]) {
62792
- const stats = import_fs.default.statSync(noqueryUrl);
62793
- headers["content-length"] = stats.size;
62794
- }
62795
- if (noqueryUrl.endsWith(".gz")) {
62796
- noqueryUrl = noqueryUrl.slice(0, -3);
62797
- headers["content-encoding"] = "gzip";
62798
- }
62799
- return new Headers(headers);
62800
- }
62801
-
62802
- // ../polyfills/src/node/fetch/fetch.node.ts
62803
63036
  var isDataURL = (url) => url.startsWith("data:");
62804
63037
  var isRequestURL = (url) => url.startsWith("http:") || url.startsWith("https:");
62805
63038
  async function fetchNode(url, options) {
62806
63039
  try {
62807
- if (!isRequestURL(url) && !isDataURL(url)) {
62808
- return await fetchFileNode(url, options);
63040
+ if (globalThis.fetch !== fetchNode && (isRequestURL(url) || isDataURL(url))) {
63041
+ return await fetch(url, options);
62809
63042
  }
62810
63043
  if (isDataURL(url)) {
62811
63044
  const { arrayBuffer, mimeType } = decodeDataUri(url);
@@ -62895,278 +63128,59 @@ function getContentLength(url) {
62895
63128
  return isDataURL(url) ? url.length - "data:".length : null;
62896
63129
  }
62897
63130
 
62898
- // ../polyfills/src/node/images/encode-image.node.ts
62899
- var import_save_pixels = __toModule(require_save_pixels());
62900
- var import_ndarray = __toModule(require_ndarray());
62901
-
62902
- // ../polyfills/src/node/buffer/to-array-buffer.node.ts
62903
- function bufferToArrayBuffer(buffer) {
62904
- if (Buffer.isBuffer(buffer)) {
62905
- const typedArray = new Uint8Array(buffer);
62906
- return typedArray.buffer;
62907
- }
62908
- return buffer;
62909
- }
62910
-
62911
- // ../polyfills/src/node/images/encode-image.node.ts
62912
- function encodeImageToStreamNode(image, options) {
62913
- const type = options.type ? options.type.replace("image/", "") : "jpeg";
62914
- const pixels = (0, import_ndarray.default)(image.data, [image.width, image.height, 4], [4, image.width * 4, 1], 0);
62915
- return (0, import_save_pixels.default)(pixels, type, options);
62916
- }
62917
- function encodeImageNode(image, options) {
62918
- const imageStream = encodeImageToStreamNode(image, options);
62919
- return new Promise((resolve) => {
62920
- const buffers = [];
62921
- imageStream.on("data", (buffer) => buffers.push(buffer));
62922
- imageStream.on("end", () => {
62923
- const buffer = Buffer.concat(buffers);
62924
- resolve(bufferToArrayBuffer(buffer));
62925
- });
62926
- });
62927
- }
62928
-
62929
- // ../polyfills/src/node/images/parse-image.node.ts
62930
- var import_get_pixels = __toModule(require_node_pixels());
62931
- var NODE_FORMAT_SUPPORT = ["image/png", "image/jpeg", "image/gif"];
62932
- async function parseImageNode(arrayBuffer, mimeType) {
62933
- if (!mimeType) {
62934
- throw new Error("MIMEType is required to parse image under Node.js");
62935
- }
62936
- const buffer = arrayBuffer instanceof Buffer ? arrayBuffer : Buffer.from(arrayBuffer);
62937
- const ndarray2 = await getPixelsAsync(buffer, mimeType);
62938
- return ndarray2;
62939
- }
62940
- function getPixelsAsync(buffer, mimeType) {
62941
- return new Promise((resolve) => (0, import_get_pixels.default)(buffer, mimeType, (err, ndarray2) => {
62942
- if (err) {
62943
- throw err;
62944
- }
62945
- const shape = [...ndarray2.shape];
62946
- const layers = ndarray2.shape.length === 4 ? ndarray2.shape.shift() : 1;
62947
- const data = ndarray2.data instanceof Buffer ? new Uint8Array(ndarray2.data) : ndarray2.data;
62948
- resolve({
62949
- shape,
62950
- data,
62951
- width: ndarray2.shape[0],
62952
- height: ndarray2.shape[1],
62953
- components: ndarray2.shape[2],
62954
- layers: layers ? [layers] : []
62955
- });
62956
- }));
62957
- }
62958
-
62959
- // ../polyfills/src/node/file/readable-stream.ts
62960
- var import_web_streams_polyfill = __toModule(require_polyfill());
62961
- delete global.ReadableStream;
62962
- var ReadableStreamPolyfill = class extends import_web_streams_polyfill.ReadableStream {
62963
- };
62964
-
62965
- // ../polyfills/src/node/file/blob-stream-controller.ts
62966
- var BlobStreamController = class {
62967
- constructor(chunks) {
62968
- this.isWorking = false;
62969
- this.isCancelled = false;
62970
- this.chunks = chunks;
62971
- }
62972
- start(controller) {
62973
- this.work(controller);
62974
- }
62975
- async work(controller) {
62976
- const { chunks } = this;
62977
- this.isWorking = true;
62978
- while (!this.isCancelled && (controller.desiredSize || 0) > 0) {
62979
- let next;
62980
- try {
62981
- next = chunks.next();
62982
- } catch (error) {
62983
- controller.error(error);
62984
- break;
62985
- }
62986
- if (next) {
62987
- if (!next.done && !this.isCancelled) {
62988
- controller.enqueue(next.value);
62989
- } else {
62990
- controller.close();
62991
- }
62992
- }
62993
- }
62994
- this.isWorking = false;
62995
- }
62996
- pull(controller) {
62997
- if (!this.isWorking) {
62998
- this.work(controller);
62999
- }
63000
- }
63001
- cancel() {
63002
- this.isCancelled = true;
63003
- }
63004
- };
63005
-
63006
- // ../polyfills/src/node/file/blob-stream.ts
63007
- var BlobStream = class extends ReadableStreamPolyfill {
63008
- constructor(chunks) {
63009
- super(new BlobStreamController(chunks.values()), { type: "bytes" });
63010
- this._chunks = chunks;
63011
- }
63012
- async *[Symbol.asyncIterator](_options) {
63013
- const reader = this.getReader();
63014
- yield* this._chunks;
63015
- reader.releaseLock();
63016
- }
63017
- };
63018
-
63019
- // ../polyfills/src/node/file/blob.ts
63020
- var BlobPolyfill = class {
63021
- constructor(init = [], options = {}) {
63022
- this.parts = [];
63023
- this.size = 0;
63024
- for (const part of init) {
63025
- if (typeof part === "string") {
63026
- const bytes = new TextEncoder().encode(part);
63027
- this.parts.push(bytes);
63028
- this.size += bytes.byteLength;
63029
- } else if (part instanceof BlobPolyfill) {
63030
- this.size += part.size;
63031
- this.parts.push(...part.parts);
63032
- } else if (part instanceof ArrayBuffer) {
63033
- this.parts.push(new Uint8Array(part));
63034
- this.size += part.byteLength;
63035
- } else if (part instanceof Uint8Array) {
63036
- this.parts.push(part);
63037
- this.size += part.byteLength;
63038
- } else if (ArrayBuffer.isView(part)) {
63039
- const { buffer, byteOffset, byteLength } = part;
63040
- this.parts.push(new Uint8Array(buffer, byteOffset, byteLength));
63041
- this.size += byteLength;
63042
- } else {
63043
- const bytes = new TextEncoder().encode(String(part));
63044
- this.parts.push(bytes);
63045
- this.size += bytes.byteLength;
63046
- }
63047
- }
63048
- this.type = readType(options.type);
63049
- }
63050
- slice(start = 0, end = this.size, type = "") {
63051
- const { size, parts } = this;
63052
- let offset = start < 0 ? Math.max(size + start, 0) : Math.min(start, size);
63053
- let limit = end < 0 ? Math.max(size + end, 0) : Math.min(end, size);
63054
- const span = Math.max(limit - offset, 0);
63055
- const blob = new BlobPolyfill([], { type });
63056
- if (span === 0) {
63057
- return blob;
63058
- }
63059
- let blobSize = 0;
63060
- const blobParts = [];
63061
- for (const part of parts) {
63062
- const { byteLength } = part;
63063
- if (offset > 0 && byteLength <= offset) {
63064
- offset -= byteLength;
63065
- limit -= byteLength;
63066
- } else {
63067
- const chunk = part.subarray(offset, Math.min(byteLength, limit));
63068
- blobParts.push(chunk);
63069
- blobSize += chunk.byteLength;
63070
- offset = 0;
63071
- if (blobSize >= span) {
63072
- break;
63073
- }
63074
- }
63075
- }
63076
- blob.parts = blobParts;
63077
- blob.size = blobSize;
63078
- return blob;
63079
- }
63080
- async arrayBuffer() {
63081
- return this._toArrayBuffer();
63082
- }
63083
- async text() {
63084
- const decoder = new TextDecoder();
63085
- let text = "";
63086
- for (const part of this.parts) {
63087
- text += decoder.decode(part);
63088
- }
63089
- return text;
63090
- }
63091
- stream() {
63092
- return new BlobStream(this.parts);
63093
- }
63094
- toString() {
63095
- return "[object Blob]";
63096
- }
63097
- get [Symbol.toStringTag]() {
63098
- return "Blob";
63099
- }
63100
- _toArrayBuffer() {
63101
- const buffer = new ArrayBuffer(this.size);
63102
- const bytes = new Uint8Array(buffer);
63103
- let offset = 0;
63104
- for (const part of this.parts) {
63105
- bytes.set(part, offset);
63106
- offset += part.byteLength;
63107
- }
63108
- return buffer;
63109
- }
63110
- };
63111
- function readType(input = "") {
63112
- const type = String(input).toLowerCase();
63113
- return /[^\u0020-\u007E]/.test(type) ? "" : type;
63114
- }
63115
-
63116
- // ../polyfills/src/node/file/file.ts
63117
- var FilePolyfill = class extends BlobPolyfill {
63118
- constructor(init, name, options = {}) {
63119
- super(init, options);
63120
- this.name = "";
63121
- this.webkitRelativePath = "";
63122
- this.name = String(name).replace(/\//g, ":");
63123
- this.lastModified = (options == null ? void 0 : options.lastModified) || Date.now();
63124
- }
63125
- get [Symbol.toStringTag]() {
63126
- return "File";
63127
- }
63128
- };
63129
-
63130
63131
  // ../polyfills/src/index.ts
63131
- var installTextEncoder = !isBrowser || !("TextEncoder" in global_);
63132
- if (installTextEncoder) {
63133
- global_["TextEncoder"] = TextEncoder2;
63134
- }
63135
- var installTextDecoder = !isBrowser || !("TextDecoder" in global_);
63136
- if (installTextDecoder) {
63137
- global_["TextDecoder"] = TextDecoder2;
63138
- }
63139
- if (!isBrowser && !("atob" in global_) && atob) {
63140
- global_["atob"] = atob;
63132
+ if (isBrowser) {
63133
+ console.error("loaders.gl: The @loaders.gl/polyfills should only be used in Node.js environments");
63141
63134
  }
63142
- if (!isBrowser && !("btoa" in global_) && btoa) {
63143
- global_["btoa"] = btoa;
63135
+ if (!globalThis.TextEncoder) {
63136
+ globalThis.TextEncoder = TextEncoder2;
63144
63137
  }
63145
- if (!isBrowser && !("Headers" in global_) && Headers) {
63146
- global_["Headers"] = Headers;
63138
+ if (!globalThis.TextDecoder) {
63139
+ globalThis.TextDecoder = TextDecoder2;
63147
63140
  }
63148
- if (!isBrowser && !("Response" in global_) && Response) {
63149
- global_["Response"] = Response;
63141
+ if (!isBrowser && !("atob" in globalThis) && atob) {
63142
+ globalThis["atob"] = atob;
63150
63143
  }
63151
- if (!isBrowser && !("fetch" in global_) && fetchNode) {
63152
- global_["fetch"] = fetchNode;
63144
+ if (!isBrowser && !("btoa" in globalThis) && btoa) {
63145
+ globalThis["btoa"] = btoa;
63153
63146
  }
63154
- if (!isBrowser && !("_encodeImageNode" in global_) && encodeImageNode) {
63155
- global_["_encodeImageNode"] = encodeImageNode;
63147
+ globalThis.loaders = globalThis.loaders || {};
63148
+ globalThis.loaders.NodeFileSystem = NodeFileSystem;
63149
+ if (!isBrowser && !("_encodeImageNode" in globalThis) && encodeImageNode) {
63150
+ globalThis["_encodeImageNode"] = encodeImageNode;
63156
63151
  }
63157
- if (!isBrowser && !("_parseImageNode" in global_) && parseImageNode) {
63158
- global_["_parseImageNode"] = parseImageNode;
63159
- global_["_imageFormatsNode"] = NODE_FORMAT_SUPPORT;
63152
+ if (!isBrowser && !("_parseImageNode" in globalThis) && parseImageNode) {
63153
+ globalThis["_parseImageNode"] = parseImageNode;
63154
+ globalThis["_imageFormatsNode"] = NODE_FORMAT_SUPPORT;
63160
63155
  }
63161
63156
  if (!("allSettled" in Promise)) {
63162
63157
  Promise.allSettled = allSettled;
63163
63158
  }
63159
+ if (!isBrowser && !("Headers" in globalThis) && Headers) {
63160
+ globalThis.Headers = Headers;
63161
+ }
63162
+ if (!isBrowser && !("Response" in globalThis) && Response) {
63163
+ globalThis.Response = Response;
63164
+ }
63165
+ if (!isBrowser && !("fetch" in globalThis) && fetchNode) {
63166
+ globalThis.fetch = fetchNode;
63167
+ }
63164
63168
 
63165
63169
  // ../worker-utils/src/lib/env-utils/version.ts
63166
- var VERSION = true ? "4.0.0-alpha.9" : DEFAULT_VERSION;
63167
- if (false) {
63168
- console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
63170
+ function getVersion() {
63171
+ var _a;
63172
+ if (!((_a = globalThis._loadersgl_) == null ? void 0 : _a.version)) {
63173
+ globalThis._loadersgl_ = globalThis._loadersgl_ || {};
63174
+ if (false) {
63175
+ console.error("loaders.gl: The __VERSION__ variable is not injected using babel plugin. Latest unstable workers would be fetched from the CDN.");
63176
+ globalThis._loadersgl_.version = NPM_TAG;
63177
+ } else {
63178
+ globalThis._loadersgl_.version = "4.0.0-beta.2";
63179
+ }
63180
+ }
63181
+ return globalThis._loadersgl_.version;
63169
63182
  }
63183
+ var VERSION = getVersion();
63170
63184
 
63171
63185
  // ../worker-utils/src/lib/env-utils/assert.ts
63172
63186
  function assert2(condition, message) {
@@ -63304,11 +63318,30 @@ function isKnownMessage(message) {
63304
63318
  // ../worker-utils/src/lib/node/require-utils.node.ts
63305
63319
  var require_utils_node_exports = {};
63306
63320
  __export(require_utils_node_exports, {
63321
+ readFileAsArrayBuffer: () => readFileAsArrayBuffer,
63322
+ readFileAsText: () => readFileAsText,
63307
63323
  requireFromFile: () => requireFromFile,
63308
63324
  requireFromString: () => requireFromString
63309
63325
  });
63310
63326
  var import_module = __toModule(require("module"));
63311
63327
  var import_path = __toModule(require("path"));
63328
+ var import_fs2 = __toModule(require("fs"));
63329
+ async function readFileAsArrayBuffer(filename) {
63330
+ if (filename.startsWith("http")) {
63331
+ const response = await fetch(filename);
63332
+ return await response.arrayBuffer();
63333
+ }
63334
+ const buffer = import_fs2.default.readFileSync(filename);
63335
+ return buffer.buffer;
63336
+ }
63337
+ async function readFileAsText(filename) {
63338
+ if (filename.startsWith("http")) {
63339
+ const response = await fetch(filename);
63340
+ return await response.text();
63341
+ }
63342
+ const text = import_fs2.default.readFileSync(filename, "utf8");
63343
+ return text;
63344
+ }
63312
63345
  async function requireFromFile(filename) {
63313
63346
  if (filename.startsWith("http")) {
63314
63347
  const response = await fetch(filename);
@@ -63341,40 +63374,38 @@ function requireFromString(code, filename = "", options) {
63341
63374
  }
63342
63375
 
63343
63376
  // ../worker-utils/src/lib/library-utils/library-utils.ts
63344
- var LATEST = "beta";
63345
- var VERSION2 = typeof VERSION !== "undefined" ? VERSION : LATEST;
63346
63377
  var loadLibraryPromises = {};
63347
- async function loadLibrary(libraryUrl, moduleName = null, options = {}) {
63378
+ async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
63348
63379
  if (moduleName) {
63349
- libraryUrl = getLibraryUrl(libraryUrl, moduleName, options);
63380
+ libraryUrl = getLibraryUrl(libraryUrl, moduleName, options, libraryName);
63350
63381
  }
63351
63382
  loadLibraryPromises[libraryUrl] = loadLibraryPromises[libraryUrl] || loadLibraryFromFile(libraryUrl);
63352
63383
  return await loadLibraryPromises[libraryUrl];
63353
63384
  }
63354
- function getLibraryUrl(library, moduleName, options) {
63355
- if (library.startsWith("http")) {
63385
+ function getLibraryUrl(library, moduleName, options = {}, libraryName = null) {
63386
+ if (!options.useLocalLibraries && library.startsWith("http")) {
63356
63387
  return library;
63357
63388
  }
63389
+ libraryName = libraryName || library;
63358
63390
  const modules = options.modules || {};
63359
- if (modules[library]) {
63360
- return modules[library];
63391
+ if (modules[libraryName]) {
63392
+ return modules[libraryName];
63361
63393
  }
63362
63394
  if (!isBrowser2) {
63363
- return `modules/${moduleName}/dist/libs/${library}`;
63395
+ return `modules/${moduleName}/dist/libs/${libraryName}`;
63364
63396
  }
63365
63397
  if (options.CDN) {
63366
63398
  assert2(options.CDN.startsWith("http"));
63367
- return `${options.CDN}/${moduleName}@${VERSION2}/dist/libs/${library}`;
63399
+ return `${options.CDN}/${moduleName}@${VERSION}/dist/libs/${libraryName}`;
63368
63400
  }
63369
63401
  if (isWorker) {
63370
- return `../src/libs/${library}`;
63402
+ return `../src/libs/${libraryName}`;
63371
63403
  }
63372
- return `modules/${moduleName}/src/libs/${library}`;
63404
+ return `modules/${moduleName}/src/libs/${libraryName}`;
63373
63405
  }
63374
63406
  async function loadLibraryFromFile(libraryUrl) {
63375
63407
  if (libraryUrl.endsWith("wasm")) {
63376
- const response2 = await fetch(libraryUrl);
63377
- return await response2.arrayBuffer();
63408
+ return await loadAsArrayBuffer(libraryUrl);
63378
63409
  }
63379
63410
  if (!isBrowser2) {
63380
63411
  try {
@@ -63386,8 +63417,7 @@ async function loadLibraryFromFile(libraryUrl) {
63386
63417
  if (isWorker) {
63387
63418
  return importScripts(libraryUrl);
63388
63419
  }
63389
- const response = await fetch(libraryUrl);
63390
- const scriptSource = await response.text();
63420
+ const scriptSource = await loadAsText(libraryUrl);
63391
63421
  return loadLibraryFromString(scriptSource, libraryUrl);
63392
63422
  }
63393
63423
  function loadLibraryFromString(scriptSource, id) {
@@ -63408,14 +63438,31 @@ function loadLibraryFromString(scriptSource, id) {
63408
63438
  document.body.appendChild(script);
63409
63439
  return null;
63410
63440
  }
63441
+ async function loadAsArrayBuffer(url) {
63442
+ if (!readFileAsArrayBuffer || url.startsWith("http")) {
63443
+ const response = await fetch(url);
63444
+ return await response.arrayBuffer();
63445
+ }
63446
+ return await readFileAsArrayBuffer(url);
63447
+ }
63448
+ async function loadAsText(url) {
63449
+ if (!readFileAsText || url.startsWith("http")) {
63450
+ const response = await fetch(url);
63451
+ return await response.text();
63452
+ }
63453
+ return await readFileAsText(url);
63454
+ }
63411
63455
 
63412
63456
  // src/lib/utils/version.ts
63413
- var VERSION3 = true ? "4.0.0-alpha.9" : "beta";
63457
+ var VERSION2 = true ? "4.0.0-beta.2" : "beta";
63414
63458
 
63415
63459
  // src/lib/parsers/basis-module-loader.ts
63416
- var VERSION4 = true ? "4.0.0-alpha.9" : "beta";
63417
- var BASIS_CDN_ENCODER_WASM = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.wasm`;
63418
- var BASIS_CDN_ENCODER_JS = `https://unpkg.com/@loaders.gl/textures@${VERSION4}/dist/libs/basis_encoder.js`;
63460
+ var BASIS_EXTERNAL_LIBRARIES = {
63461
+ TRANSCODER: "basis_transcoder.js",
63462
+ TRANSCODER_WASM: "basis_transcoder.wasm",
63463
+ ENCODER: "basis_encoder.js",
63464
+ ENCODER_WASM: "basis_encoder.wasm"
63465
+ };
63419
63466
  var loadBasisEncoderPromise;
63420
63467
  async function loadBasisEncoderModule(options) {
63421
63468
  const modules = options.modules || {};
@@ -63429,8 +63476,8 @@ async function loadBasisEncoder(options) {
63429
63476
  let BASIS_ENCODER = null;
63430
63477
  let wasmBinary = null;
63431
63478
  [BASIS_ENCODER, wasmBinary] = await Promise.all([
63432
- await loadLibrary(BASIS_CDN_ENCODER_JS, "textures", options),
63433
- await loadLibrary(BASIS_CDN_ENCODER_WASM, "textures", options)
63479
+ await loadLibrary(BASIS_EXTERNAL_LIBRARIES.ENCODER, "textures", options),
63480
+ await loadLibrary(BASIS_EXTERNAL_LIBRARIES.ENCODER_WASM, "textures", options)
63434
63481
  ]);
63435
63482
  BASIS_ENCODER = BASIS_ENCODER || globalThis.BASIS;
63436
63483
  return await initializeBasisEncoderModule(BASIS_ENCODER, wasmBinary);
@@ -63451,7 +63498,12 @@ function initializeBasisEncoderModule(BasisEncoderModule, wasmBinary) {
63451
63498
 
63452
63499
  // src/lib/encoders/encode-ktx2-basis-texture.ts
63453
63500
  async function encodeKTX2BasisTexture(image, options = {}) {
63454
- const { useSRGB = false, qualityLevel = 10, encodeUASTC = false, mipmaps = false } = options;
63501
+ const {
63502
+ useSRGB = false,
63503
+ qualityLevel = 10,
63504
+ encodeUASTC = false,
63505
+ mipmaps = false
63506
+ } = (options == null ? void 0 : options["ktx2-basis-writer"]) || {};
63455
63507
  const { BasisEncoder } = await loadBasisEncoderModule(options);
63456
63508
  const basisEncoder = new BasisEncoder();
63457
63509
  try {
@@ -63481,13 +63533,15 @@ var KTX2BasisWriter = {
63481
63533
  name: "Basis Universal Supercompressed GPU Texture",
63482
63534
  id: "ktx2-basis-writer",
63483
63535
  module: "textures",
63484
- version: VERSION3,
63536
+ version: VERSION2,
63485
63537
  extensions: ["ktx2"],
63486
63538
  options: {
63487
- useSRGB: false,
63488
- qualityLevel: 10,
63489
- encodeUASTC: false,
63490
- mipmaps: false
63539
+ ["ktx2-basis-writer"]: {
63540
+ useSRGB: false,
63541
+ qualityLevel: 10,
63542
+ encodeUASTC: false,
63543
+ mipmaps: false
63544
+ }
63491
63545
  },
63492
63546
  encode: encodeKTX2BasisTexture
63493
63547
  };