@itwin/ecschema-rpcinterface-tests 4.6.0-dev.1 → 4.6.0-dev.5

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.
@@ -100787,6 +100787,7 @@ __webpack_require__.r(__webpack_exports__);
100787
100787
  /* harmony export */ "createSurfaceMaterial": () => (/* reexport safe */ _common_render_primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_26__.createSurfaceMaterial),
100788
100788
  /* harmony export */ "createWorkerProxy": () => (/* reexport safe */ _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_32__.createWorkerProxy),
100789
100789
  /* harmony export */ "decodeImdlGraphics": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.decodeImdlGraphics),
100790
+ /* harmony export */ "decodeMeshoptBuffer": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.decodeMeshoptBuffer),
100790
100791
  /* harmony export */ "disposeTileTreesForGeometricModels": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.disposeTileTreesForGeometricModels),
100791
100792
  /* harmony export */ "edgeParamsFromImdl": () => (/* reexport safe */ _common_imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_16__.edgeParamsFromImdl),
100792
100793
  /* harmony export */ "extractImageSourceDimensions": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_13__.extractImageSourceDimensions),
@@ -139484,11 +139485,12 @@ __webpack_require__.r(__webpack_exports__);
139484
139485
  /* harmony import */ var _render_RealityMeshParams__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../render/RealityMeshParams */ "../../core/frontend/lib/esm/render/RealityMeshParams.js");
139485
139486
  /* harmony import */ var _render_primitives_mesh_MeshPrimitives__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../render/primitives/mesh/MeshPrimitives */ "../../core/frontend/lib/esm/render/primitives/mesh/MeshPrimitives.js");
139486
139487
  /* harmony import */ var _render_primitives_Primitives__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../render/primitives/Primitives */ "../../core/frontend/lib/esm/render/primitives/Primitives.js");
139487
- /* harmony import */ var _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/render/primitives/DisplayParams */ "../../core/frontend/lib/esm/common/render/primitives/DisplayParams.js");
139488
- /* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
139489
- /* harmony import */ var _common_ImageUtil__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/ImageUtil */ "../../core/frontend/lib/esm/common/ImageUtil.js");
139490
- /* harmony import */ var _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/render/primitives/MeshPrimitive */ "../../core/frontend/lib/esm/common/render/primitives/MeshPrimitive.js");
139491
- /* harmony import */ var _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/gltf/GltfSchema */ "../../core/frontend/lib/esm/common/gltf/GltfSchema.js");
139488
+ /* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internal */ "../../core/frontend/lib/esm/tile/internal.js");
139489
+ /* harmony import */ var _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/render/primitives/DisplayParams */ "../../core/frontend/lib/esm/common/render/primitives/DisplayParams.js");
139490
+ /* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
139491
+ /* harmony import */ var _common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/ImageUtil */ "../../core/frontend/lib/esm/common/ImageUtil.js");
139492
+ /* harmony import */ var _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../common/render/primitives/MeshPrimitive */ "../../core/frontend/lib/esm/common/render/primitives/MeshPrimitive.js");
139493
+ /* harmony import */ var _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/gltf/GltfSchema */ "../../core/frontend/lib/esm/common/gltf/GltfSchema.js");
139492
139494
  /*---------------------------------------------------------------------------------------------
139493
139495
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
139494
139496
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -139509,6 +139511,7 @@ __webpack_require__.r(__webpack_exports__);
139509
139511
 
139510
139512
 
139511
139513
 
139514
+
139512
139515
  /**
139513
139516
  * A chunk of binary data exposed as a typed array.
139514
139517
  * The count member indicates how many elements exist. This may be less than this.buffer.length due to padding added to the
@@ -139529,15 +139532,15 @@ class GltfBufferData {
139529
139532
  if (expectedType !== actualType) {
139530
139533
  // Some data is stored in smaller data types to save space if no values exceed the maximum of the smaller type.
139531
139534
  switch (expectedType) {
139532
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float:
139533
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte:
139535
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
139536
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
139534
139537
  return undefined;
139535
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort:
139536
- if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte !== actualType)
139538
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
139539
+ if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== actualType)
139537
139540
  return undefined;
139538
139541
  break;
139539
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UInt32:
139540
- if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte !== actualType && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort !== actualType)
139542
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
139543
+ if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== actualType && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort !== actualType)
139541
139544
  return undefined;
139542
139545
  break;
139543
139546
  }
@@ -139549,13 +139552,13 @@ class GltfBufferData {
139549
139552
  // NB: Endianness of typed array data is determined by the 'platform byte order'. Actual data is always little-endian.
139550
139553
  // We are assuming little-endian platform. If we find a big-endian platform, we'll need to use a DataView instead.
139551
139554
  switch (actualType) {
139552
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte:
139555
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
139553
139556
  return bytes;
139554
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort:
139557
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
139555
139558
  return new Uint16Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 2);
139556
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UInt32:
139559
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
139557
139560
  return new Uint32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
139558
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float:
139561
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
139559
139562
  return new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
139560
139563
  default:
139561
139564
  return undefined;
@@ -139682,7 +139685,7 @@ function colorFromJson(values) {
139682
139685
  }
139683
139686
  function colorFromMaterial(material, isTransparent) {
139684
139687
  let color = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white;
139685
- if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material)) {
139688
+ if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material)) {
139686
139689
  if (material.values?.color && Array.isArray(material.values.color))
139687
139690
  color = colorFromJson(material.values.color);
139688
139691
  }
@@ -139773,7 +139776,7 @@ class GltfReader {
139773
139776
  * @throws Error if a node appears more than once during traversal
139774
139777
  */
139775
139778
  traverseNodes(nodeIds) {
139776
- return (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.traverseGltfNodes)(nodeIds, this._nodes, new Set());
139779
+ return (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.traverseGltfNodes)(nodeIds, this._nodes, new Set());
139777
139780
  }
