@loaders.gl/3d-tiles 3.3.0-alpha.1 → 3.3.0-alpha.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.
package/dist/dist.min.js CHANGED
@@ -14,8 +14,8 @@
14
14
  };
15
15
  var __export = (target, all) => {
16
16
  __markAsModule(target);
17
- for (var name9 in all)
18
- __defProp(target, name9, { get: all[name9], enumerable: true });
17
+ for (var name10 in all)
18
+ __defProp(target, name10, { get: all[name10], enumerable: true });
19
19
  };
20
20
  var __reExport = (target, module2, desc) => {
21
21
  if (module2 && typeof module2 === "object" || typeof module2 === "function") {
@@ -252,9 +252,9 @@
252
252
  constructor(props) {
253
253
  this.terminated = false;
254
254
  this._loadableURL = "";
255
- const { name: name9, source, url } = props;
255
+ const { name: name10, source, url } = props;
256
256
  assert3(source || url);
257
- this.name = name9;
257
+ this.name = name10;
258
258
  this.source = source;
259
259
  this.url = url;
260
260
  this.onMessage = NOOP;
@@ -262,7 +262,7 @@
262
262
  this.worker = isBrowser2 ? this._createBrowserWorker() : this._createNodeWorker();
263
263
  }
264
264
  static isSupported() {
265
- return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !== void 0;
265
+ return typeof Worker !== "undefined" && isBrowser2 || typeof Worker2 !== "undefined" && !isBrowser2;
266
266
  }
267
267
  destroy() {
268
268
  this.onMessage = NOOP;
@@ -379,9 +379,9 @@
379
379
  this.onDebug = props.onDebug;
380
380
  }
381
381
  }
382
- async startJob(name9, onMessage2 = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
382
+ async startJob(name10, onMessage2 = (job, type, data) => job.done(data), onError = (job, error) => job.error(error)) {
383
383
  const startPromise = new Promise((onStart) => {
384
- this.jobQueue.push({ name: name9, onMessage: onMessage2, onError, onStart });
384
+ this.jobQueue.push({ name: name10, onMessage: onMessage2, onError, onStart });
385
385
  return this;
386
386
  });
387
387
  this._startQueuedJob();
@@ -432,8 +432,8 @@
432
432
  }
433
433
  if (this.count < this._getMaxConcurrency()) {
434
434
  this.count++;
435
- const name9 = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;
436
- return new WorkerThread({ name: name9, source: this.source, url: this.url });
435
+ const name10 = `${this.name.toLowerCase()} (#${this.count} of ${this.maxConcurrency})`;
436
+ return new WorkerThread({ name: name10, source: this.source, url: this.url });
437
437
  }
438
438
  return null;
439
439
  }
@@ -485,16 +485,16 @@
485
485
  }
486
486
  }
487
487
  getWorkerPool(options) {
488
- const { name: name9, source, url } = options;
489
- let workerPool = this.workerPools.get(name9);
488
+ const { name: name10, source, url } = options;
489
+ let workerPool = this.workerPools.get(name10);
490
490
  if (!workerPool) {
491
491
  workerPool = new WorkerPool({
492
- name: name9,
492
+ name: name10,
493
493
  source,
494
494
  url
495
495
  });
496
496
  workerPool.setProps(this._getWorkerPoolProps());
497
- this.workerPools.set(name9, workerPool);
497
+ this.workerPools.set(name10, workerPool);
498
498
  }
499
499
  return workerPool;
500
500
  }
@@ -663,10 +663,10 @@
663
663
  return loader.worker && options?.worker;
664
664
  }
