@loaders.gl/draco 4.0.3 → 4.1.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/dist.dev.js CHANGED
@@ -59,14 +59,6 @@ var __exports__ = (() => {
59
59
  var VERSION = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
60
60
 
61
61
  // src/draco-loader.ts
62
- var DEFAULT_DRACO_OPTIONS = {
63
- draco: {
64
- decoderType: typeof WebAssembly === "object" ? "wasm" : "js",
65
- libraryPath: "libs/",
66
- extraAttributes: {},
67
- attributeNameEntry: void 0
68
- }
69
- };
70
62
  var DracoLoader = {
71
63
  name: "Draco",
72
64
  id: "draco",
@@ -77,7 +69,14 @@ var __exports__ = (() => {
77
69
  mimeTypes: ["application/octet-stream"],
78
70
  binary: true,
79
71
  tests: ["DRACO"],
80
- options: DEFAULT_DRACO_OPTIONS
72
+ options: {
73
+ draco: {
74
+ decoderType: typeof WebAssembly === "object" ? "wasm" : "js",
75
+ libraryPath: "libs/",
76
+ extraAttributes: {},
77
+ attributeNameEntry: void 0
78
+ }
79
+ }
81
80
  };
82
81
 
83
82
  // ../schema/src/lib/table/simple-table/data-type.ts
@@ -1 +1 @@
1
- {"version":3,"file":"draco-loader.d.ts","sourceRoot":"","sources":["../src/draco-loader.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAG1D,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,EAAE,iBAAiB,GAAG;QAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,MAAC;QACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAWF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,CAYpE,CAAC"}
1
+ {"version":3,"file":"draco-loader.d.ts","sourceRoot":"","sources":["../src/draco-loader.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AACpE,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AACjD,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,oBAAoB,CAAC;AAG1D,MAAM,MAAM,kBAAkB,GAAG,aAAa,GAAG;IAC/C,KAAK,CAAC,EAAE,iBAAiB,GAAG;QAC1B,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,eAAe,CAAC,MAAC;QACjB,kBAAkB,CAAC,EAAE,MAAM,CAAC;QAC5B,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,MAAM,CAAC,SAAS,EAAE,KAAK,EAAE,kBAAkB,CAmBpE,CAAC"}
@@ -1,12 +1,4 @@
1
1
  import { VERSION } from "./lib/utils/version.js";
2
- const DEFAULT_DRACO_OPTIONS = {
3
- draco: {
4
- decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js',
5
- libraryPath: 'libs/',
6
- extraAttributes: {},
7
- attributeNameEntry: undefined
8
- }
9
- };
10
2
  export const DracoLoader = {
11
3
  name: 'Draco',
12
4
  id: 'draco',
@@ -17,6 +9,13 @@ export const DracoLoader = {
17
9
  mimeTypes: ['application/octet-stream'],
18
10
  binary: true,
19
11
  tests: ['DRACO'],
20
- options: DEFAULT_DRACO_OPTIONS
12
+ options: {
13
+ draco: {
14
+ decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js',
15
+ libraryPath: 'libs/',
16
+ extraAttributes: {},
17
+ attributeNameEntry: undefined
18
+ }
19
+ }
21
20
  };
22
21
  //# sourceMappingURL=draco-loader.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"draco-loader.js","names":["VERSION","DEFAULT_DRACO_OPTIONS","draco","decoderType","WebAssembly","libraryPath","extraAttributes","attributeNameEntry","undefined","DracoLoader","name","id","module","version","worker","extensions","mimeTypes","binary","tests","options"],"sources":["../src/draco-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {DracoMesh} from './lib/draco-types';\nimport type {DracoParseOptions} from './lib/draco-parser';\nimport {VERSION} from './lib/utils/version';\n\nexport type DracoLoaderOptions = LoaderOptions & {\n draco?: DracoParseOptions & {\n decoderType?: 'wasm' | 'js';\n libraryPath?: string;\n extraAttributes?;\n attributeNameEntry?: string;\n workerUrl?: string;\n };\n};\n\nconst DEFAULT_DRACO_OPTIONS: DracoLoaderOptions = {\n draco: {\n decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js', // 'js' for IE11\n libraryPath: 'libs/',\n extraAttributes: {},\n attributeNameEntry: undefined\n }\n};\n\n/**\n * Worker loader for Draco3D compressed geometries\n */\nexport const DracoLoader: Loader<DracoMesh, never, DracoLoaderOptions> = {\n name: 'Draco',\n id: 'draco',\n module: 'draco',\n // shapes: ['mesh'],\n version: VERSION,\n worker: true,\n extensions: ['drc'],\n mimeTypes: ['application/octet-stream'],\n binary: true,\n tests: ['DRACO'],\n options: DEFAULT_DRACO_OPTIONS\n};\n"],"mappings":"SAKQA,OAAO;AAYf,MAAMC,qBAAyC,GAAG;EAChDC,KAAK,EAAE;IACLC,WAAW,EAAE,OAAOC,WAAW,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI;IAC5DC,WAAW,EAAE,OAAO;IACpBC,eAAe,EAAE,CAAC,CAAC;IACnBC,kBAAkB,EAAEC;EACtB;AACF,CAAC;AAKD,OAAO,MAAMC,WAAyD,GAAG;EACvEC,IAAI,EAAE,OAAO;EACbC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EAEfC,OAAO,EAAEb,OAAO;EAChBc,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,CAAC,OAAO,CAAC;EAChBC,OAAO,EAAElB;AACX,CAAC"}
1
+ {"version":3,"file":"draco-loader.js","names":["VERSION","DracoLoader","name","id","module","version","worker","extensions","mimeTypes","binary","tests","options","draco","decoderType","WebAssembly","libraryPath","extraAttributes","attributeNameEntry","undefined"],"sources":["../src/draco-loader.ts"],"sourcesContent":["// loaders.gl, MIT license\n// Copyright (c) vis.gl contributors\n\nimport type {Loader, LoaderOptions} from '@loaders.gl/loader-utils';\nimport type {DracoMesh} from './lib/draco-types';\nimport type {DracoParseOptions} from './lib/draco-parser';\nimport {VERSION} from './lib/utils/version';\n\nexport type DracoLoaderOptions = LoaderOptions & {\n draco?: DracoParseOptions & {\n decoderType?: 'wasm' | 'js';\n libraryPath?: string;\n extraAttributes?;\n attributeNameEntry?: string;\n workerUrl?: string;\n };\n};\n\n/**\n * Worker loader for Draco3D compressed geometries\n */\nexport const DracoLoader: Loader<DracoMesh, never, DracoLoaderOptions> = {\n name: 'Draco',\n id: 'draco',\n module: 'draco',\n // shapes: ['mesh'],\n version: VERSION,\n worker: true,\n extensions: ['drc'],\n mimeTypes: ['application/octet-stream'],\n binary: true,\n tests: ['DRACO'],\n options: {\n draco: {\n decoderType: typeof WebAssembly === 'object' ? 'wasm' : 'js', // 'js' for IE11\n libraryPath: 'libs/',\n extraAttributes: {},\n attributeNameEntry: undefined\n }\n }\n};\n"],"mappings":"SAMQA,OAAO;AAef,OAAO,MAAMC,WAAyD,GAAG;EACvEC,IAAI,EAAE,OAAO;EACbC,EAAE,EAAE,OAAO;EACXC,MAAM,EAAE,OAAO;EAEfC,OAAO,EAAEL,OAAO;EAChBM,MAAM,EAAE,IAAI;EACZC,UAAU,EAAE,CAAC,KAAK,CAAC;EACnBC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,MAAM,EAAE,IAAI;EACZC,KAAK,EAAE,CAAC,OAAO,CAAC;EAChBC,OAAO,EAAE;IACPC,KAAK,EAAE;MACLC,WAAW,EAAE,OAAOC,WAAW,KAAK,QAAQ,GAAG,MAAM,GAAG,IAAI;MAC5DC,WAAW,EAAE,OAAO;MACpBC,eAAe,EAAE,CAAC,CAAC;MACnBC,kBAAkB,EAAEC;IACtB;EACF;AACF,CAAC"}