139778
139781
  /** Traverse the nodes specified by their scene, recursing into their child nodes.
139779
139782
  * @throws Error if a node appears more than once during traversal
@@ -139898,9 +139901,9 @@ class GltfReader {
139898
139901
  return undefined;
139899
139902
  }
139900
139903
  const translationsView = this.getBufferView(ext.attributes, "TRANSLATION");
139901
- const translations = translationsView?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139902
- const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139903
- const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
139904
+ const translations = translationsView?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
139905
+ const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
139906
+ const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
139904
139907
  // All attributes must specify the same count, count must be greater than zero, and at least one attribute must be specified.
139905
139908
  const count = translations?.count ?? rotations?.count ?? scales?.count;
139906
139909
  if (!count || (rotations && rotations.count !== count) || (scales && scales.count !== count)) {
@@ -139973,7 +139976,7 @@ class GltfReader {
139973
139976
  let thisBias;
139974
139977
  if (undefined !== pseudoRtcBias)
139975
139978
  thisBias = (undefined === thisTransform) ? pseudoRtcBias : thisTransform.matrix.multiplyInverse(pseudoRtcBias);
139976
- for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
139979
+ for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
139977
139980
  const nodeMesh = this._meshes[meshKey];
139978
139981
  if (nodeMesh?.primitives) {
139979
139982
  const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias, nodeInstances);
@@ -140072,23 +140075,28 @@ class GltfReader {
140072
140075
  return undefined;
140073
140076
  const bufferViewAccessorValue = accessor.bufferView;
140074
140077
  const bufferView = undefined !== bufferViewAccessorValue ? this._bufferViews[bufferViewAccessorValue] : undefined;
140075
- if (!bufferView || undefined === bufferView.buffer)
140078
+ if (!bufferView)
140076
140079
  return undefined;
140077
- const buffer = this._buffers[bufferView.buffer];
140078
- const bufferData = buffer?.resolvedBuffer;
140080
+ let bufferData = bufferView.resolvedBuffer;
140081
+ if (!bufferData) {
140082
+ if (undefined === bufferView.buffer)
140083
+ return undefined;
140084
+ const buffer = this._buffers[bufferView.buffer];
140085
+ bufferData = buffer?.resolvedBuffer;
140086
+ }
140079
140087
  if (!bufferData)
140080
140088
  return undefined;
140081
140089
  const type = accessor.componentType;
140082
140090
  let dataSize = 0;
140083
140091
  switch (type) {
140084
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte:
140092
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
140085
140093
  dataSize = 1;
140086
140094
  break;
140087
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort:
140095
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
140088
140096
  dataSize = 2;
140089
140097
  break;
140090
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UInt32:
140091
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float:
140098
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
140099
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
140092
140100
  dataSize = 4;
140093
140101
  break;
140094
140102
  default:
@@ -140118,10 +140126,10 @@ class GltfReader {
140118
140126
  return undefined;
140119
140127
  }
140120
140128
  }
140121
- readBufferData32(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UInt32); }
140122
- readBufferData16(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort); }
140123
- readBufferData8(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte); }
140124
- readBufferDataFloat(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float); }
140129
+ readBufferData32(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32); }
140130
+ readBufferData16(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort); }
140131
+ readBufferData8(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte); }
140132
+ readBufferDataFloat(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float); }
140125
140133
  constructor(args) {
140126
140134
  this._resolvedTextures = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => compareTextureKeys(lhs, rhs));
140127
140135
  this._dracoMeshes = new Map();
@@ -140131,7 +140139,7 @@ class GltfReader {
140131
140139
  * (We also don't want to produce mip-maps for them, which is determined indirectly from the wrap mode).
140132
140140
  * Allow the default to be optionally overridden.
140133
140141
  */
140134
- this.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfWrapMode.Repeat;
140142
+ this.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.Repeat;
140135
140143
  this._glTF = args.props.glTF;
140136
140144
  this._version = args.props.version;
140137
140145
  this._yAxisUp = args.props.yAxisUp;
@@ -140183,7 +140191,7 @@ class GltfReader {
140183
140191
  if (typeof material !== "object")
140184
140192
  return undefined;
140185
140193
  // Bimium's shader value...almost certainly obsolete at this point.
140186
- if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material))
140194
+ if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
140187
140195
  return material.diffuse ?? this.extractId(material.values?.tex);
140188
140196
  // KHR_techniques_webgl extension
140189
140197
  const techniques = this._glTF.extensions?.KHR_techniques_webgl?.techniques;
@@ -140193,7 +140201,7 @@ class GltfReader {
140193
140201
  if (typeof uniforms === "object") {
140194
140202
  for (const uniformName of Object.keys(uniforms)) {
140195
140203
  const uniform = uniforms[uniformName];
140196
- if (typeof uniform === "object" && uniform.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Sampler2d)
140204
+ if (typeof uniform === "object" && uniform.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Sampler2d)
140197
140205
  return this.extractId(ext.values[uniformName]?.index);
140198
140206
  }
140199
140207
  }
@@ -140204,15 +140212,15 @@ class GltfReader {
140204
140212
  extractNormalMapId(material) {
140205
140213
  if (typeof material !== "object")
140206
140214
  return undefined;
140207
- if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material))
140215
+ if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
140208
140216
  return undefined;
140209
140217
  return this.extractId(material.normalTexture?.index);
140210
140218
  }
140211
140219
  isMaterialTransparent(material) {
140212
- if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material)) {
140220
+ if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material)) {
140213
140221
  if (this._glTF.techniques && undefined !== material.technique) {
140214
140222
  const technique = this._glTF.techniques[material.technique];
140215
- if (technique?.states?.enable?.some((state) => state === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfTechniqueState.Blend))
140223
+ if (technique?.states?.enable?.some((state) => state === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfTechniqueState.Blend))
140216
140224
  return true;
140217
140225
  }
140218
140226
  return false;
@@ -140236,11 +140244,11 @@ class GltfReader {
140236
140244
  // DisplayParams doesn't want a separate texture mapping if the material already has one.
140237
140245
  textureMapping = undefined;
140238
140246
  }
140239
- return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping);
140247
+ return new _common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_9__.DisplayParams(_common_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_9__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.None, renderMaterial, undefined, hasBakedLighting, textureMapping);
140240
140248
  }