665
665
  async function parseWithWorker(loader, data, options, context, parseOnMainThread) {
666
- const name9 = loader.id;
666
+ const name10 = loader.id;
667
667
  const url = getWorkerURL(loader, options);
668
668
  const workerFarm = WorkerFarm.getWorkerFarm(options);
669
- const workerPool = workerFarm.getWorkerPool({ name: name9, url });
669
+ const workerPool = workerFarm.getWorkerPool({ name: name10, url });
670
670
  options = JSON.parse(JSON.stringify(options));
671
671
  context = JSON.parse(JSON.stringify(context || {}));
672
672
  const job = await workerPool.startJob("process-on-worker", onMessage.bind(null, parseOnMainThread));
@@ -4670,7 +4670,7 @@
4670
4670
  const propNames = Object.getOwnPropertyNames(proto);
4671
4671
  for (const key of propNames) {
4672
4672
  if (typeof obj[key] === "function") {
4673
- if (!predefined.find((name9) => key === name9)) {
4673
+ if (!predefined.find((name10) => key === name10)) {
4674
4674
  obj[key] = obj[key].bind(obj);
4675
4675
  }
4676
4676
  }
@@ -5564,7 +5564,7 @@
5564
5564
  const propNames = Object.getOwnPropertyNames(proto);
5565
5565
  for (const key of propNames) {
5566
5566
  if (typeof obj[key] === "function") {
5567
- if (!predefined.find((name9) => key === name9)) {
5567
+ if (!predefined.find((name10) => key === name10)) {
5568
5568
  obj[key] = obj[key].bind(obj);
5569
5569
  }
5570
5570
  }
@@ -6585,6 +6585,7 @@
6585
6585
  var DEFAULT_DRACO_OPTIONS, DracoLoader;
6586
6586
  var init_draco_loader = __esm({
6587
6587
  "../draco/src/draco-loader.ts"() {
6588
+ init_src();
6588
6589
  init_version3();
6589
6590
  DEFAULT_DRACO_OPTIONS = {
6590
6591
  draco: {
@@ -6596,7 +6597,7 @@
6596
6597
  };
6597
6598
  DracoLoader = {
6598
6599
  name: "Draco",
6599
- id: "draco",
6600
+ id: isBrowser2 ? "draco" : "draco-nodejs",
6600
6601
  module: "draco",
6601
6602
  shapes: ["mesh"],
6602
6603
  version: VERSION6,
@@ -6692,8 +6693,8 @@
6692
6693
  }
6693
6694
  select(...columnNames) {
6694
6695
  const nameMap = Object.create(null);
6695
- for (const name9 of columnNames) {
6696
- nameMap[name9] = true;
6696
+ for (const name10 of columnNames) {
6697
+ nameMap[name10] = true;
6697
6698
  }
6698
6699
  const selectedFields = this.fields.filter((field) => nameMap[field.name]);
6699
6700
  return new Schema(selectedFields, this.metadata);
@@ -6731,8 +6732,8 @@
6731
6732
  var init_field = __esm({
6732
6733
  "../schema/src/lib/schema/impl/field.ts"() {
6733
6734
  Field = class {
6734
- constructor(name9, type, nullable = false, metadata = new Map()) {
6735
- this.name = name9;
6735
+ constructor(name10, type, nullable = false, metadata = new Map()) {
6736
+ this.name = name10;
6736
6737
  this.type = type;
6737
6738
  this.nullable = nullable;
6738
6739
  this.metadata = metadata;
@@ -7719,8 +7720,8 @@
7719
7720
  }
7720
7721
  throw new Error(ERR_TYPE_CONVERSION);
7721
7722
  }
7722
- static fromName(name9) {
7723
- const glType = NAME_TO_GL_TYPE[name9];
7723
+ static fromName(name10) {
7724
+ const glType = NAME_TO_GL_TYPE[name10];
7724
7725
  if (!glType) {
7725
7726
  throw new Error(ERR_TYPE_CONVERSION);
7726
7727
  }
@@ -8279,10 +8280,10 @@
8279
8280
  }
8280
8281
  return void 0;
8281
8282
  }
8282
- hasProperty(batchId, name9) {
8283
+ hasProperty(batchId, name10) {
8283
8284
  this._checkBatchId(batchId);
8284
- assert2(typeof name9 === "string", name9);
8285
- return defined2(this._properties[name9]) || this._hasPropertyInHierarchy(batchId, name9);
8285
+ assert2(typeof name10 === "string", name10);
8286
+ return defined2(this._properties[name10]) || this._hasPropertyInHierarchy(batchId, name10);
8286
8287
  }
8287
8288
  getPropertyNames(batchId, results) {
8288
8289
  this._checkBatchId(batchId);
@@ -8295,47 +8296,47 @@
8295
8296
  }
8296
8297
  return results;
8297
8298
  }
8298
- getProperty(batchId, name9) {
8299
+ getProperty(batchId, name10) {
8299
8300
  this._checkBatchId(batchId);
8300
- assert2(typeof name9 === "string", name9);
8301
+ assert2(typeof name10 === "string", name10);
8301
8302
  if (this._binaryProperties) {
8302
- const binaryProperty = this._binaryProperties[name9];
8303
+ const binaryProperty = this._binaryProperties[name10];
8303
8304
  if (defined2(binaryProperty)) {
8304
8305
  return this._getBinaryProperty(binaryProperty, batchId);
8305
8306
  }
8306
8307
  }
8307
- const propertyValues = this._properties[name9];
8308
+ const propertyValues = this._properties[name10];
8308
8309
  if (defined2(propertyValues)) {
8309
8310
  return clone3(propertyValues[batchId], true);
8310
8311
  }
8311
8312
  if (this._hierarchy) {
8312
- const hierarchyProperty = this._getHierarchyProperty(batchId, name9);
8313
+ const hierarchyProperty = this._getHierarchyProperty(batchId, name10);
8313
8314
  if (defined2(hierarchyProperty)) {
8314
8315
  return hierarchyProperty;
8315
8316
  }
8316
8317
  }
8317
8318
  return void 0;
8318
8319
  }
8319
- setProperty(batchId, name9, value) {
8320
+ setProperty(batchId, name10, value) {
8320
8321
  const featureCount = this.featureCount;
8321
8322
  this._checkBatchId(batchId);
8322
- assert2(typeof name9 === "string", name9);
8323
+ assert2(typeof name10 === "string", name10);
8323
8324
  if (this._binaryProperties) {
8324
- const binaryProperty = this._binaryProperties[name9];
8325
+ const binaryProperty = this._binaryProperties[name10];
8325
8326
  if (binaryProperty) {
8326
8327
  this._setBinaryProperty(binaryProperty, batchId, value);
8327
8328
  return;
8328
8329
  }
8329
8330
  }
8330
8331
  if (this._hierarchy) {
8331
- if (this._setHierarchyProperty(this, batchId, name9, value)) {
8332
+ if (this._setHierarchyProperty(this, batchId, name10, value)) {
8332
8333
  return;
8333
8334
  }
8334
8335
  }
8335
- let propertyValues = this._properties[name9];
8336
+ let propertyValues = this._properties[name10];
8336
8337
  if (!defined2(propertyValues)) {
8337
- this._properties[name9] = new Array(featureCount);
8338
- propertyValues = this._properties[name9];
8338
+ this._properties[name10] = new Array(featureCount);
8339
+ propertyValues = this._properties[name10];
8339
8340
  }
8340
8341
  propertyValues[batchId] = clone3(value, true);
8341
8342
  }
@@ -8353,21 +8354,21 @@
8353
8354
  }
8354
8355
  _initializeBinaryProperties() {
8355
8356
  let binaryProperties = null;
8356
- for (const name9 in this._properties) {
8357
- const property = this._properties[name9];
8358
- const binaryProperty = this._initializeBinaryProperty(name9, property);
8357
+ for (const name10 in this._properties) {
8358
+ const property = this._properties[name10];
8359
+ const binaryProperty = this._initializeBinaryProperty(name10, property);
8359
8360
  if (binaryProperty) {
8360
8361
  binaryProperties = binaryProperties || {};
8361
- binaryProperties[name9] = binaryProperty;
8362
+ binaryProperties[name10] = binaryProperty;
8362
8363
  }
8363
8364
  }
8364
8365
  return binaryProperties;
8365
8366
  }
8366
- _initializeBinaryProperty(name9, property) {
8367
+ _initializeBinaryProperty(name10, property) {
8367
8368
  if ("byteOffset" in property) {
8368
8369
  const tile3DAccessor = property;
8369
- assert2(this.binary, `Property ${name9} requires a batch table binary.`);
8370
- assert2(tile3DAccessor.type, `Property ${name9} requires a type.`);
8370
+ assert2(this.binary, `Property ${name10} requires a batch table binary.`);
8371
+ assert2(tile3DAccessor.type, `Property ${name10} requires a type.`);
8371
8372
  const accessor = createTypedArrayFromAccessor(tile3DAccessor, this.binary.buffer, this.binary.byteOffset | 0, this.featureCount);
8372
8373
  return {
8373
8374
  typedArray: accessor.values,
@@ -8378,14 +8379,14 @@
8378
8379
  }
8379
8380
  return null;
8380
8381
  }
8381
- _hasPropertyInHierarchy(batchId, name9) {
8382
+ _hasPropertyInHierarchy(batchId, name10) {
8382
8383
  if (!this._hierarchy) {
8383
8384
  return false;
8384
8385
  }
8385
8386
  const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
8386
8387
  const classId = hierarchy.classIds[instanceIndex];
8387
8388
  const instances = hierarchy.classes[classId].instances;
8388
- return defined2(instances[name9]);
8389
+ return defined2(instances[name10]);
8389
8390
  });
8390
8391
  return defined2(result);
8391
8392
  }
@@ -8393,21 +8394,21 @@
8393
8394
  traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
8394
8395
  const classId = hierarchy.classIds[instanceIndex];
8395
8396
  const instances = hierarchy.classes[classId].instances;
8396
- for (const name9 in instances) {
8397
- if (instances.hasOwnProperty(name9)) {
8398
- if (results.indexOf(name9) === -1) {
8399
- results.push(name9);
8397
+ for (const name10 in instances) {
8398
+ if (instances.hasOwnProperty(name10)) {
8399
+ if (results.indexOf(name10) === -1) {
8400
+ results.push(name10);
8400
8401
  }
8401
8402
  }
8402
8403
  }
8403
8404
  });
8404
8405
  }
8405
- _getHierarchyProperty(batchId, name9) {
8406
+ _getHierarchyProperty(batchId, name10) {
8406
8407
  return traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
8407
8408
  const classId = hierarchy.classIds[instanceIndex];
8408
8409
  const instanceClass = hierarchy.classes[classId];
8409
8410
  const indexInClass = hierarchy.classIndexes[instanceIndex];
8410
- const propertyValues = instanceClass.instances[name9];
8411
+ const propertyValues = instanceClass.instances[name10];
8411
8412
  if (defined2(propertyValues)) {
8412
8413
  if (defined2(propertyValues.typedArray)) {
8413
8414
  return this._getBinaryProperty(propertyValues, indexInClass);
@@ -8417,14 +8418,14 @@
8417
8418
  return null;
8418
8419
  });
8419
8420
  }
8420
- _setHierarchyProperty(batchTable, batchId, name9, value) {
8421
+ _setHierarchyProperty(batchTable, batchId, name10, value) {
8421
8422
  const result = traverseHierarchy(this._hierarchy, batchId, (hierarchy, instanceIndex) => {
8422
8423
  const classId = hierarchy.classIds[instanceIndex];
8423
8424
  const instanceClass = hierarchy.classes[classId];
8424
8425
  const indexInClass = hierarchy.classIndexes[instanceIndex];
8425
- const propertyValues = instanceClass.instances[name9];
8426
+ const propertyValues = instanceClass.instances[name10];
8426
8427
  if (defined2(propertyValues)) {
8427
- assert2(instanceIndex === batchId, `Inherited property "${name9}" is read-only.`);
8428
+ assert2(instanceIndex === batchId, `Inherited property "${name10}" is read-only.`);
8428
8429
  if (defined2(propertyValues.typedArray)) {
8429
8430
  this._setBinaryProperty(propertyValues, indexInClass, value);
8430
8431
  } else {
@@ -9305,11 +9306,12 @@
9305
9306
  var BasisWorkerLoader, BasisLoader;
9306
9307
  var init_basis_loader = __esm({
9307
9308
  "../textures/src/basis-loader.ts"() {
9309
+ init_src();
9308
9310
  init_version5();
9309
9311
  init_parse_basis();
9310
9312
  BasisWorkerLoader = {
9311
9313
  name: "Basis",
9312
- id: "basis",
9314
+ id: isBrowser2 ? "basis" : "basis-nodejs",
9313
9315
  module: "textures",
9314
9316
  version: VERSION8,
9315
9317
  worker: true,
@@ -9948,12 +9950,12 @@
9948
9950
  return extras[key];
9949
9951
  }
9950
9952
  getExtension(extensionName) {
9951
- const isExtension = this.getUsedExtensions().find((name9) => name9 === extensionName);
9953
+ const isExtension = this.getUsedExtensions().find((name10) => name10 === extensionName);
9952
9954
  const extensions = this.json.extensions || {};
9953
9955
  return isExtension ? extensions[extensionName] || true : null;
9954
9956
  }
9955
9957
  getRequiredExtension(extensionName) {
9956
- const isRequired = this.getRequiredExtensions().find((name9) => name9 === extensionName);
9958
+ const isRequired = this.getRequiredExtensions().find((name10) => name10 === extensionName);
9957
9959
  return isRequired ? this.getExtension(extensionName) : null;
9958
9960
  }
9959
9961
  getRequiredExtensions() {
@@ -10607,11 +10609,11 @@
10607
10609
  // ../gltf/src/lib/gltf-utils/gltf-attribute-utils.ts
10608
10610
  function getGLTFAccessors(attributes) {
10609
10611
  const accessors = {};
10610
- for (const name9 in attributes) {
10611
- const attribute = attributes[name9];
10612
- if (name9 !== "indices") {
10612
+ for (const name10 in attributes) {
10613
+ const attribute = attributes[name10];
10614
+ if (name10 !== "indices") {
10613
10615
  const glTFAccessor = getGLTFAccessor(attribute);
10614
- accessors[name9] = glTFAccessor;
10616
+ accessors[name10] = glTFAccessor;
10615
10617
  }
10616
10618
  }
10617
10619
  return accessors;
@@ -11120,6 +11122,91 @@
11120
11122
  }
11121
11123
  });
11122
11124
 
11125
+ // ../gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts
11126
+ var EXT_feature_metadata_exports = {};
11127
+ __export(EXT_feature_metadata_exports, {
11128
+ decode: () => decode8,
11129
+ name: () => name9
11130
+ });
11131
+ async function decode8(gltfData) {
11132
+ const scenegraph = new GLTFScenegraph(gltfData);
11133
+ decodeExtFeatureMetadata(scenegraph);
11134
+ }
11135
+ function decodeExtFeatureMetadata(scenegraph) {
11136
+ const extension = scenegraph.getExtension(EXT_FEATURE_METADATA);
11137
+ const schemaClasses = extension?.schema?.classes;
11138
+ const featureTables = extension?.featureTables;
11139
+ const featureTextures = extension?.featureTextures;
11140
+ if (featureTextures) {
11141
+ console.warn('featureTextures is not yet supported in the "EXT_feature_metadata" extension.');
11142
+ }
11143
+ if (schemaClasses && featureTables) {
11144
+ for (const schemaName in schemaClasses) {
11145
+ const schemaClass = schemaClasses[schemaName];
11146
+ const featureTable = findFeatureTableByName(featureTables, schemaName);
11147
+ if (featureTable) {
11148
+ handleFeatureTableProperties(scenegraph, featureTable, schemaClass);
11149
+ }
11150
+ }
11151
+ }
11152
+ }
11153
+ function handleFeatureTableProperties(scenegraph, featureTable, schemaClass) {
11154
+ for (const propertyName in schemaClass.properties) {
11155
+ const schemaProperty = schemaClass.properties[propertyName];
11156
+ const featureTableProperty = featureTable?.properties?.[propertyName];
11157
+ const numberOfFeatures = featureTable.count;
11158
+ if (featureTableProperty) {
11159
+ const data = getPropertyDataFromBinarySource(scenegraph, schemaProperty, numberOfFeatures, featureTableProperty);
11160
+ featureTableProperty.data = data;
11161
+ }
11162
+ }
11163
+ }
11164
+ function getPropertyDataFromBinarySource(scenegraph, schemaProperty, numberOfFeatures, featureTableProperty) {
11165
+ const bufferView = featureTableProperty.bufferView;
11166
+ let data = scenegraph.getTypedArrayForBufferView(bufferView);
11167
+ switch (schemaProperty.type) {
11168
+ case "STRING": {
11169
+ const stringOffsetBufferView = featureTableProperty.stringOffsetBufferView;
11170
+ const offsetsData = scenegraph.getTypedArrayForBufferView(stringOffsetBufferView);
11171
+ data = getStringAttributes(data, offsetsData, numberOfFeatures);
11172
+ break;
11173
+ }
11174
+ default:
11175
+ }
11176
+ return data;
11177
+ }
11178
+ function findFeatureTableByName(featureTables, schemaClassName) {
11179
+ for (const featureTableName in featureTables) {
11180
+ const featureTable = featureTables[featureTableName];
11181
+ if (featureTable.class === schemaClassName) {
11182
+ return featureTable;
11183
+ }
11184
+ }
11185
+ return null;
11186
+ }
11187
+ function getStringAttributes(data, offsetsData, stringsCount) {
11188
+ const stringsArray = [];
11189
+ const textDecoder = new TextDecoder("utf8");
11190
+ let stringOffset = 0;
11191
+ const bytesPerStringSize = 4;
11192
+ for (let index = 0; index < stringsCount; index++) {
11193
+ const stringByteSize = offsetsData[(index + 1) * bytesPerStringSize] - offsetsData[index * bytesPerStringSize];
11194
+ const stringData = data.subarray(stringOffset, stringByteSize + stringOffset);
11195
+ const stringAttribute = textDecoder.decode(stringData);
11196
+ stringsArray.push(stringAttribute);
11197
+ stringOffset += stringByteSize;
11198
+ }
11199
+ return stringsArray;
11200
+ }
11201
+ var EXT_FEATURE_METADATA, name9;
11202
+ var init_EXT_feature_metadata = __esm({
11203
+ "../gltf/src/lib/extensions/deprecated/EXT_feature_metadata.ts"() {
11204
+ init_gltf_scenegraph();
11205
+ EXT_FEATURE_METADATA = "EXT_feature_metadata";
11206
+ name9 = EXT_FEATURE_METADATA;
11207
+ }
11208
+ });
11209
+
11123
11210
  // ../gltf/src/lib/api/gltf-extensions.ts
11124
11211
  function preprocessExtensions(gltf, options = {}, context) {
11125
11212
  const extensions = EXTENSIONS2.filter((extension) => useExtension(extension.name, options));
@@ -11149,6 +11236,7 @@
11149
11236
  init_KHR_lights_punctual();
11150
11237
  init_KHR_materials_unlit();
11151
11238
  init_KHR_techniques_webgl();
11239
+ init_EXT_feature_metadata();
11152
11240
  EXTENSIONS2 = [
11153
11241
  EXT_meshopt_compression_exports,
11154
11242
  EXT_texture_webp_exports,
@@ -11157,7 +11245,8 @@
11157
11245
  KHR_lights_punctual_exports,
11158
11246
  KHR_materials_unlit_exports,
11159
11247
  KHR_techniques_webgl_exports,
11160
- KHR_texture_transform_exports
11248
+ KHR_texture_transform_exports,
11249
+ EXT_feature_metadata_exports
11161
11250
  ];
11162
11251
  }
11163
11252
  });
@@ -12349,8 +12438,8 @@
12349
12438
  }
12350
12439
  return subtree;
12351
12440
  }
12352
- async function getExplicitBitstream(subtree, name9, internalBinaryBuffer) {
12353
- const bufferViewIndex = subtree[name9].bufferView;
12441
+ async function getExplicitBitstream(subtree, name10, internalBinaryBuffer) {
12442
+ const bufferViewIndex = subtree[name10].bufferView;
12354
12443
  const bufferView = subtree.bufferViews[bufferViewIndex];
12355
12444
  const buffer = subtree.buffers[bufferView.buffer];
12356
12445
  if (buffer.uri) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAGA;;AAGA;;AACA;;AAGA;;AACA","sourcesContent":["// LOADERS\nexport {Tiles3DLoader} from './tiles-3d-loader';\nexport {CesiumIonLoader} from './cesium-ion-loader';\nexport {Tile3DSubtreeLoader} from './tile-3d-subtree-loader';\n\n// WRITERS\nexport {Tile3DWriter} from './tile-3d-writer';\n\n// CLASSES\nexport {default as Tile3DFeatureTable} from './lib/classes/tile-3d-feature-table';\nexport {default as Tile3DBatchTable} from './lib/classes/tile-3d-batch-table';\n\n// EXPERIMENTAL\nexport {TILE3D_TYPE} from './lib/constants';\nexport {getIonTilesetMetadata as _getIonTilesetMetadata} from './lib/ion/ion';\nexport type {BatchTableJson, B3DMContent, Node3D} from './types';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA;;AACA;;AACA;;AAGA;;AAGA;;AACA;;AAGA;;AACA","sourcesContent":["// LOADERS\nexport {Tiles3DLoader} from './tiles-3d-loader';\nexport {CesiumIonLoader} from './cesium-ion-loader';\nexport {Tile3DSubtreeLoader} from './tile-3d-subtree-loader';\n\n// WRITERS\nexport {Tile3DWriter} from './tile-3d-writer';\n\n// CLASSES\nexport {default as Tile3DFeatureTable} from './lib/classes/tile-3d-feature-table';\nexport {default as Tile3DBatchTable} from './lib/classes/tile-3d-batch-table';\n\n// EXPERIMENTAL\nexport {TILE3D_TYPE} from './lib/constants';\nexport {getIonTilesetMetadata as _getIonTilesetMetadata} from './lib/ion/ion';\nexport type {FeatureTableJson, B3DMContent, Node3D} from './types';\n"],"file":"index.js"}
@@ -4,6 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.VERSION = void 0;
7
- var VERSION = typeof "3.3.0-alpha.1" !== 'undefined' ? "3.3.0-alpha.1" : 'latest';
7
+ var VERSION = typeof "3.3.0-alpha.2" !== 'undefined' ? "3.3.0-alpha.2" : 'latest';
8
8
  exports.VERSION = VERSION;
9
9
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts"],"names":["Tiles3DLoader","CesiumIonLoader","Tile3DSubtreeLoader","Tile3DWriter","default","Tile3DFeatureTable","Tile3DBatchTable","TILE3D_TYPE","getIonTilesetMetadata","_getIonTilesetMetadata"],"mappings":"AACA,SAAQA,aAAR,QAA4B,mBAA5B;AACA,SAAQC,eAAR,QAA8B,qBAA9B;AACA,SAAQC,mBAAR,QAAkC,0BAAlC;AAGA,SAAQC,YAAR,QAA2B,kBAA3B;AAGA,SAAQC,OAAO,IAAIC,kBAAnB,QAA4C,qCAA5C;AACA,SAAQD,OAAO,IAAIE,gBAAnB,QAA0C,mCAA1C;AAGA,SAAQC,WAAR,QAA0B,iBAA1B;AACA,SAAQC,qBAAqB,IAAIC,sBAAjC,QAA8D,eAA9D","sourcesContent":["// LOADERS\nexport {Tiles3DLoader} from './tiles-3d-loader';\nexport {CesiumIonLoader} from './cesium-ion-loader';\nexport {Tile3DSubtreeLoader} from './tile-3d-subtree-loader';\n\n// WRITERS\nexport {Tile3DWriter} from './tile-3d-writer';\n\n// CLASSES\nexport {default as Tile3DFeatureTable} from './lib/classes/tile-3d-feature-table';\nexport {default as Tile3DBatchTable} from './lib/classes/tile-3d-batch-table';\n\n// EXPERIMENTAL\nexport {TILE3D_TYPE} from './lib/constants';\nexport {getIonTilesetMetadata as _getIonTilesetMetadata} from './lib/ion/ion';\nexport type {BatchTableJson, B3DMContent, Node3D} from './types';\n"],"file":"index.js"}
1
+ {"version":3,"sources":["../../src/index.ts"],"names":["Tiles3DLoader","CesiumIonLoader","Tile3DSubtreeLoader","Tile3DWriter","default","Tile3DFeatureTable","Tile3DBatchTable","TILE3D_TYPE","getIonTilesetMetadata","_getIonTilesetMetadata"],"mappings":"AACA,SAAQA,aAAR,QAA4B,mBAA5B;AACA,SAAQC,eAAR,QAA8B,qBAA9B;AACA,SAAQC,mBAAR,QAAkC,0BAAlC;AAGA,SAAQC,YAAR,QAA2B,kBAA3B;AAGA,SAAQC,OAAO,IAAIC,kBAAnB,QAA4C,qCAA5C;AACA,SAAQD,OAAO,IAAIE,gBAAnB,QAA0C,mCAA1C;AAGA,SAAQC,WAAR,QAA0B,iBAA1B;AACA,SAAQC,qBAAqB,IAAIC,sBAAjC,QAA8D,eAA9D","sourcesContent":["// LOADERS\nexport {Tiles3DLoader} from './tiles-3d-loader';\nexport {CesiumIonLoader} from './cesium-ion-loader';\nexport {Tile3DSubtreeLoader} from './tile-3d-subtree-loader';\n\n// WRITERS\nexport {Tile3DWriter} from './tile-3d-writer';\n\n// CLASSES\nexport {default as Tile3DFeatureTable} from './lib/classes/tile-3d-feature-table';\nexport {default as Tile3DBatchTable} from './lib/classes/tile-3d-batch-table';\n\n// EXPERIMENTAL\nexport {TILE3D_TYPE} from './lib/constants';\nexport {getIonTilesetMetadata as _getIonTilesetMetadata} from './lib/ion/ion';\nexport type {FeatureTableJson, B3DMContent, Node3D} from './types';\n"],"file":"index.js"}
@@ -1,2 +1,2 @@
1
- export const VERSION = typeof "3.3.0-alpha.1" !== 'undefined' ? "3.3.0-alpha.1" : 'latest';
1
+ export const VERSION = typeof "3.3.0-alpha.2" !== 'undefined' ? "3.3.0-alpha.2" : 'latest';
2
2
  //# sourceMappingURL=version.js.map
package/dist/index.d.ts CHANGED
@@ -6,5 +6,5 @@ export { default as Tile3DFeatureTable } from './lib/classes/tile-3d-feature-tab
6
6
  export { default as Tile3DBatchTable } from './lib/classes/tile-3d-batch-table';
7
7
  export { TILE3D_TYPE } from './lib/constants';
8
8
  export { getIonTilesetMetadata as _getIonTilesetMetadata } from './lib/ion/ion';
9
- export type { BatchTableJson, B3DMContent, Node3D } from './types';
9
+ export type { FeatureTableJson, B3DMContent, Node3D } from './types';
10
10
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAG9E,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,qBAAqB,IAAI,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAC,cAAc,EAAE,WAAW,EAAE,MAAM,EAAC,MAAM,SAAS,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,aAAa,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAC,mBAAmB,EAAC,MAAM,0BAA0B,CAAC;AAG7D,OAAO,EAAC,YAAY,EAAC,MAAM,kBAAkB,CAAC;AAG9C,OAAO,EAAC,OAAO,IAAI,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AAClF,OAAO,EAAC,OAAO,IAAI,gBAAgB,EAAC,MAAM,mCAAmC,CAAC;AAG9E,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAC,qBAAqB,IAAI,sBAAsB,EAAC,MAAM,eAAe,CAAC;AAC9E,YAAY,EAAC,gBAAgB,EAAE,WAAW,EAAE,MAAM,EAAC,MAAM,SAAS,CAAC"}
package/dist/types.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import type { GLTFPostprocessed } from '@loaders.gl/gltf';
2
2
  import { Matrix4, Vector3 } from '@math.gl/core';
3
- export declare type BatchTableJson = {
3
+ export declare type FeatureTableJson = {
4
4
  [key: string]: any[];
5
5
  };
6
6
  export declare type B3DMContent = {
7
- batchTableJson?: BatchTableJson;
7
+ batchTableJson?: FeatureTableJson;
8
8
  byteLength: number;
9
9
  byteOffset: number;
10
10
  cartesianModelMatrix: Matrix4;
@@ -13,7 +13,7 @@ export declare type B3DMContent = {
13
13
  cartographicOrigin: Vector3;
14
14
  featureIds?: number[] | null;
15
15
  featureTableBinary?: Uint8Array;
16
- featureTableJson?: BatchTableJson;
16
+ featureTableJson?: FeatureTableJson;
17
17
  gltf?: GLTFPostprocessed;
18
18
  gltfUpAxis: string;
19
19
  header: GLTFHeader;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,iBAAiB,EAAC,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAC,OAAO,EAAE,OAAO,EAAC,MAAM,eAAe,CAAC;AAE/C,oBAAY,cAAc,GAAG;IAC3B,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,EAAE,CAAC;CACtB,CAAC;AAEF,oBAAY,WAAW,GAAG;IACxB,cAAc,CAAC,EAAE,cAAc,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,eAAe,EAAE,OAAO,CAAC;IACzB,uBAAuB,EAAE,OAAO,CAAC;IACjC,kBAAkB,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,UAAU,CAAC;IAChC,gBAAgB,CAAC,EAAE,cAAc,CAAC;IAClC,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,UAAU,CAAC;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,OAAO,CAA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AAM,CAAC;CACpB,CAAC;AAEF,aAAK,UAAU,GAAG;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@loaders.gl/3d-tiles",
3
- "version": "3.3.0-alpha.1",
3
+ "version": "3.3.0-alpha.2",
4
4
  "description": "3D Tiles, an open standard for streaming massive heterogeneous 3D geospatial datasets.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -34,16 +34,16 @@
34
34
  "build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
35
35
  },
36
36
  "dependencies": {
37
- "@loaders.gl/draco": "3.3.0-alpha.1",
38
- "@loaders.gl/gltf": "3.3.0-alpha.1",
39
- "@loaders.gl/loader-utils": "3.3.0-alpha.1",
40
- "@loaders.gl/math": "3.3.0-alpha.1",
41
- "@loaders.gl/tiles": "3.3.0-alpha.1",
37
+ "@loaders.gl/draco": "3.3.0-alpha.2",
38
+ "@loaders.gl/gltf": "3.3.0-alpha.2",
39
+ "@loaders.gl/loader-utils": "3.3.0-alpha.2",
40
+ "@loaders.gl/math": "3.3.0-alpha.2",
41
+ "@loaders.gl/tiles": "3.3.0-alpha.2",
42
42
  "@math.gl/core": "^3.5.1",
43
43
  "@math.gl/geospatial": "^3.5.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "@loaders.gl/core": "^3.2.0"
47
47
  },
48
- "gitHead": "85ed2df7d17dd0d204c8bd8feb44779f70bc693b"
48
+ "gitHead": "628f1f0eed0f14b50ccff4c561023acf6e0657e6"
49
49
  }
package/src/index.ts CHANGED
@@ -13,4 +13,4 @@ export {default as Tile3DBatchTable} from './lib/classes/tile-3d-batch-table';
13
13
  // EXPERIMENTAL
14
14
  export {TILE3D_TYPE} from './lib/constants';
15
15
  export {getIonTilesetMetadata as _getIonTilesetMetadata} from './lib/ion/ion';
16
- export type {BatchTableJson, B3DMContent, Node3D} from './types';
16
+ export type {FeatureTableJson, B3DMContent, Node3D} from './types';
package/src/types.ts CHANGED
@@ -1,12 +1,12 @@
1
1
  import type {GLTFPostprocessed} from '@loaders.gl/gltf';
2
2
  import {Matrix4, Vector3} from '@math.gl/core';
3
3
 
4
- export type BatchTableJson = {
4
+ export type FeatureTableJson = {
5
5
  [key: string]: any[];
6
6
  };
7
7
 
8
8
  export type B3DMContent = {
9
- batchTableJson?: BatchTableJson;
9
+ batchTableJson?: FeatureTableJson;
10
10
  byteLength: number;
11
11
  byteOffset: number;
12
12
  cartesianModelMatrix: Matrix4;
@@ -15,7 +15,7 @@ export type B3DMContent = {
15
15
  cartographicOrigin: Vector3;
16
16
  featureIds?: number[] | null;
17
17
  featureTableBinary?: Uint8Array;
18
- featureTableJson?: BatchTableJson;
18
+ featureTableJson?: FeatureTableJson;
19
19
  gltf?: GLTFPostprocessed;
20
20
  gltfUpAxis: string;
21
21
  header: GLTFHeader;