@loaders.gl/draco 4.4.0-alpha.17 → 4.4.0-alpha.19

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.
@@ -19,7 +19,6 @@ export declare const DracoArrowLoader: {
19
19
  readonly options: {
20
20
  readonly draco: {
21
21
  readonly decoderType: "wasm" | "js";
22
- readonly libraryPath: "libs/";
23
22
  readonly extraAttributes: {};
24
23
  readonly attributeNameEntry: undefined;
25
24
  };
@@ -1 +1 @@
1
- {"version":3,"file":"draco-arrow-loader.d.ts","sourceRoot":"","sources":["../src/draco-arrow-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAC,kBAAkB,EAAC,0BAAuB;AAIvD;;GAEG;AACH,eAAO,MAAM,gBAAgB;uBAEE,UAAU;;;;;;;;;;;;;;;;;;;;CAGmC,CAAC;AAE7E,iBAAe,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAIhG"}
1
+ {"version":3,"file":"draco-arrow-loader.d.ts","sourceRoot":"","sources":["../src/draco-arrow-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,UAAU,EAAC,MAAM,oBAAoB,CAAC;AAEnD,OAAO,KAAK,EAAC,kBAAkB,EAAC,0BAAuB;AAIvD;;GAEG;AACH,eAAO,MAAM,gBAAgB;uBAEE,UAAU;;;;;;;;;;;;;;;;;;;CAGmC,CAAC;AAE7E,iBAAe,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,CAIhG"}
@@ -5,8 +5,6 @@ export type DracoLoaderOptions = StrictLoaderOptions & {
5
5
  draco?: DracoParseOptions & {
6
6
  /** @deprecated WASM decoding is faster but JS is more backwards compatible */
7
7
  decoderType?: 'wasm' | 'js';
8
- /** @deprecated Specify where to load the Draco decoder library */
9
- libraryPath?: string;
10
8
  /** Override the URL to the worker bundle (by default loads from unpkg.com) */
11
9
  workerUrl?: string;
12
10
  };
@@ -29,7 +27,6 @@ export declare const DracoWorkerLoader: {
29
27
  readonly options: {
30
28
  readonly draco: {
31
29
  readonly decoderType: "wasm" | "js";
32
- readonly libraryPath: "libs/";
33
30
  readonly extraAttributes: {};
34
31
  readonly attributeNameEntry: undefined;
35
32
  };
@@ -54,7 +51,6 @@ export declare const DracoLoader: {
54
51
  readonly options: {
55
52
  readonly draco: {
56
53
  readonly decoderType: "wasm" | "js";
57
- readonly libraryPath: "libs/";
58
54
  readonly extraAttributes: {};
59
55
  readonly attributeNameEntry: undefined;
60
56
  };
@@ -1 +1 @@
1
- {"version":3,"file":"draco-loader.d.ts","sourceRoot":"","sources":["../src/draco-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAC5F,OAAO,KAAK,EAAC,SAAS,EAAC,6BAA0B;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAC,8BAA2B;AAK1D,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACrD,KAAK,CAAC,EAAE,iBAAiB,GAAG;QAC1B,8EAA8E;QAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,kEAAkE;QAClE,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;uBACC,SAAS;wBACnB,KAAK;;;;;;;;;;;;;;;;;;CAmBuC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,WAAW;;uBAzBO,SAAS;wBACnB,KAAK;;;;;;;;;;;;;;;;;;CA2BiD,CAAC;AAE5E,iBAAe,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC,CAW/F"}
1
+ {"version":3,"file":"draco-loader.d.ts","sourceRoot":"","sources":["../src/draco-loader.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA2B,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAE5F,OAAO,KAAK,EAAC,SAAS,EAAC,6BAA0B;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAC,8BAA2B;AAK1D,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACrD,KAAK,CAAC,EAAE,iBAAiB,GAAG;QAC1B,8EAA8E;QAC9E,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,8EAA8E;QAC9E,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB;uBACC,SAAS;wBACnB,KAAK;;;;;;;;;;;;;;;;;CAkBuC,CAAC;AAElE;;GAEG;AACH,eAAO,MAAM,WAAW;;uBAxBO,SAAS;wBACnB,KAAK;;;;;;;;;;;;;;;;;CA0BiD,CAAC;AAE5E,iBAAe,KAAK,CAAC,WAAW,EAAE,WAAW,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,SAAS,CAAC,CAW/F"}
@@ -1,6 +1,7 @@
1
1
  // loaders.gl
2
2
  // SPDX-License-Identifier: MIT
3
3
  // Copyright (c) vis.gl contributors
4
+ import { extractLoadLibraryOptions } from '@loaders.gl/worker-utils';
4
5
  import { VERSION } from "./lib/utils/version.js";
5
6
  import DracoParser from "./lib/draco-parser.js";
6
7
  import { loadDracoDecoderModule } from "./lib/draco-module-loader.js";
@@ -23,7 +24,6 @@ export const DracoWorkerLoader = {
23
24
  options: {
24
25
  draco: {
25
26
  decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js', // 'js' for IE11
26
- libraryPath: 'libs/',
27
27
  extraAttributes: {},
28
28
  attributeNameEntry: undefined
29
29
  }
@@ -37,7 +37,7 @@ export const DracoLoader = {
37
37
  parse
38
38
  };
39
39
  async function parse(arrayBuffer, options) {
40
- const { draco } = await loadDracoDecoderModule(options?.core, options?.draco?.decoderType || 'wasm');
40
+ const { draco } = await loadDracoDecoderModule(extractLoadLibraryOptions(options), options?.draco?.decoderType || 'wasm');
41
41
  const dracoParser = new DracoParser(draco);
42
42
  try {
43
43
  return dracoParser.parseSync(arrayBuffer, options?.draco);
@@ -1 +1 @@
1
- {"version":3,"file":"draco-loader.js","sourceRoot":"","sources":["../src/draco-loader.ts"],"names":[],"mappings":"AAAA,aAAa;AACb,+BAA+B;AAC/B,oCAAoC;AAKpC,OAAO,EAAC,OAAO,EAAC,+BAA4B;AAC5C,OAAO,WAAW,8BAA2B;AAC7C,OAAO,EAAC,sBAAsB,EAAC,qCAAkC;AAajE;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,QAAQ,EAAE,IAA4B;IACtC,SAAS,EAAE,IAAa;IACxB,IAAI,EAAE,OAAO;IACb,EAAE,EAAE,OAAO;IACX,MAAM,EAAE,OAAO;IACf,oBAAoB;IACpB,OAAO,EAAE,OAAO;IAChB,MAAM,EAAE,IAAI;IACZ,UAAU,EAAE,CAAC,KAAK,CAAC;IACnB,SAAS,EAAE,CAAC,0BAA0B,CAAC;IACvC,MAAM,EAAE,IAAI;IACZ,KAAK,EAAE,CAAC,OAAO,CAAC;IAChB,OAAO,EAAE;QACP,KAAK,EAAE;YACL,WAAW,EAAE,OAAO,WAAW,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,gBAAgB;YAC9E,WAAW,EAAE,OAAO;YACpB,eAAe,EAAE,EAAE;YACnB,kBAAkB,EAAE,SAAS;SAC9B;KACF;CAC8D,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,iBAAiB;IACpB,KAA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,eAAe,EAAE,EAAE;YACnB,kBAAkB,EAAE,SAAS;SAC9B;KACF;CAC8D,CAAC;AAElE;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,GAAG,iBAAiB;IACpB,KAAK;CACoE,CAAC;AAE5E,KAAK,UAAU,KAAK,CAAC,WAAwB,EAAE,OAA4B;IACzE,MAAM,EAAC,KAAK,EAAC,GAAG,MAAM,sBAAsB,CAC1C,yBAAyB,CAAC,OAAO,CAAC,EAClC,OAAO,EAAE,KAAK,EAAE,WAAW,IAAI,MAAM,CACtC,CAAC;IACF,MAAM,WAAW,GAAG,IAAI,WAAW,CAAC,KAAK,CAAC,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,WAAW,CAAC,SAAS,CAAC,WAAW,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC;IAC5D,CAAC;YAAS,CAAC;QACT,WAAW,CAAC,OAAO,EAAE,CAAC;IACxB,CAAC;AACH,CAAC"}
@@ -50482,7 +50482,7 @@ function getVersion() {
50482
50482
  globalThis._loadersgl_.version = NPM_TAG;
50483
50483
  warningIssued = true;
50484
50484
  } else {
50485
- globalThis._loadersgl_.version = "4.4.0-alpha.17";
50485
+ globalThis._loadersgl_.version = "4.4.0-alpha.19";
50486
50486
  }
50487
50487
  }
50488
50488
  return globalThis._loadersgl_.version;
@@ -50644,6 +50644,17 @@ function isKnownMessage(message) {
50644
50644
 
50645
50645
  // ../worker-utils/src/lib/library-utils/library-utils.ts
50646
50646
  var loadLibraryPromises = {};
50647
+ function extractLoadLibraryOptions(options = {}) {
50648
+ var _a, _b;
50649
+ const useLocalLibraries = options.useLocalLibraries ?? ((_a = options.core) == null ? void 0 : _a.useLocalLibraries);
50650
+ const CDN = options.CDN ?? ((_b = options.core) == null ? void 0 : _b.CDN);
50651
+ const modules = options.modules;
50652
+ return {
50653
+ ...useLocalLibraries !== void 0 ? { useLocalLibraries } : {},
50654
+ ...CDN !== void 0 ? { CDN } : {},
50655
+ ...modules !== void 0 ? { modules } : {}
50656
+ };
50657
+ }
50647
50658
  async function loadLibrary(libraryUrl, moduleName = null, options = {}, libraryName = null) {
50648
50659
  if (moduleName) {
50649
50660
  libraryUrl = getLibraryUrl(libraryUrl, moduleName, options, libraryName);
@@ -54332,7 +54343,7 @@ function initializeDracoDecoder(DracoDecoderModule, wasmBinary) {
54332
54343
  }
54333
54344
 
54334
54345
  // src/lib/utils/version.ts
54335
- var VERSION2 = true ? "4.4.0-alpha.17" : "latest";
54346
+ var VERSION2 = true ? "4.4.0-alpha.19" : "latest";
54336
54347
 
54337
54348
  // ../schema-utils/src/lib/schema/data-type.ts
54338
54349
  function getDataTypeFromTypedArray(array) {
@@ -54926,7 +54937,6 @@ var DracoWorkerLoader = {
54926
54937
  draco: {
54927
54938
  decoderType: typeof WebAssembly === "object" ? "wasm" : "js",
54928
54939
  // 'js' for IE11
54929
- libraryPath: "libs/",
54930
54940
  extraAttributes: {},
54931
54941
  attributeNameEntry: void 0
54932
54942
  }
@@ -54939,7 +54949,7 @@ var DracoLoader = {
54939
54949
  async function parse(arrayBuffer, options) {
54940
54950
  var _a;
54941
54951
  const { draco } = await loadDracoDecoderModule(
54942
- options == null ? void 0 : options.core,
54952
+ extractLoadLibraryOptions(options),
54943
54953
  ((_a = options == null ? void 0 : options.draco) == null ? void 0 : _a.decoderType) || "wasm"
54944
54954
  );
54945
54955
  const dracoParser = new DracoParser(draco);