140241
140249
  readMeshPrimitives(node, featureTable, thisTransform, thisBias, instances) {
140242
140250
  const meshes = [];
140243
- for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
140251
+ for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
140244
140252
  const nodeMesh = this._meshes[meshKey];
140245
140253
  if (nodeMesh?.primitives) {
140246
140254
  for (const primitive of nodeMesh.primitives) {
@@ -140280,9 +140288,9 @@ class GltfReader {
140280
140288
  return meshes;
140281
140289
  }
140282
140290
  readMeshPrimitive(primitive, featureTable, pseudoRtcBias) {
140283
- const meshMode = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(primitive.mode, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.Triangles);
140284
- if (meshMode === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.Points /* && !this._vertexTableRequired */) {
140285
- const pointCloud = this.readPointCloud(primitive, undefined !== featureTable);
140291
+ const meshMode = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(primitive.mode, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Triangles);
140292
+ if (meshMode === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Points /* && !this._vertexTableRequired */) {
140293
+ const pointCloud = this.readPointCloud2(primitive, undefined !== featureTable);
140286
140294
  if (pointCloud)
140287
140295
  return pointCloud;
140288
140296
  }
@@ -140296,14 +140304,14 @@ class GltfReader {
140296
140304
  return undefined;
140297
140305
  let primitiveType = -1;
140298
140306
  switch (meshMode) {
140299
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.Lines:
140300
- primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Polyline;
140307
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Lines:
140308
+ primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Polyline;
140301
140309
  break;
140302
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.Points:
140303
- primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Point;
140310
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Points:
140311
+ primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point;
140304
140312
  break;
140305
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfMeshMode.Triangles:
140306
- primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Mesh;
140313
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Triangles:
140314
+ primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Mesh;
140307
140315
  break;
140308
140316
  default:
140309
140317
  return undefined;
@@ -140331,7 +140339,7 @@ class GltfReader {
140331
140339
  const colorIndices = this.readBufferData16(primitive.attributes, "_COLORINDEX");
140332
140340
  if (undefined !== colorIndices && material) {
140333
140341
  let texStep;
140334
- if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material))
140342
+ if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
140335
140343
  texStep = material.values?.texStep;
140336
140344
  else
140337
140345
  texStep = material.extensions?.KHR_techniques_webgl?.values?.u_texStep;
@@ -140361,14 +140369,14 @@ class GltfReader {
140361
140369
  if (!this.readVertices(mesh, primitive, pseudoRtcBias))
140362
140370
  return undefined;
140363
140371
  switch (primitiveType) {
140364
- case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Mesh: {
140372
+ case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Mesh: {
140365
140373
  if (!this.readMeshIndices(mesh, primitive))
140366
140374
  return undefined;
140367
140375
  if (!displayParams.ignoreLighting && !this.readNormals(mesh, primitive.attributes, "NORMAL"))
140368
140376
  return undefined;
140369
140377
  if (!mesh.uvs) {
140370
140378
  let texCoordIndex = 0;
140371
- if (!(0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.isGltf1Material)(material) && undefined !== material.pbrMetallicRoughness?.baseColorTexture?.texCoord)
140379
+ if (!(0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material) && undefined !== material.pbrMetallicRoughness?.baseColorTexture?.texCoord)
140372
140380
  texCoordIndex = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(material.pbrMetallicRoughness.baseColorTexture.texCoord);
140373
140381
  this.readUVParams(mesh, primitive.attributes, `TEXCOORD_${texCoordIndex}`);
140374
140382
  }
@@ -140376,9 +140384,9 @@ class GltfReader {
140376
140384
  return undefined;
140377
140385
  break;
140378
140386
  }
140379
- case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Polyline:
140380
- case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Point: {
140381
- if (undefined !== mesh.primitive.polylines && !this.readPolylines(mesh.primitive.polylines, primitive, "indices", _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_11__.MeshPrimitiveType.Point === primitiveType))
140387
+ case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Polyline:
140388
+ case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point: {
140389
+ if (undefined !== mesh.primitive.polylines && !this.readPolylines(mesh.primitive.polylines, primitive, "indices", _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point === primitiveType))
140382
140390
  return undefined;
140383
140391
  break;
140384
140392
  }
@@ -140400,23 +140408,60 @@ class GltfReader {
140400
140408
  }
140401
140409
  return mesh;
140402
140410
  }
140403
- readPointCloud(primitive, hasFeatures) {
140411
+ readPointCloud2(primitive, hasFeatures) {
140412
+ let pointRange;
140413
+ let positions;
140414
+ let qparams;
140404
140415
  const posView = this.getBufferView(primitive.attributes, "POSITION");
140405
- if (!posView || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float !== posView.type)
140406
- return undefined;
140407
- const posData = posView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
140408
- if (!(posData?.buffer instanceof Float32Array))
140409
- return undefined;
140416
+ switch (posView?.type) {
140417
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
140418
+ const posData = posView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
140419
+ if (!(posData?.buffer instanceof Float32Array)) {
140420
+ return undefined;
140421
+ }
140422
+ positions = posData.buffer;
140423
+ const strideSkip = posView.stride - 3;
140424
+ pointRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
140425
+ for (let i = 0; i < positions.length; i += strideSkip) {
140426
+ pointRange.extendXYZ(positions[i++], positions[i++], positions[i++]);
140427
+ }
140428
+ qparams = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.QParams3d.fromOriginAndScale(new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(0, 0, 0), new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(1, 1, 1));
140429
+ break;
140430
+ }
140431
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
140432
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort: {
140433
+ const posData = posView.toBufferData(posView.type);
140434
+ if (!(posData?.buffer instanceof Uint8Array || posData?.buffer instanceof Uint16Array)) {
140435
+ return undefined;
140436
+ }
140437
+ positions = posData.buffer;
140438
+ let min, max;
140439
+ const ext = posView.accessor.extensions?.WEB3D_quantized_attributes;
140440
+ if (ext) {
140441
+ min = ext.decodedMin;
140442
+ max = ext.decodedMax;
140443
+ }
140444
+ else {
140445
+ // Assume KHR_mesh_quantization...
140446
+ min = posView.accessor.min;
140447
+ max = posView.accessor.max;
140448
+ }
140449
+ if (undefined === min || undefined === max) {
140450
+ return undefined;
140451
+ }
140452
+ pointRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createXYZXYZ(min[0], min[1], min[2], max[0], max[1], max[2]);
140453
+ qparams = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.QParams3d.fromRange(pointRange);
140454
+ break;
140455
+ }
140456
+ default:
140457
+ return undefined;
140458
+ }
140410
140459
  const colorView = this.getBufferView(primitive.attributes, "COLOR_0");
140411
- if (!colorView || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte !== colorView.type)
140460
+ if (!colorView || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== colorView.type)
140412
140461
  return undefined;
140413
- const colorData = colorView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte);
140462
+ const colorData = colorView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte);
140414
140463
  if (!(colorData?.buffer instanceof Uint8Array))
140415
140464
  return undefined;
140416
- const strideSkip = posView.stride - 3;
140417
- const pointRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
140418
- for (let i = 0; i < posData.buffer.length; i += strideSkip)
140419
- pointRange.extendXYZ(posData.buffer[i++], posData.buffer[i++], posData.buffer[i++]);
140420
140465
  let colors = colorData.buffer;
140421
140466
  if ("VEC4" === colorView.accessor.type) {
140422
140467
  // ###TODO support transparent point clouds
@@ -140429,13 +140474,14 @@ class GltfReader {
140429
140474
  }
140430
140475
  }
140431
140476
  const features = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FeatureIndex();
140432
- if (hasFeatures)
140477
+ if (hasFeatures) {
140433
140478
  features.type = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FeatureIndexType.Uniform;
140479
+ }
140434
140480
  this._containsPointCloud = true;
140435
140481
  return {
140436
140482
  type: "pointcloud",
140437
- positions: posData.buffer,
140438
- qparams: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.QParams3d.fromOriginAndScale(new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(0, 0, 0), new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(1, 1, 1)),
140483
+ positions,
140484
+ qparams,
140439
140485
  pointRange,
140440
140486
  colors,
140441
140487
  colorFormat: "rgb",
@@ -140542,8 +140588,8 @@ class GltfReader {
140542
140588
  const view = this.getBufferView(primitive.attributes, "POSITION");
140543
140589
  if (undefined === view)
140544
140590
  return false;
140545
- if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float === view.type) {
140546
- const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
140591
+ if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float === view.type) {
140592
+ const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
140547
140593
  if (undefined === buffer)
140548
140594
  return false;
140549
140595
  const strideSkip = view.stride - 3;
@@ -140562,15 +140608,23 @@ class GltfReader {
140562
140608
  mesh.points = positions.toTypedArray();
140563
140609
  }
140564
140610
  else {
140565
- if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort !== view.type)
140611
+ if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort !== view.type)
140566
140612
  return false;
140613
+ let rangeMin, rangeMax;
140567
140614
  const quantized = view.accessor.extensions?.WEB3D_quantized_attributes;
140568
- const rangeMin = quantized?.decodedMin;
140569
- const rangeMax = quantized?.decodedMax;
140570
- if (!rangeMin || !rangeMax) // required by spec...
140615
+ if (quantized) {
140616
+ rangeMin = quantized.decodedMin;
140617
+ rangeMax = quantized.decodedMax;
140618
+ }
140619
+ else {
140620
+ // Assume KHR_mesh_quantization...
140621
+ rangeMin = view.accessor.min;
140622
+ rangeMax = view.accessor.max;
140623
+ }
140624
+ if (undefined === rangeMin || undefined === rangeMax) // required by spec...
140571
140625
  return false;
140572
140626
  // ###TODO apply WEB3D_quantized_attributes.decodeMatrix? Have not encountered in the wild; glTF 1.0 only.
140573
- const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort);
140627
+ const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort);
140574
140628
  if (undefined === buffer || !(buffer.buffer instanceof Uint16Array))
140575
140629
  return false;
140576
140630
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(buffer.buffer instanceof Uint16Array);
@@ -140632,8 +140686,8 @@ class GltfReader {
140632
140686
  if (undefined === view)
140633
140687
  return false;
140634
140688
  switch (view.type) {
140635
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float: {
140636
- const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float);
140689
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
140690
+ const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
140637
140691
  if (undefined === data)
140638
140692
  return false;
140639
140693
  mesh.normals = new Uint16Array(data.count);
@@ -140645,8 +140699,8 @@ class GltfReader {
140645
140699
  }
140646
140700
  return true;
140647
140701
  }
140648
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte: {
140649
- const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte);
140702
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte: {
140703
+ const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte);
140650
140704
  if (undefined === data)
140651
140705
  return false;
140652
140706
  // ###TODO: we shouldn't have to allocate OctEncodedNormal objects...just use uint16s / numbers...
@@ -140665,13 +140719,13 @@ class GltfReader {
140665
140719
  }
140666
140720
  readColors(mesh, attribute, accessorName) {
140667
140721
  const view = this.getBufferView(attribute, accessorName);
140668
- if (!view || (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float !== view.type && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedByte !== view.type && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.SignedByte !== view.type))
140722
+ if (!view || (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float !== view.type && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== view.type && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.SignedByte !== view.type))
140669
140723
  return false;
140670
140724
  const data = view.toBufferData(view.type);
140671
140725
  if (!data)
140672
140726
  return false;
140673
140727
  const hasAlpha = "VEC4" === view.accessor.type;
140674
- const factor = view.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float ? 255 : 1;
140728
+ const factor = view.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float ? 255 : 1;
140675
140729
  const rgbt = new Uint8Array(4);
140676
140730
  const color = new Uint32Array(rgbt.buffer);
140677
140731
  for (let i = 0; i < data.count; i++) {
@@ -140689,7 +140743,7 @@ class GltfReader {
140689
140743
  if (view === undefined)
140690
140744
  return false;
140691
140745
  switch (view.type) {
140692
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.Float: {
140746
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
140693
140747
  const data = this.readBufferDataFloat(json, accessorName);
140694
140748
  if (!data)
140695
140749
  return false;
@@ -140707,13 +140761,13 @@ class GltfReader {
140707
140761
  }
140708
140762
  return true;
140709
140763
  }
140710
- case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort: {
140764
+ case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort: {
140711
140765
  const quantized = view.accessor.extensions?.WEB3D_quantized_attributes;
140712
140766
  const rangeMin = quantized?.decodedMin;
140713
140767
  const rangeMax = quantized?.decodedMax;
140714
140768
  if (undefined === rangeMin || undefined === rangeMax)
140715
140769
  return false;
140716
- const qData = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfDataType.UnsignedShort);
140770
+ const qData = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort);
140717
140771
  if (undefined === qData || !(qData.buffer instanceof Uint16Array))
140718
140772
  return false;
140719
140773
  mesh.uvRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createXYXY(rangeMin[0], rangeMin[1], rangeMax[0], rangeMax[1]);
@@ -140767,10 +140821,30 @@ class GltfReader {
140767
140821
  async resolveResources() {
140768
140822
  // Load any external images and buffers.
140769
140823
  await this._resolveResources();
140824
+ // Decompress any meshopt-compressed buffer views
140825
+ const decodeMeshoptBuffers = [];
140826
+ for (const bv of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._bufferViews)) {
140827
+ const ext = bv.extensions?.EXT_meshopt_compression;
140828
+ if (ext) {
140829
+ const bufferData = this._buffers[ext.buffer]?.resolvedBuffer;
140830
+ if (bufferData) {
140831
+ const source = new Uint8Array(bufferData.buffer, bufferData.byteOffset + (ext.byteOffset ?? 0), ext.byteLength ?? 0);
140832
+ const decode = async () => {
140833
+ bv.resolvedBuffer = await (0,_internal__WEBPACK_IMPORTED_MODULE_8__.decodeMeshoptBuffer)(source, ext);
140834
+ if (bv.resolvedBuffer) {
140835
+ bv.byteLength = bv.resolvedBuffer.byteLength;
140836
+ bv.byteOffset = 0;
140837
+ }
140838
+ };
140839
+ decodeMeshoptBuffers.push(decode());
140840
+ }
140841
+ }
140842
+ }
140843
+ await Promise.all(decodeMeshoptBuffers);
140770
140844
  // If any meshes are draco-compressed, dynamically load the decoder module and then decode the meshes.
140771
140845
  const dracoMeshes = [];
140772
140846
  for (const node of this.traverseScene()) {
140773
- for (const meshId of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.getGltfNodeMeshIds)(node)) {
140847
+ for (const meshId of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
140774
140848
  const mesh = this._meshes[meshId];
140775
140849
  if (mesh?.primitives)
140776
140850
  for (const primitive of mesh.primitives)
@@ -140785,8 +140859,8 @@ class GltfReader {
140785
140859
  await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
140786
140860
  }
140787
140861
  catch (err) {
140788
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_9__.FrontendLoggerCategory.Render, "Failed to decode draco-encoded glTF mesh");
140789
- _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_9__.FrontendLoggerCategory.Render, err);
140862
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__.FrontendLoggerCategory.Render, "Failed to decode draco-encoded glTF mesh");
140863
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__.FrontendLoggerCategory.Render, err);
140790
140864
  }
140791
140865
  }
140792
140866
  async _resolveResources() {
@@ -140794,14 +140868,14 @@ class GltfReader {
140794
140868
  // be required for the scene.
140795
140869
  const promises = [];
140796
140870
  try {
140797
- for (const buffer of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.gltfDictionaryIterator)(this._buffers))
140871
+ for (const buffer of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._buffers))
140798
140872
  if (!buffer.resolvedBuffer)
140799
140873
  promises.push(this.resolveBuffer(buffer));
140800
140874
  await Promise.all(promises);
140801
140875
  if (this._isCanceled)
140802
140876
  return;
140803
140877
  promises.length = 0;
140804
- for (const image of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.gltfDictionaryIterator)(this._images))
140878
+ for (const image of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._images))
140805
140879
  if (!image.resolvedImage)
140806
140880
  promises.push(this.resolveImage(image));
140807
140881
  await Promise.all(promises);
@@ -140855,7 +140929,7 @@ class GltfReader {
140855
140929
  return;
140856
140930
  const bvSrc = undefined !== image.bufferView ? image : image.extensions?.KHR_binary_glTF;
140857
140931
  if (undefined !== bvSrc?.bufferView) {
140858
- const format = undefined !== bvSrc.mimeType ? (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_10__.getImageSourceFormatForMimeType)(bvSrc.mimeType) : undefined;
140932
+ const format = undefined !== bvSrc.mimeType ? (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.getImageSourceFormatForMimeType)(bvSrc.mimeType) : undefined;
140859
140933
  const bufferView = this._bufferViews[bvSrc.bufferView];
140860
140934
  if (undefined === format || !bufferView || !bufferView.byteLength || bufferView.byteLength < 0)
140861
140935
  return;
@@ -140867,9 +140941,9 @@ class GltfReader {
140867
140941
  try {
140868
140942
  const imageSource = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageSource(bytes, format);
140869
140943
  if (this._system.supportsCreateImageBitmap)
140870
- image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_10__.imageBitmapFromImageSource)(imageSource);
140944
+ image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.imageBitmapFromImageSource)(imageSource);
140871
140945
  else
140872
- image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_10__.imageElementFromImageSource)(imageSource);
140946
+ image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.imageElementFromImageSource)(imageSource);
140873
140947
  }
140874
140948
  catch (_) {
140875
140949
  //
@@ -140878,7 +140952,7 @@ class GltfReader {
140878
140952
  }
140879
140953
  const url = undefined !== image.uri ? this.resolveUrl(image.uri) : undefined;
140880
140954
  if (undefined !== url)
140881
- image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_10__.tryImageElementFromUrl)(url);
140955
+ image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.tryImageElementFromUrl)(url);
140882
140956
  }
140883
140957
  /** Exposed strictly for testing. */
140884
140958
  getTextureType(sampler) {
@@ -140887,7 +140961,7 @@ class GltfReader {
140887
140961
  let wrapT = sampler?.wrapT;
140888
140962
  if (undefined === wrapS && undefined === wrapT)
140889
140963
  wrapS = wrapT = this.defaultWrapMode;
140890
- if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfWrapMode.ClampToEdge === wrapS || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_12__.GltfWrapMode.ClampToEdge === wrapT)
140964
+ if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.ClampToEdge === wrapS || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.ClampToEdge === wrapT)
140891
140965
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.TileSection;
140892
140966
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.Normal;
140893
140967
  }
@@ -143023,6 +143097,88 @@ class LRUTileList {
143023
143097
  }
143024
143098
 
143025
143099
 
143100
+ /***/ }),
143101
+
143102
+ /***/ "../../core/frontend/lib/esm/tile/MeshoptCompression.js":
143103
+ /*!**************************************************************!*\
143104
+ !*** ../../core/frontend/lib/esm/tile/MeshoptCompression.js ***!
143105
+ \**************************************************************/
143106
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
143107
+
143108
+ "use strict";
143109
+ __webpack_require__.r(__webpack_exports__);
143110
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
143111
+ /* harmony export */ "decodeMeshoptBuffer": () => (/* binding */ decodeMeshoptBuffer)
143112
+ /* harmony export */ });
143113
+ /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
143114
+ /* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
143115
+ /*---------------------------------------------------------------------------------------------
143116
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
143117
+ * See LICENSE.md in the project root for license terms and full copyright notice.
143118
+ *--------------------------------------------------------------------------------------------*/
143119
+ /** @packageDocumentation
143120
+ * @module Tiles
143121
+ */
143122
+
143123
+
143124
+ /** Loads and configures the MeshoptDecoder module on demand. */
143125
+ class Loader {
143126
+ constructor() {
143127
+ this._status = "uninitialized";
143128
+ }
143129
+ async getDecoder() {
143130
+ const status = this._status;
143131
+ switch (status) {
143132
+ case "failed":
143133
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._decoder);
143134
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
143135
+ return undefined;
143136
+ case "ready":
143137
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._decoder);
143138
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
143139
+ return this._decoder;
143140
+ case "loading":
143141
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._promise);
143142
+ await this._promise;
143143
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)("failed" === this._status || "ready" === this._status);
143144
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
143145
+ return this._decoder;
143146
+ }
143147
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)("uninitialized" === status);
143148
+ this._status = "loading";
143149
+ this._promise = this.load();
143150
+ return this.getDecoder();
143151
+ }
143152
+ async load() {
143153
+ try {
143154
+ // Import the module on first use.
143155
+ const decoder = (await __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61").then(__webpack_require__.bind(__webpack_require__, /*! meshoptimizer */ "../../common/temp/node_modules/.pnpm/meshoptimizer@0.20.0/node_modules/meshoptimizer/index.module.js"))).MeshoptDecoder;
143156
+ await decoder.ready;
143157
+ // Configure it to do the decoding outside of the main thread. No compelling reason to use more than one worker.
143158
+ decoder.useWorkers(1);
143159
+ this._status = "ready";
143160
+ this._decoder = decoder;
143161
+ }
143162
+ catch (err) {
143163
+ _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.FrontendLoggerCategory.Render, err);
143164
+ this._status = "failed";
143165
+ }
143166
+ finally {
143167
+ this._promise = undefined;
143168
+ }
143169
+ }
143170
+ }
143171
+ const loader = new Loader();
143172
+ /** @internal */
143173
+ async function decodeMeshoptBuffer(source, args) {
143174
+ const decoder = await loader.getDecoder();
143175
+ if (!decoder) {
143176
+ return undefined;
143177
+ }
143178
+ return decoder.decodeGltfBufferAsync(args.count, args.byteStride, source, args.mode, args.filter);
143179
+ }
143180
+
143181
+
143026
143182
  /***/ }),
