@loaders.gl/3d-tiles 4.0.1 → 4.0.3

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
@@ -4302,7 +4302,7 @@ var __exports__ = (() => {
4302
4302
  var nodeVersion = matches && parseFloat(matches[1]) || 0;
4303
4303
 
4304
4304
  // ../worker-utils/src/lib/env-utils/version.ts
4305
- var NPM_TAG = "beta";
4305
+ var NPM_TAG = "latest";
4306
4306
  function getVersion() {
4307
4307
  if (!globalThis._loadersgl_?.version) {
4308
4308
  globalThis._loadersgl_ = globalThis._loadersgl_ || {};
@@ -11942,7 +11942,10 @@ var __exports__ = (() => {
11942
11942
  return await new Promise((resolve2, reject) => {
11943
11943
  try {
11944
11944
  image.onload = () => resolve2(image);
11945
- image.onerror = (err) => reject(new Error(`Could not load image ${url}: ${err}`));
11945
+ image.onerror = (error) => {
11946
+ const message = error instanceof Error ? error.message : "error";
11947
+ reject(new Error(message));
11948
+ };
11946
11949
  } catch (error) {
11947
11950
  reject(error);
11948
11951
  }
@@ -12351,7 +12354,7 @@ var __exports__ = (() => {
12351
12354
  function getTypedArrayForAccessor(json, buffers, accessor) {
12352
12355
  const gltfAccessor = typeof accessor === "number" ? json.accessors?.[accessor] : accessor;
12353
12356
  if (!gltfAccessor) {
12354
- throw new Error(`No gltf accessor ${accessor}`);
12357
+ throw new Error(`No gltf accessor ${JSON.stringify(accessor)}`);
12355
12358
  }
12356
12359
  const bufferView = json.bufferViews?.[gltfAccessor.bufferView || 0];
12357
12360
  if (!bufferView) {
@@ -13521,7 +13524,7 @@ var __exports__ = (() => {
13521
13524
  var VERSION5 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
13522
13525
 
13523
13526
  // ../textures/src/lib/utils/version.ts
13524
- var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "beta";
13527
+ var VERSION6 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "latest";
13525
13528
 
13526
13529
  // ../textures/src/lib/parsers/basis-module-loader.ts
13527
13530
  var BASIS_EXTERNAL_LIBRARIES = {
@@ -19560,11 +19563,12 @@ var __exports__ = (() => {
19560
19563
  version: VERSION2,
19561
19564
  extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
19562
19565
  mimeTypes: ["application/octet-stream"],
19563
- encodeSync,
19564
19566
  binary: true,
19565
19567
  options: {
19566
19568
  ["3d-tiles"]: {}
19567
- }
19569
+ },
19570
+ encode: async (tile, options) => encodeSync(tile, options),
19571
+ encodeSync
19568
19572
  };
19569
19573
  function encodeSync(tile, options) {
19570
19574
  return encode3DTile(tile, options);
package/dist/index.cjs CHANGED
@@ -2826,11 +2826,12 @@ var Tile3DWriter = {
2826
2826
  version: VERSION,
2827
2827
  extensions: ["cmpt", "pnts", "b3dm", "i3dm"],
2828
2828
  mimeTypes: ["application/octet-stream"],
2829
- encodeSync,
2830
2829
  binary: true,
2831
2830
  options: {
2832
2831
  ["3d-tiles"]: {}
2833
- }
2832
+ },
2833
+ encode: async (tile, options) => encodeSync(tile, options),
2834
+ encodeSync
2834
2835
  };
2835
2836
  function encodeSync(tile, options) {
2836
2837
  return encode3DTile(tile, options);
@@ -1,6 +1,6 @@
1
- import type { Writer, WriterOptions } from '@loaders.gl/loader-utils';
1
+ import type { WriterWithEncoder, WriterOptions } from '@loaders.gl/loader-utils';
2
2
  /**
3
3
  * Exporter for 3D Tiles
4
4
  */
5
- export declare const Tile3DWriter: Writer<unknown, never, WriterOptions>;
5
+ export declare const Tile3DWriter: WriterWithEncoder<unknown, never, WriterOptions>;
6
6
  //# sourceMappingURL=tile-3d-writer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-writer.d.ts","sourceRoot":"","sources":["../src/tile-3d-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,MAAM,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAIpE;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,MAAM,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAY9D,CAAC"}
1
+ {"version":3,"file":"tile-3d-writer.d.ts","sourceRoot":"","sources":["../src/tile-3d-writer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAE,aAAa,EAAC,MAAM,0BAA0B,CAAC;AAI/E;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,OAAO,EAAE,KAAK,EAAE,aAAa,CAazE,CAAC"}
@@ -7,11 +7,12 @@ export const Tile3DWriter = {
7
7
  version: VERSION,
8
8
  extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],
9
9
  mimeTypes: ['application/octet-stream'],
10
- encodeSync,
11
10
  binary: true,
12
11
  options: {
13
12
  ['3d-tiles']: {}
14
- }
13
+ },
14
+ encode: async (tile, options) => encodeSync(tile, options),
15
+ encodeSync
15
16
  };
16
17
  function encodeSync(tile, options) {
17
18
  return encode3DTile(tile, options);
@@ -1 +1 @@
1
- {"version":3,"file":"tile-3d-writer.js","names":["VERSION","encode3DTile","Tile3DWriter","name","id","module","version","extensions","mimeTypes","encodeSync","binary","options","tile"],"sources":["../src/tile-3d-writer.ts"],"sourcesContent":["import type {Writer, WriterOptions} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: Writer<unknown, never, WriterOptions> = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n encodeSync,\n binary: true,\n options: {\n ['3d-tiles']: {}\n }\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":"SACQA,OAAO;AAAA,OACRC,YAAY;AAKnB,OAAO,MAAMC,YAAmD,GAAG;EACjEC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,UAAU;EACVC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE;IACP,CAAC,UAAU,GAAG,CAAC;EACjB;AACF,CAAC;AAED,SAASF,UAAUA,CAACG,IAAI,EAAED,OAAO,EAAE;EACjC,OAAOV,YAAY,CAACW,IAAI,EAAED,OAAO,CAAC;AACpC"}
1
+ {"version":3,"file":"tile-3d-writer.js","names":["VERSION","encode3DTile","Tile3DWriter","name","id","module","version","extensions","mimeTypes","binary","options","encode","tile","encodeSync"],"sources":["../src/tile-3d-writer.ts"],"sourcesContent":["import type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils';\nimport {VERSION} from './lib/utils/version';\nimport encode3DTile from './lib/encoders/encode-3d-tile';\n\n/**\n * Exporter for 3D Tiles\n */\nexport const Tile3DWriter: WriterWithEncoder<unknown, never, WriterOptions> = {\n name: '3D Tile',\n id: '3d-tiles',\n module: '3d-tiles',\n version: VERSION,\n extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],\n mimeTypes: ['application/octet-stream'],\n binary: true,\n options: {\n ['3d-tiles']: {}\n },\n encode: async (tile, options) => encodeSync(tile, options),\n encodeSync\n};\n\nfunction encodeSync(tile, options) {\n return encode3DTile(tile, options);\n}\n"],"mappings":"SACQA,OAAO;AAAA,OACRC,YAAY;AAKnB,OAAO,MAAMC,YAA8D,GAAG;EAC5EC,IAAI,EAAE,SAAS;EACfC,EAAE,EAAE,UAAU;EACdC,MAAM,EAAE,UAAU;EAClBC,OAAO,EAAEN,OAAO;EAChBO,UAAU,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC;EAC5CC,SAAS,EAAE,CAAC,0BAA0B,CAAC;EACvCC,MAAM,EAAE,IAAI;EACZC,OAAO,EAAE;IACP,CAAC,UAAU,GAAG,CAAC;EACjB,CAAC;EACDC,MAAM,EAAE,MAAAA,CAAOC,IAAI,EAAEF,OAAO,KAAKG,UAAU,CAACD,IAAI,EAAEF,OAAO,CAAC;EAC1DG;AACF,CAAC;AAED,SAASA,UAAUA,CAACD,IAAI,EAAEF,OAAO,EAAE;EACjC,OAAOT,YAAY,CAACW,IAAI,EAAEF,OAAO,CAAC;AACpC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/3d-tiles",
3
- "version": "4.0.1",
3
+ "version": "4.0.3",
4
4
  "description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -42,19 +42,19 @@
42
42
  "build-bundle": "ocular-bundle ./src/index.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@loaders.gl/draco": "4.0.1",
46
- "@loaders.gl/gltf": "4.0.1",
47
- "@loaders.gl/loader-utils": "4.0.1",
48
- "@loaders.gl/math": "4.0.1",
49
- "@loaders.gl/tiles": "4.0.1",
50
- "@loaders.gl/zip": "4.0.1",
45
+ "@loaders.gl/draco": "4.0.3",
46
+ "@loaders.gl/gltf": "4.0.3",
47
+ "@loaders.gl/loader-utils": "4.0.3",
48
+ "@loaders.gl/math": "4.0.3",
49
+ "@loaders.gl/tiles": "4.0.3",
50
+ "@loaders.gl/zip": "4.0.3",
51
51
  "@math.gl/core": "^4.0.0",
52
52
  "@math.gl/geospatial": "^4.0.0",
53
53
  "@probe.gl/log": "^4.0.4",
54
54
  "long": "^5.2.1"
55
55
  },
56
56
  "peerDependencies": {
57
- "@loaders.gl/core": "4.0.0-beta.8"
57
+ "@loaders.gl/core": "^4.0.0"
58
58
  },
59
- "gitHead": "765e5a26a6bf3f2cc02cabffc4a1e3665ec92a53"
59
+ "gitHead": "03c871839b36c997249dabae1844df53a35d3760"
60
60
  }
@@ -1,22 +1,23 @@
1
- import type {Writer, WriterOptions} from '@loaders.gl/loader-utils';
1
+ import type {WriterWithEncoder, WriterOptions} from '@loaders.gl/loader-utils';
2
2
  import {VERSION} from './lib/utils/version';
3
3
  import encode3DTile from './lib/encoders/encode-3d-tile';
4
4
 
5
5
  /**
6
6
  * Exporter for 3D Tiles
7
7
  */
8
- export const Tile3DWriter: Writer<unknown, never, WriterOptions> = {
8
+ export const Tile3DWriter: WriterWithEncoder<unknown, never, WriterOptions> = {
9
9
  name: '3D Tile',
10
10
  id: '3d-tiles',
11
11
  module: '3d-tiles',
12
12
  version: VERSION,
13
13
  extensions: ['cmpt', 'pnts', 'b3dm', 'i3dm'],
14
14
  mimeTypes: ['application/octet-stream'],
15
- encodeSync,
16
15
  binary: true,
17
16
  options: {
18
17
  ['3d-tiles']: {}
19
- }
18
+ },
19
+ encode: async (tile, options) => encodeSync(tile, options),
20
+ encodeSync
20
21
  };
21
22
 
22
23
  function encodeSync(tile, options) {