@loaders.gl/3d-tiles 4.0.2 → 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 = {
@@ -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,CAa9D,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"}
@@ -1 +1 @@
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 {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 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,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,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"}
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.2",
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,12 +42,12 @@
42
42
  "build-bundle": "ocular-bundle ./src/index.ts"
43
43
  },
44
44
  "dependencies": {
45
- "@loaders.gl/draco": "4.0.2",
46
- "@loaders.gl/gltf": "4.0.2",
47
- "@loaders.gl/loader-utils": "4.0.2",
48
- "@loaders.gl/math": "4.0.2",
49
- "@loaders.gl/tiles": "4.0.2",
50
- "@loaders.gl/zip": "4.0.2",
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",
@@ -56,5 +56,5 @@
56
56
  "peerDependencies": {
57
57
  "@loaders.gl/core": "^4.0.0"
58
58
  },
59
- "gitHead": "471058d109d5652f28c32c1f296fd632f9a5c806"
59
+ "gitHead": "03c871839b36c997249dabae1844df53a35d3760"
60
60
  }
@@ -1,11 +1,11 @@
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',