143027
143183
 
143028
143184
  /***/ "../../core/frontend/lib/esm/tile/OPCFormatInterpreter.js":
@@ -150196,6 +150352,7 @@ __webpack_require__.r(__webpack_exports__);
150196
150352
  /* harmony export */ "createRealityTileTreeReference": () => (/* reexport safe */ _RealityModelTileTree__WEBPACK_IMPORTED_MODULE_73__.createRealityTileTreeReference),
150197
150353
  /* harmony export */ "createSpatialTileTreeReferences": () => (/* reexport safe */ _PrimaryTileTree__WEBPACK_IMPORTED_MODULE_78__.createSpatialTileTreeReferences),
150198
150354
  /* harmony export */ "decodeImdlGraphics": () => (/* reexport safe */ _ImdlGraphicsCreator__WEBPACK_IMPORTED_MODULE_35__.decodeImdlGraphics),
150355
+ /* harmony export */ "decodeMeshoptBuffer": () => (/* reexport safe */ _MeshoptCompression__WEBPACK_IMPORTED_MODULE_89__.decodeMeshoptBuffer),
150199
150356
  /* harmony export */ "disposeTileTreesForGeometricModels": () => (/* reexport safe */ _PrimaryTileTree__WEBPACK_IMPORTED_MODULE_78__.disposeTileTreesForGeometricModels),
