@xeokit/xeokit-sdk 2.4.0-alpha-64 → 2.4.0-alpha-66

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.
@@ -90810,6 +90810,12 @@ class MetaObject {
90810
90810
  */
90811
90811
  this.propertySets = [];
90812
90812
 
90813
+ /**
90814
+ * The attributes of this MetaObject.
90815
+ * @type {{}}
90816
+ */
90817
+ this.attributes = params.attributes || {};
90818
+
90813
90819
  // if (external !== undefined && external !== null) {
90814
90820
  //
90815
90821
  // /**
@@ -91113,18 +91119,19 @@ class MetaModel {
91113
91119
  if (metaModelData.metaObjects) {
91114
91120
  for (let i = 0, len = metaModelData.metaObjects.length; i < len; i++) {
91115
91121
  const metaObjectData = metaModelData.metaObjects[i];
91116
- const type = metaObjectData.type;
91117
- const id = metaObjectData.id;
91118
- const originalSystemId = metaObjectData.originalSystemId;
91119
- const propertySetIds = metaObjectData.propertySets || metaObjectData.propertySetIds;
91120
91122
  let metaObject = metaScene.metaObjects[id];
91121
91123
  if (!metaObject) {
91124
+ const type = metaObjectData.type;
91125
+ const id = metaObjectData.id;
91126
+ const originalSystemId = metaObjectData.originalSystemId;
91127
+ const propertySetIds = metaObjectData.propertySets || metaObjectData.propertySetIds;
91122
91128
  metaObject = new MetaObject({
91123
91129
  id,
91124
91130
  originalSystemId,
91125
91131
  parentId: metaObjectData.parent,
91126
91132
  type,
91127
91133
  name: metaObjectData.name,
91134
+ attributes: metaObjectData.attributes,
91128
91135
  propertySetIds
91129
91136
  });
91130
91137
  this.metaScene.metaObjects[id] = metaObject;
@@ -118099,6 +118106,8 @@ function inflate$9(deflatedData) {
118099
118106
 
118100
118107
  function load$9(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
118101
118108
 
118109
+ manifestCtx.getNextId();
118110
+
118102
118111
  sceneModel.positionsCompression = "precompressed";
118103
118112
  sceneModel.normalsCompression = "precompressed";
118104
118113
 
@@ -118196,7 +118205,7 @@ const ParserV1 = {
118196
118205
  parse: function (viewer, options, elements, sceneModel, metaModel, manifestCtx) {
118197
118206
  const deflatedData = extract$9(elements);
118198
118207
  const inflatedData = inflate$9(deflatedData);
118199
- load$9(viewer, options, inflatedData, sceneModel);
118208
+ load$9(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx);
118200
118209
  }
118201
118210
  };
118202
118211
 
@@ -118276,6 +118285,8 @@ const decompressColor$8 = (function () {
118276
118285
 
118277
118286
  function load$8(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
118278
118287
 
118288
+ const modelPartId = manifestCtx.getNextId();
118289
+
118279
118290
  sceneModel.positionsCompression = "precompressed";
118280
118291
  sceneModel.normalsCompression = "precompressed";
118281
118292
 
@@ -118345,7 +118356,7 @@ function load$8(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118345
118356
  const jj = entityMeshIds [j];
118346
118357
 
118347
118358
  const lastMesh = (jj === (numMeshes - 1));
118348
- const meshId = manifestCtx.nextMeshId++;
118359
+ const meshId = manifestCtx.getNextId();
118349
118360
 
118350
118361
  const color = decompressColor$8(meshColors.subarray((jj * 4), (jj * 4) + 3));
118351
118362
  const opacity = meshColors[(jj * 4) + 3] / 255.0;
@@ -118357,7 +118368,7 @@ function load$8(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118357
118368
 
118358
118369
  if (entityUsesInstancing [i] === 1) {
118359
118370
 
118360
- const geometryId = "geometry." + jj;
118371
+ const geometryId = `${modelPartId}.geometry.${meshId}.${jj}`;
118361
118372
 
118362
118373
  if (!(geometryId in alreadyCreatedGeometries)) {
118363
118374
 
@@ -118379,7 +118390,7 @@ function load$8(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118379
118390
  color: color,
118380
118391
  opacity: opacity,
118381
118392
  matrix: entityMatrix,
118382
- geometryId: geometryId,
118393
+ geometryId,
118383
118394
  }));
118384
118395
 
118385
118396
  meshIds.push(meshId);
@@ -118490,6 +118501,8 @@ const decompressColor$7 = (function () {
118490
118501
 
118491
118502
  function load$7(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
118492
118503
 
118504
+ const modelPartId = manifestCtx.getNextId();
118505
+
118493
118506
  sceneModel.positionsCompression = "precompressed";
118494
118507
  sceneModel.normalsCompression = "precompressed";
118495
118508
 
@@ -118562,7 +118575,7 @@ function load$7(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118562
118575
  var jj = entityMeshIds [j];
118563
118576
 
118564
118577
  const lastMesh = (jj === (numMeshes - 1));
118565
- const meshId = entityId + ".mesh." + jj;
118578
+ const meshId = `${modelPartId}.${entityId}.mesh.${jj}`;
118566
118579
 
118567
118580
  const color = decompressColor$7(meshColors.subarray((jj * 4), (jj * 4) + 3));
118568
118581
  const opacity = meshColors[(jj * 4) + 3] / 255.0;
@@ -118573,7 +118586,8 @@ function load$7(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118573
118586
  var tmpEdgeIndices = edgeIndices.subarray(meshEdgesIndices [jj], lastMesh ? edgeIndices.length : meshEdgesIndices [jj + 1]);
118574
118587
 
118575
118588
  if (entityUsesInstancing [i] === 1) {
118576
- var geometryId = "geometry." + jj;
118589
+
118590
+ const geometryId = `${modelPartId}.geometry.${meshId}.${jj}`;
118577
118591
 
118578
118592
  if (!(geometryId in _alreadyCreatedGeometries)) {
118579
118593
 
@@ -118595,7 +118609,7 @@ function load$7(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118595
118609
  color: color,
118596
118610
  opacity: opacity,
118597
118611
  matrix: entityMatrix,
118598
- geometryId: geometryId,
118612
+ geometryId,
118599
118613
  }));
118600
118614
 
118601
118615
  meshIds.push(meshId);
@@ -118634,7 +118648,7 @@ const ParserV3 = {
118634
118648
  parse: function (viewer, options, elements, sceneModel, metaModel, manifestCtx) {
118635
118649
  const deflatedData = extract$7(elements);
118636
118650
  const inflatedData = inflate$7(deflatedData);
118637
- load$7(viewer, options, inflatedData, sceneModel);
118651
+ load$7(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx);
118638
118652
  }
118639
118653
  };
118640
118654
 
@@ -118704,6 +118718,8 @@ const decompressColor$6 = (function () {
118704
118718
 
118705
118719
  function load$6(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
118706
118720
 
118721
+ const modelPartId = manifestCtx.getNextId();
118722
+
118707
118723
  sceneModel.positionsCompression = "precompressed";
118708
118724
  sceneModel.normalsCompression = "precompressed";
118709
118725
 
@@ -118809,7 +118825,7 @@ function load$6(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118809
118825
 
118810
118826
  // Primitive instanced by more than one entity, and has positions in Model-space
118811
118827
 
118812
- var geometryId = "geometry" + orderedPrimitiveIndex; // These IDs are local to the SceneModel
118828
+ const geometryId = `${modelPartId}-geometry.${orderedPrimitiveIndex}`; // These IDs are local to the SceneModel
118813
118829
 
118814
118830
  sceneModel.createGeometry({
118815
118831
  id: geometryId,
@@ -118825,7 +118841,7 @@ function load$6(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118825
118841
 
118826
118842
  // Primitive is used only by one entity, and has positions pre-transformed into World-space
118827
118843
 
118828
- const meshId = orderedPrimitiveIndex; // These IDs are local to the SceneModel
118844
+ const meshId = `${modelPartId}-${orderedPrimitiveIndex}`;
118829
118845
 
118830
118846
  const entityIndex = batchedPrimitiveEntityIndexes[orderedPrimitiveIndex];
118831
118847
  eachEntityId[entityIndex];
@@ -118868,8 +118884,9 @@ function load$6(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
118868
118884
 
118869
118885
  const meshDefaults = {}; // TODO: get from lookup from entity IDs
118870
118886
 
118871
- const meshId = "instance." + countInstances++;
118872
- const geometryId = "geometry" + primitiveIndex;
118887
+ const meshId = `${modelPartId}-instance.${countInstances++}`;
118888
+ const geometryId = `${modelPartId}-geometry.${primitiveIndex}`; // These IDs are local to the SceneModel
118889
+
118873
118890
  const matricesIndex = (eachEntityMatricesPortion [entityIndex]) * 16;
118874
118891
  const matrix = matrices.subarray(matricesIndex, matricesIndex + 16);
118875
118892
 
@@ -118905,7 +118922,7 @@ const ParserV4 = {
118905
118922
  parse: function (viewer, options, elements, sceneModel, metaModel, manifestCtx) {
118906
118923
  const deflatedData = extract$6(elements);
118907
118924
  const inflatedData = inflate$6(deflatedData);
118908
- load$6(viewer, options, inflatedData, sceneModel);
118925
+ load$6(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx);
118909
118926
  }
118910
118927
  };
118911
118928
 
@@ -118970,6 +118987,8 @@ const decompressColor$5 = (function () {
118970
118987
 
118971
118988
  function load$5(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
118972
118989
 
118990
+ const modelPartId = manifestCtx.getNextId();
118991
+
118973
118992
  sceneModel.positionsCompression = "disabled"; // Positions in XKT V4 are floats, which we never quantize, for precision with big models
118974
118993
  sceneModel.normalsCompression = "precompressed"; // Normals are oct-encoded though
118975
118994
 
@@ -119047,7 +119066,7 @@ function load$5(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
119047
119066
 
119048
119067
  // Primitive instanced by more than one entity, and has positions in Model-space
119049
119068
 
119050
- var geometryId = "geometry" + primitiveIndex; // These IDs are local to the SceneModel
119069
+ const geometryId = `${modelPartId}-geometry.${primitiveIndex}`; // These IDs are local to the SceneModel
119051
119070
 
119052
119071
  sceneModel.createGeometry({
119053
119072
  id: geometryId,
@@ -119141,7 +119160,7 @@ const ParserV5 = {
119141
119160
  parse: function (viewer, options, elements, sceneModel, metaModel, manifestCtx) {
119142
119161
  const deflatedData = extract$5(elements);
119143
119162
  const inflatedData = inflate$5(deflatedData);
119144
- load$5(viewer, options, inflatedData, sceneModel);
119163
+ load$5(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx);
119145
119164
  }
119146
119165
  };
119147
119166
 
@@ -119216,6 +119235,8 @@ const decompressColor$4 = (function () {
119216
119235
 
119217
119236
  function load$4(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
119218
119237
 
119238
+ const modelPartId = manifestCtx.getNextId();
119239
+
119219
119240
  const positions = inflatedData.positions;
119220
119241
  const normals = inflatedData.normals;
119221
119242
  const indices = inflatedData.indices;
@@ -119363,13 +119384,13 @@ function load$4(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
119363
119384
  const color = decompressColor$4(eachPrimitiveColorAndOpacity.subarray((primitiveIndex * 4), (primitiveIndex * 4) + 3));
119364
119385
  const opacity = eachPrimitiveColorAndOpacity[(primitiveIndex * 4) + 3] / 255.0;
119365
119386
 
119366
- const meshId = manifestCtx.nextMeshId++;
119387
+ const meshId = manifestCtx.getNextId();
119367
119388
 
119368
119389
  if (isReusedPrimitive) {
119369
119390
 
119370
119391
  // Create mesh for multi-use primitive - create (or reuse) geometry, create mesh using that geometry
119371
119392
 
119372
- const geometryId = "geometry." + tileIndex + "." + primitiveIndex; // These IDs are local to the SceneModel
119393
+ const geometryId = `${modelPartId}-geometry.${tileIndex}.${primitiveIndex}`; // These IDs are local to the SceneModel
119373
119394
 
119374
119395
  if (!geometryCreated[geometryId]) {
119375
119396
 
@@ -119555,6 +119576,8 @@ function convertColorsRGBToRGBA$1(colorsRGB) {
119555
119576
 
119556
119577
  function load$3(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
119557
119578
 
119579
+ const modelPartId = manifestCtx.getNextId();
119580
+
119558
119581
  const positions = inflatedData.positions;
119559
119582
  const normals = inflatedData.normals;
119560
119583
  const colors = inflatedData.colors;
@@ -119707,7 +119730,7 @@ function load$3(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
119707
119730
  const meshMetallic = eachMeshMaterial[(meshIndex * 6) + 4] / 255.0;
119708
119731
  const meshRoughness = eachMeshMaterial[(meshIndex * 6) + 5] / 255.0;
119709
119732
 
119710
- const meshId = manifestCtx.nextMeshId++;
119733
+ const meshId = manifestCtx.getNextId();
119711
119734
 
119712
119735
  if (isReusedGeometry) {
119713
119736
 
@@ -119716,7 +119739,7 @@ function load$3(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
119716
119739
  const meshMatrixIndex = eachMeshMatricesPortion[meshIndex];
119717
119740
  const meshMatrix = matrices.slice(meshMatrixIndex, meshMatrixIndex + 16);
119718
119741
 
119719
- const geometryId = "geometry." + tileIndex + "." + geometryIndex; // These IDs are local to the SceneModel
119742
+ const geometryId = `${modelPartId}-geometry.${tileIndex}.${geometryIndex}`; // These IDs are local to the SceneModel
119720
119743
 
119721
119744
  if (!geometryCreated[geometryId]) {
119722
119745
 
@@ -119994,6 +120017,8 @@ function convertColorsRGBToRGBA(colorsRGB) {
119994
120017
 
119995
120018
  function load$2(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
119996
120019
 
120020
+ const modelPartId = manifestCtx.getNextId();
120021
+
119997
120022
  const types = JSON.parse(inflatedData.types);
119998
120023
  const eachMetaObjectId = JSON.parse(inflatedData.eachMetaObjectId);
119999
120024
  const eachMetaObjectType = inflatedData.eachMetaObjectType;
@@ -120181,7 +120206,7 @@ function load$2(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
120181
120206
  const meshMetallic = eachMeshMaterial[(meshIndex * 6) + 4] / 255.0;
120182
120207
  const meshRoughness = eachMeshMaterial[(meshIndex * 6) + 5] / 255.0;
120183
120208
 
120184
- const meshId = manifestCtx.nextMeshId++;
120209
+ const meshId = manifestCtx.getNextId();
120185
120210
 
120186
120211
  if (isReusedGeometry) {
120187
120212
 
@@ -120190,7 +120215,7 @@ function load$2(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
120190
120215
  const meshMatrixIndex = eachMeshMatricesPortion[meshIndex];
120191
120216
  const meshMatrix = matrices.slice(meshMatrixIndex, meshMatrixIndex + 16);
120192
120217
 
120193
- const geometryId = "geometry." + tileIndex + "." + geometryIndex; // These IDs are local to the SceneModel
120218
+ const geometryId = `${modelPartId}-geometry.${tileIndex}.${geometryIndex}`; // These IDs are local to the SceneModel
120194
120219
 
120195
120220
  let geometryArrays = geometryArraysCache[geometryId];
120196
120221
 
@@ -120525,6 +120550,8 @@ const decompressColor$1 = (function () {
120525
120550
 
120526
120551
  function load$1(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
120527
120552
 
120553
+ const modelPartId = manifestCtx.getNextId();
120554
+
120528
120555
  const metadata = inflatedData.metadata;
120529
120556
 
120530
120557
  const positions = inflatedData.positions;
@@ -120684,7 +120711,7 @@ function load$1(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
120684
120711
  const meshMetallic = eachMeshMaterial[(meshIndex * 6) + 4] / 255.0;
120685
120712
  const meshRoughness = eachMeshMaterial[(meshIndex * 6) + 5] / 255.0;
120686
120713
 
120687
- const meshId = manifestCtx.nextMeshId++;
120714
+ const meshId = manifestCtx.getNextId();
120688
120715
 
120689
120716
  if (isReusedGeometry) {
120690
120717
 
@@ -120693,7 +120720,7 @@ function load$1(viewer, options, inflatedData, sceneModel, metaModel, manifestCt
120693
120720
  const meshMatrixIndex = eachMeshMatricesPortion[meshIndex];
120694
120721
  const meshMatrix = matrices.slice(meshMatrixIndex, meshMatrixIndex + 16);
120695
120722
 
120696
- const geometryId = "geometry." + tileIndex + "." + geometryIndex; // These IDs are local to the SceneModel
120723
+ const geometryId = `${modelPartId}-geometry.${tileIndex}.${geometryIndex}`; // These IDs are local to the SceneModel
120697
120724
 
120698
120725
  let geometryArrays = geometryArraysCache[geometryId];
120699
120726
 
@@ -121029,6 +121056,8 @@ const decompressColor = (function () {
121029
121056
 
121030
121057
  function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx) {
121031
121058
 
121059
+ const modelPartId = manifestCtx.getNextId();
121060
+
121032
121061
  const metadata = inflatedData.metadata;
121033
121062
  const textureData = inflatedData.textureData;
121034
121063
  const eachTextureDataPortion = inflatedData.eachTextureDataPortion;
@@ -121095,7 +121124,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121095
121124
 
121096
121125
  const imageDataSubarray = new Uint8Array(textureData.subarray(textureDataPortionStart, textureDataPortionEnd));
121097
121126
  const arrayBuffer = imageDataSubarray.buffer;
121098
- const textureId = `texture-${textureIndex}`;
121127
+ const textureId = `${modelPartId}-texture-${textureIndex}`;
121099
121128
 
121100
121129
  if (compressed) {
121101
121130
 
@@ -121136,7 +121165,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121136
121165
 
121137
121166
  for (let textureSetIndex = 0; textureSetIndex < numTextureSets; textureSetIndex++) {
121138
121167
  const eachTextureSetTexturesIndex = textureSetIndex * 5;
121139
- const textureSetId = `textureSet-${textureSetIndex}`;
121168
+ const textureSetId = `${modelPartId}-textureSet-${textureSetIndex}`;
121140
121169
  const colorTextureIndex = eachTextureSetTextures[eachTextureSetTexturesIndex + 0];
121141
121170
  const metallicRoughnessTextureIndex = eachTextureSetTextures[eachTextureSetTexturesIndex + 1];
121142
121171
  const normalsTextureIndex = eachTextureSetTextures[eachTextureSetTexturesIndex + 2];
@@ -121144,11 +121173,11 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121144
121173
  const occlusionTextureIndex = eachTextureSetTextures[eachTextureSetTexturesIndex + 4];
121145
121174
  sceneModel.createTextureSet({
121146
121175
  id: textureSetId,
121147
- colorTextureId: colorTextureIndex >= 0 ? `texture-${colorTextureIndex}` : null,
121148
- normalsTextureId: normalsTextureIndex >= 0 ? `texture-${normalsTextureIndex}` : null,
121149
- metallicRoughnessTextureId: metallicRoughnessTextureIndex >= 0 ? `texture-${metallicRoughnessTextureIndex}` : null,
121150
- emissiveTextureId: emissiveTextureIndex >= 0 ? `texture-${emissiveTextureIndex}` : null,
121151
- occlusionTextureId: occlusionTextureIndex >= 0 ? `texture-${occlusionTextureIndex}` : null
121176
+ colorTextureId: colorTextureIndex >= 0 ? `${modelPartId}-texture-${colorTextureIndex}` : null,
121177
+ normalsTextureId: normalsTextureIndex >= 0 ? `${modelPartId}-texture-${normalsTextureIndex}` : null,
121178
+ metallicRoughnessTextureId: metallicRoughnessTextureIndex >= 0 ? `${modelPartId}-texture-${metallicRoughnessTextureIndex}` : null,
121179
+ emissiveTextureId: emissiveTextureIndex >= 0 ? `${modelPartId}-texture-${emissiveTextureIndex}` : null,
121180
+ occlusionTextureId: occlusionTextureIndex >= 0 ? `${modelPartId}-texture-${occlusionTextureIndex}` : null
121152
121181
  });
121153
121182
  }
121154
121183
 
@@ -121271,14 +121300,14 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121271
121300
 
121272
121301
  const textureSetIndex = eachMeshTextureSet[meshIndex];
121273
121302
 
121274
- const textureSetId = (textureSetIndex >= 0) ? `textureSet-${textureSetIndex}` : null;
121303
+ const textureSetId = (textureSetIndex >= 0) ? `${modelPartId}-textureSet-${textureSetIndex}` : null;
121275
121304
 
121276
121305
  const meshColor = decompressColor(eachMeshMaterialAttributes.subarray((meshIndex * 6), (meshIndex * 6) + 3));
121277
121306
  const meshOpacity = eachMeshMaterialAttributes[(meshIndex * 6) + 3] / 255.0;
121278
121307
  const meshMetallic = eachMeshMaterialAttributes[(meshIndex * 6) + 4] / 255.0;
121279
121308
  const meshRoughness = eachMeshMaterialAttributes[(meshIndex * 6) + 5] / 255.0;
121280
121309
 
121281
- const meshId = manifestCtx.nextMeshId++;
121310
+ const meshId = manifestCtx.getNextId();
121282
121311
 
121283
121312
  if (isReusedGeometry) {
121284
121313
 
@@ -121287,7 +121316,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121287
121316
  const meshMatrixIndex = eachMeshMatricesPortion[meshIndex];
121288
121317
  const meshMatrix = matrices.slice(meshMatrixIndex, meshMatrixIndex + 16);
121289
121318
 
121290
- const geometryId = "geometry." + tileIndex + "." + geometryIndex; // These IDs are local to the SceneModel
121319
+ const geometryId = `${modelPartId}-geometry.${tileIndex}.${geometryIndex}`; // These IDs are local to the SceneModel
121291
121320
 
121292
121321
  let geometryArrays = geometryArraysCache[geometryId];
121293
121322
 
@@ -121386,7 +121415,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121386
121415
 
121387
121416
  sceneModel.createMesh(utils.apply(meshDefaults, {
121388
121417
  id: meshId,
121389
- textureSetId: textureSetId,
121418
+ textureSetId,
121390
121419
  origin: tileCenter,
121391
121420
  primitive: geometryArrays.primitiveName,
121392
121421
  positionsCompressed: transformedAndRecompressedPositions,
@@ -121425,8 +121454,8 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121425
121454
 
121426
121455
  sceneModel.createMesh(utils.apply(meshDefaults, {
121427
121456
  id: meshId,
121428
- geometryId: geometryId,
121429
- textureSetId: textureSetId,
121457
+ geometryId,
121458
+ textureSetId,
121430
121459
  matrix: meshMatrix,
121431
121460
  color: meshColor,
121432
121461
  metallic: meshMetallic,
@@ -121501,7 +121530,7 @@ function load(viewer, options, inflatedData, sceneModel, metaModel, manifestCtx)
121501
121530
 
121502
121531
  sceneModel.createMesh(utils.apply(meshDefaults, {
121503
121532
  id: meshId,
121504
- textureSetId: textureSetId,
121533
+ textureSetId,
121505
121534
  origin: tileCenter,
121506
121535
  primitive: primitiveName,
121507
121536
  positionsCompressed: geometryPositions,
@@ -122443,8 +122472,11 @@ class XKTLoaderPlugin extends Plugin {
122443
122472
  sceneModel.fire("error", errMsg);
122444
122473
  };
122445
122474
 
122475
+ let nextId = 0;
122446
122476
  const manifestCtx = {
122447
- nextMeshId: 0
122477
+ getNextId: () => {
122478
+ return `${modelId}.${nextId++}`;
122479
+ }
122448
122480
  };
122449
122481
 
122450
122482
  if (params.metaModelSrc || params.metaModelData) {
@@ -122487,7 +122519,6 @@ class XKTLoaderPlugin extends Plugin {
122487
122519
  }
122488
122520
 
122489
122521
 
122490
-
122491
122522
  } else {
122492
122523
 
122493
122524
  if (params.src) {
@@ -122559,9 +122590,9 @@ class XKTLoaderPlugin extends Plugin {
122559
122590
 
122560
122591
  _loadModel(src, params, options, sceneModel, metaModel, manifestCtx, done, error) {
122561
122592
  this._dataSource.getXKT(params.src, (arrayBuffer) => {
122562
- this._parseModel(arrayBuffer, params, options, sceneModel, metaModel, manifestCtx);
122563
- done();
122564
- }, error);
122593
+ this._parseModel(arrayBuffer, params, options, sceneModel, metaModel, manifestCtx);
122594
+ done();
122595
+ }, error);
122565
122596
  }
122566
122597
 
122567
122598
  _parseModel(arrayBuffer, params, options, sceneModel, metaModel, manifestCtx) {