150200
150357
  /* harmony export */ "getCesiumAccessTokenAndEndpointUrl": () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_64__.getCesiumAccessTokenAndEndpointUrl),
150201
150358
  /* harmony export */ "getCesiumAssetUrl": () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_64__.getCesiumAssetUrl),
@@ -150302,6 +150459,7 @@ __webpack_require__.r(__webpack_exports__);
150302
150459
  /* harmony import */ var _ThreeDTileFormatInterpreter__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./ThreeDTileFormatInterpreter */ "../../core/frontend/lib/esm/tile/ThreeDTileFormatInterpreter.js");
150303
150460
  /* harmony import */ var _OPCFormatInterpreter__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./OPCFormatInterpreter */ "../../core/frontend/lib/esm/tile/OPCFormatInterpreter.js");
150304
150461
  /* harmony import */ var _FetchCloudStorage__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./FetchCloudStorage */ "../../core/frontend/lib/esm/tile/FetchCloudStorage.js");
150462
+ /* harmony import */ var _MeshoptCompression__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./MeshoptCompression */ "../../core/frontend/lib/esm/tile/MeshoptCompression.js");
150305
150463
  /*---------------------------------------------------------------------------------------------
150306
150464
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
150307
150465
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -150407,6 +150565,7 @@ __webpack_require__.r(__webpack_exports__);
150407
150565
 
150408
150566
 
150409
150567
 
150568
+
150410
150569
 
150411
150570
 
150412
150571
  /***/ }),
@@ -154291,8 +154450,11 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
154291
154450
  return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.Valid, subLayers };
154292
154451
  }
154293
154452
  catch (err) {
154294
- console.error(err); // eslint-disable-line no-console
154295
- return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl };
154453
+ let status = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl;
154454
+ if (err?.status === 401) {
154455
+ status = ((userName && password) ? _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidCredentials : _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.RequireAuth);
154456
+ }
154457
+ return { status };
154296
154458
  }
154297
154459
  }
154298
154460
  }
@@ -184286,7 +184448,7 @@ __webpack_require__.r(__webpack_exports__);
184286
184448
  /* harmony export */ "BSplineWrapMode": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.BSplineWrapMode),
184287
184449
  /* harmony export */ "BagOfCurves": () => (/* reexport safe */ _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_64__.BagOfCurves),
184288
184450
  /* harmony export */ "BarycentricTriangle": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.BarycentricTriangle),
184289
- /* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__.BentleyGeometryFlatBuffer),
184451
+ /* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_130__.BentleyGeometryFlatBuffer),
184290
184452
  /* harmony export */ "Bezier1dNd": () => (/* reexport safe */ _bspline_Bezier1dNd__WEBPACK_IMPORTED_MODULE_98__.Bezier1dNd),
184291
184453
  /* harmony export */ "BezierCoffs": () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierCoffs),
184292
184454
  /* harmony export */ "BezierCurve3d": () => (/* reexport safe */ _bspline_BezierCurve3d__WEBPACK_IMPORTED_MODULE_100__.BezierCurve3d),
@@ -184450,6 +184612,7 @@ __webpack_require__.r(__webpack_exports__);
184450
184612
  /* harmony export */ "RuledSweep": () => (/* reexport safe */ _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_92__.RuledSweep),
184451
184613
  /* harmony export */ "Sample": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.Sample),
184452
184614
  /* harmony export */ "Segment1d": () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
184615
+ /* harmony export */ "SerializationHelpers": () => (/* reexport safe */ _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_129__.SerializationHelpers),
184453
184616
  /* harmony export */ "SineCosinePolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SineCosinePolynomial),
184454
184617
  /* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SmallSystem),
184455
184618
  /* harmony export */ "SmoothTransformBetweenFrusta": () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
@@ -184618,7 +184781,8 @@ __webpack_require__.r(__webpack_exports__);
184618
184781
  /* harmony import */ var _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./serialization/IModelJsonSchema */ "../../core/geometry/lib/esm/serialization/IModelJsonSchema.js");
184619
184782
  /* harmony import */ var _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./serialization/DeepCompare */ "../../core/geometry/lib/esm/serialization/DeepCompare.js");
184620
184783
  /* harmony import */ var _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./serialization/GeometrySamples */ "../../core/geometry/lib/esm/serialization/GeometrySamples.js");
184621
- /* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
184784
+ /* harmony import */ var _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
184785
+ /* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
184622
184786
  /*---------------------------------------------------------------------------------------------
184623
184787
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
184624
184788
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -184870,6 +185034,7 @@ __webpack_require__.r(__webpack_exports__);
184870
185034
 
184871
185035
 
184872
185036
 
185037
+
184873
185038
 
184874
185039
 
184875
185040
  /***/ }),
@@ -254950,22 +255115,22 @@ __webpack_require__.r(__webpack_exports__);
254950
255115
 
254951
255116
 
254952
255117
  /**
254953
- * `SerializationHelpers` namespace has helper classes for serializing and deserializing geometry.
254954
- * @internal
255118
+ * The `SerializationHelpers` namespace has helper classes for serializing and deserializing geometry, such as B-spline curves and surfaces.
255119
+ * @public
254955
255120
  */
254956
255121
  var SerializationHelpers;
254957
255122
  (function (SerializationHelpers) {
254958
- /** Constructor with required data. Inputs are captured, not copied. */
255123
+ /** Constructor for BSplineCurveData that populates the required data. Inputs are captured, not copied. */
254959
255124
  function createBSplineCurveData(poles, dim, knots, numPoles, order) {
254960
255125
  return { poles, dim, params: { numPoles, order, knots } };
254961
255126
  }
254962
255127
  SerializationHelpers.createBSplineCurveData = createBSplineCurveData;
254963
- /** Constructor with required data. Inputs are captured, not copied. */
255128
+ /** Constructor for BSplineSurfaceData that populates the required data. Inputs are captured, not copied. */
254964
255129
  function createBSplineSurfaceData(poles, dim, uKnots, uNumPoles, uOrder, vKnots, vNumPoles, vOrder) {
254965
255130
  return { poles, dim, uParams: { numPoles: uNumPoles, order: uOrder, knots: uKnots }, vParams: { numPoles: vNumPoles, order: vOrder, knots: vKnots } };
254966
255131
  }
254967
255132
  SerializationHelpers.createBSplineSurfaceData = createBSplineSurfaceData;
254968
- /** Clone curve data */
255133
+ /** Clone B-spline curve data */
254969
255134
  function cloneBSplineCurveData(source) {
254970
255135
  return {
254971
255136
  poles: (source.poles instanceof Float64Array) ? new Float64Array(source.poles) : _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.copy2d(source.poles),
@@ -254981,7 +255146,7 @@ var SerializationHelpers;
254981
255146
  };
254982
255147
  }
254983
255148
  SerializationHelpers.cloneBSplineCurveData = cloneBSplineCurveData;
254984
- /** Clone surface data */
255149
+ /** Clone B-spline surface data */
254985
255150
  function cloneBSplineSurfaceData(source) {
254986
255151
  return {
254987
255152
  poles: (source.poles instanceof Float64Array) ? new Float64Array(source.poles) : _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.copy3d(source.poles),
@@ -255004,7 +255169,7 @@ var SerializationHelpers;
255004
255169
  };
255005
255170
  }
255006
255171
  SerializationHelpers.cloneBSplineSurfaceData = cloneBSplineSurfaceData;
255007
- /** Copy from source to dest */
255172
+ /** Copy B-spline curve data from source to dest */
255008
255173
  function copyBSplineCurveDataPoles(source) {
255009
255174
  let nPole = 0;
255010
255175
  let nCoordPerPole = 0;
@@ -255051,7 +255216,7 @@ var SerializationHelpers;
255051
255216
  weights = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.create(source.weights);
255052
255217
  return { poles, weights };
255053
255218
  }
255054
- /** Copy from source to dest */
255219
+ /** Copy B-spline surface data from source to dest */
255055
255220
  function copyBSplineSurfaceDataPoles(source) {
255056
255221
  let nPoleRow = 0;
255057
255222
  let nPolePerRow = 0;
@@ -255110,7 +255275,7 @@ var SerializationHelpers;
255110
255275
  }
255111
255276
  return { poles, weights };
255112
255277
  }
255113
- /** Convert data arrays to the types specified by options. */
255278
+ /** Convert B-spline curve data arrays to the types specified by options. */
255114
255279
  function convertBSplineCurveDataArrays(data, options) {
255115
255280
  if (undefined !== options?.jsonPoles) {
255116
255281
  const packedPoles = data.poles instanceof Float64Array;
@@ -255134,7 +255299,7 @@ var SerializationHelpers;
255134
255299
  data.params.knots = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.pack(data.params.knots);
255135
255300
  }
255136
255301
  }
255137
- /** Convert data arrays to the types specified by options. */
255302
+ /** Convert B-spline surface data arrays to the types specified by options. */
255138
255303
  function convertBSplineSurfaceDataArrays(data, options) {
255139
255304
  if (undefined !== options?.jsonPoles) {
255140
255305
  const packedPoles = data.poles instanceof Float64Array;
@@ -255163,6 +255328,7 @@ var SerializationHelpers;
255163
255328
  data.vParams.knots = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.pack(data.vParams.knots);
255164
255329
  }
255165
255330
  }
255331
+ /** Helper class for preparing geometry data for import. */
255166
255332
  class Import {
255167
255333
  /** copy knots, with options to control destination type and extraneous knot removal */
255168
255334
  static copyKnots(knots, options, iStart, iEnd) {
@@ -255359,6 +255525,7 @@ var SerializationHelpers;
255359
255525
  }
255360
255526
  }
255361
255527
  SerializationHelpers.Import = Import;
255528
+ /** Helper class for preparing geometry data for export. */
255362
255529
  class Export {
255363
255530
  /**
255364
255531
  * Restore special legacy periodic B-spline knots opened via BSplineWrapMode.OpenByRemovingKnots logic.
@@ -284153,10 +284320,10 @@ class Settings {
284153
284320
  });
284154
284321
  }
284155
284322
  toString() {
284156
- return `Configurations:
284157
- oidc client id: ${this.oidcClientId},
284158
- oidc scopes: ${this.oidcScopes},
284159
- applicationId: ${this.gprid},
284323
+ return `Configurations:
284324
+ oidc client id: ${this.oidcClientId},
284325
+ oidc scopes: ${this.oidcScopes},
284326
+ applicationId: ${this.gprid},
284160
284327
  log level: ${this.logLevel}`;
284161
284328
  }
284162
284329
  }
@@ -293539,7 +293706,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
293539
293706
  /***/ ((module) => {
293540
293707
 
293541
293708
  "use strict";
293542
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.6.0-dev.1","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.6.0-dev.1","@itwin/core-bentley":"workspace:^4.6.0-dev.1","@itwin/core-common":"workspace:^4.6.0-dev.1","@itwin/core-geometry":"workspace:^4.6.0-dev.1","@itwin/core-orbitgt":"workspace:^4.6.0-dev.1","@itwin/core-quantity":"workspace:^4.6.0-dev.1"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
293709
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.6.0-dev.5","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.6.0-dev.5","@itwin/core-bentley":"workspace:^4.6.0-dev.5","@itwin/core-common":"workspace:^4.6.0-dev.5","@itwin/core-geometry":"workspace:^4.6.0-dev.5","@itwin/core-orbitgt":"workspace:^4.6.0-dev.5","@itwin/core-quantity":"workspace:^4.6.0-dev.5"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.0.2","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
293543
293710
 
293544
293711
  /***/ })
293545
293712