@itwin/ecschema-rpcinterface-tests 4.6.0-dev.1 → 4.6.0-dev.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +343 -145
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js +698 -0
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -0
- package/package.json +16 -16
|
@@ -22128,10 +22128,12 @@ class BeEventList {
|
|
|
22128
22128
|
"use strict";
|
|
22129
22129
|
__webpack_require__.r(__webpack_exports__);
|
|
22130
22130
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
22131
|
+
/* harmony export */ "DbChangeStage": () => (/* binding */ DbChangeStage),
|
|
22131
22132
|
/* harmony export */ "DbConflictCause": () => (/* binding */ DbConflictCause),
|
|
22132
22133
|
/* harmony export */ "DbConflictResolution": () => (/* binding */ DbConflictResolution),
|
|
22133
22134
|
/* harmony export */ "DbOpcode": () => (/* binding */ DbOpcode),
|
|
22134
22135
|
/* harmony export */ "DbResult": () => (/* binding */ DbResult),
|
|
22136
|
+
/* harmony export */ "DbValueType": () => (/* binding */ DbValueType),
|
|
22135
22137
|
/* harmony export */ "OpenMode": () => (/* binding */ OpenMode)
|
|
22136
22138
|
/* harmony export */ });
|
|
22137
22139
|
/*---------------------------------------------------------------------------------------------
|
|
@@ -22161,6 +22163,25 @@ var DbOpcode;
|
|
|
22161
22163
|
/** Some columns of an existing row were updated. */
|
|
22162
22164
|
DbOpcode[DbOpcode["Update"] = 23] = "Update";
|
|
22163
22165
|
})(DbOpcode || (DbOpcode = {}));
|
|
22166
|
+
/** Change value stage.
|
|
22167
|
+
* @internal
|
|
22168
|
+
*/
|
|
22169
|
+
var DbChangeStage;
|
|
22170
|
+
(function (DbChangeStage) {
|
|
22171
|
+
DbChangeStage[DbChangeStage["Old"] = 0] = "Old";
|
|
22172
|
+
DbChangeStage[DbChangeStage["New"] = 1] = "New";
|
|
22173
|
+
})(DbChangeStage || (DbChangeStage = {}));
|
|
22174
|
+
/** Change value type.
|
|
22175
|
+
* @internal
|
|
22176
|
+
*/
|
|
22177
|
+
var DbValueType;
|
|
22178
|
+
(function (DbValueType) {
|
|
22179
|
+
DbValueType[DbValueType["IntegerVal"] = 1] = "IntegerVal";
|
|
22180
|
+
DbValueType[DbValueType["FloatVal"] = 2] = "FloatVal";
|
|
22181
|
+
DbValueType[DbValueType["TextVal"] = 3] = "TextVal";
|
|
22182
|
+
DbValueType[DbValueType["BlobVal"] = 4] = "BlobVal";
|
|
22183
|
+
DbValueType[DbValueType["NullVal"] = 5] = "NullVal";
|
|
22184
|
+
})(DbValueType || (DbValueType = {}));
|
|
22164
22185
|
/** Cause of conflict when applying a changeset
|
|
22165
22186
|
* @internal
|
|
22166
22187
|
*/
|
|
@@ -28325,10 +28346,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28325
28346
|
/* harmony export */ "ByteStream": () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
|
|
28326
28347
|
/* harmony export */ "ChangeSetStatus": () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
|
|
28327
28348
|
/* harmony export */ "CompressedId64Set": () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
|
|
28349
|
+
/* harmony export */ "DbChangeStage": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbChangeStage),
|
|
28328
28350
|
/* harmony export */ "DbConflictCause": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbConflictCause),
|
|
28329
28351
|
/* harmony export */ "DbConflictResolution": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbConflictResolution),
|
|
28330
28352
|
/* harmony export */ "DbOpcode": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
|
|
28331
28353
|
/* harmony export */ "DbResult": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
|
|
28354
|
+
/* harmony export */ "DbValueType": () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbValueType),
|
|
28332
28355
|
/* harmony export */ "Dictionary": () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
|
|
28333
28356
|
/* harmony export */ "DisposableList": () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
|
|
28334
28357
|
/* harmony export */ "DuplicatePolicy": () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_26__.DuplicatePolicy),
|
|
@@ -64222,23 +64245,25 @@ var ECClassModifier;
|
|
|
64222
64245
|
ECClassModifier[ECClassModifier["Abstract"] = 1] = "Abstract";
|
|
64223
64246
|
ECClassModifier[ECClassModifier["Sealed"] = 2] = "Sealed";
|
|
64224
64247
|
})(ECClassModifier = exports.ECClassModifier || (exports.ECClassModifier = {}));
|
|
64225
|
-
/**
|
|
64248
|
+
/**
|
|
64249
|
+
* An enumeration that has all the schema item type names as values
|
|
64250
|
+
* @beta */
|
|
64226
64251
|
var SchemaItemType;
|
|
64227
64252
|
(function (SchemaItemType) {
|
|
64228
|
-
SchemaItemType[
|
|
64229
|
-
SchemaItemType[
|
|
64230
|
-
SchemaItemType[
|
|
64231
|
-
SchemaItemType[
|
|
64232
|
-
SchemaItemType[
|
|
64233
|
-
SchemaItemType[
|
|
64234
|
-
SchemaItemType[
|
|
64235
|
-
SchemaItemType[
|
|
64236
|
-
SchemaItemType[
|
|
64237
|
-
SchemaItemType[
|
|
64238
|
-
SchemaItemType[
|
|
64239
|
-
SchemaItemType[
|
|
64240
|
-
SchemaItemType[
|
|
64241
|
-
SchemaItemType[
|
|
64253
|
+
SchemaItemType["EntityClass"] = "EntityClass";
|
|
64254
|
+
SchemaItemType["Mixin"] = "Mixin";
|
|
64255
|
+
SchemaItemType["StructClass"] = "StructClass";
|
|
64256
|
+
SchemaItemType["CustomAttributeClass"] = "CustomAttributeClass";
|
|
64257
|
+
SchemaItemType["RelationshipClass"] = "RelationshipClass";
|
|
64258
|
+
SchemaItemType["Enumeration"] = "Enumeration";
|
|
64259
|
+
SchemaItemType["KindOfQuantity"] = "KindOfQuantity";
|
|
64260
|
+
SchemaItemType["PropertyCategory"] = "PropertyCategory";
|
|
64261
|
+
SchemaItemType["Unit"] = "Unit";
|
|
64262
|
+
SchemaItemType["InvertedUnit"] = "InvertedUnit";
|
|
64263
|
+
SchemaItemType["Constant"] = "Constant";
|
|
64264
|
+
SchemaItemType["Phenomenon"] = "Phenomenon";
|
|
64265
|
+
SchemaItemType["UnitSystem"] = "UnitSystem";
|
|
64266
|
+
SchemaItemType["Format"] = "Format";
|
|
64242
64267
|
})(SchemaItemType = exports.SchemaItemType || (exports.SchemaItemType = {}));
|
|
64243
64268
|
/**
|
|
64244
64269
|
* Primitive data types for ECProperties.
|
|
@@ -64380,25 +64405,10 @@ exports.parseSchemaItemType = parseSchemaItemType;
|
|
|
64380
64405
|
* @param value The SchemaItemType to stringify.
|
|
64381
64406
|
* @return A string representing the provided SchemaItemType. If the type is not valid, an empty string is returned.
|
|
64382
64407
|
* @beta
|
|
64408
|
+
* @deprecated in 4.6.0 SchemaItemType is a string enum so just use it directly
|
|
64383
64409
|
*/
|
|
64384
64410
|
function schemaItemTypeToString(value) {
|
|
64385
|
-
|
|
64386
|
-
case SchemaItemType.EntityClass: return "EntityClass";
|
|
64387
|
-
case SchemaItemType.Mixin: return "Mixin";
|
|
64388
|
-
case SchemaItemType.StructClass: return "StructClass";
|
|
64389
|
-
case SchemaItemType.CustomAttributeClass: return "CustomAttributeClass";
|
|
64390
|
-
case SchemaItemType.RelationshipClass: return "RelationshipClass";
|
|
64391
|
-
case SchemaItemType.Enumeration: return "Enumeration";
|
|
64392
|
-
case SchemaItemType.KindOfQuantity: return "KindOfQuantity";
|
|
64393
|
-
case SchemaItemType.PropertyCategory: return "PropertyCategory";
|
|
64394
|
-
case SchemaItemType.Unit: return "Unit";
|
|
64395
|
-
case SchemaItemType.InvertedUnit: return "InvertedUnit";
|
|
64396
|
-
case SchemaItemType.Constant: return "Constant";
|
|
64397
|
-
case SchemaItemType.Phenomenon: return "Phenomenon";
|
|
64398
|
-
case SchemaItemType.UnitSystem: return "UnitSystem";
|
|
64399
|
-
case SchemaItemType.Format: return "Format";
|
|
64400
|
-
default: throw new Exception_1.ECObjectsError(Exception_1.ECObjectsStatus.InvalidSchemaItemType, "An invalid SchemaItemType has been provided.");
|
|
64401
|
-
}
|
|
64411
|
+
return value; // TODO: Remove
|
|
64402
64412
|
}
|
|
64403
64413
|
exports.schemaItemTypeToString = schemaItemTypeToString;
|
|
64404
64414
|
/** @internal */
|
|
@@ -65390,7 +65400,7 @@ class Constant extends SchemaItem_1.SchemaItem {
|
|
|
65390
65400
|
* @param standalone Serialization includes only this object (as opposed to the full schema).
|
|
65391
65401
|
* @param includeSchemaVersion Include the Schema's version information in the serialized object.
|
|
65392
65402
|
*/
|
|
65393
|
-
toJSON(standalone, includeSchemaVersion) {
|
|
65403
|
+
toJSON(standalone = false, includeSchemaVersion = false) {
|
|
65394
65404
|
const schemaJson = super.toJSON(standalone, includeSchemaVersion);
|
|
65395
65405
|
if (this.phenomenon !== undefined)
|
|
65396
65406
|
schemaJson.phenomenon = this.phenomenon.fullName;
|
|
@@ -66594,6 +66604,13 @@ class KindOfQuantity extends SchemaItem_1.SchemaItem {
|
|
|
66594
66604
|
if (undefined !== kindOfQuantityProps.presentationUnits)
|
|
66595
66605
|
await this.processPresentationUnits(kindOfQuantityProps.presentationUnits);
|
|
66596
66606
|
}
|
|
66607
|
+
/**
|
|
66608
|
+
* @alpha
|
|
66609
|
+
* Used for schema editing.
|
|
66610
|
+
*/
|
|
66611
|
+
setRelativeError(relativeError) {
|
|
66612
|
+
this._relativeError = relativeError;
|
|
66613
|
+
}
|
|
66597
66614
|
}
|
|
66598
66615
|
exports.KindOfQuantity = KindOfQuantity;
|
|
66599
66616
|
/**
|
|
@@ -68531,6 +68548,20 @@ class Schema {
|
|
|
68531
68548
|
const schema = object;
|
|
68532
68549
|
return schema !== undefined && schema.schemaKey !== undefined && schema.context !== undefined;
|
|
68533
68550
|
}
|
|
68551
|
+
/**
|
|
68552
|
+
* @alpha
|
|
68553
|
+
* Used for schema editing.
|
|
68554
|
+
*/
|
|
68555
|
+
setDisplayLabel(displayLabel) {
|
|
68556
|
+
this._label = displayLabel;
|
|
68557
|
+
}
|
|
68558
|
+
/**
|
|
68559
|
+
* @alpha
|
|
68560
|
+
* Used for schema editing.
|
|
68561
|
+
*/
|
|
68562
|
+
setDescription(description) {
|
|
68563
|
+
this._description = description;
|
|
68564
|
+
}
|
|
68534
68565
|
}
|
|
68535
68566
|
exports.Schema = Schema;
|
|
68536
68567
|
/**
|
|
@@ -68596,7 +68627,7 @@ class SchemaItem {
|
|
|
68596
68627
|
if (includeSchemaVersion) // check flag to see if we should output version
|
|
68597
68628
|
itemJson.schemaVersion = this.key.schemaKey.version.toString();
|
|
68598
68629
|
}
|
|
68599
|
-
itemJson.schemaItemType =
|
|
68630
|
+
itemJson.schemaItemType = this.schemaItemType;
|
|
68600
68631
|
if (undefined !== this.label)
|
|
68601
68632
|
itemJson.label = this.label;
|
|
68602
68633
|
if (undefined !== this.description)
|
|
@@ -100787,6 +100818,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100787
100818
|
/* harmony export */ "createSurfaceMaterial": () => (/* reexport safe */ _common_render_primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_26__.createSurfaceMaterial),
|
|
100788
100819
|
/* harmony export */ "createWorkerProxy": () => (/* reexport safe */ _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_32__.createWorkerProxy),
|
|
100789
100820
|
/* harmony export */ "decodeImdlGraphics": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.decodeImdlGraphics),
|
|
100821
|
+
/* harmony export */ "decodeMeshoptBuffer": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.decodeMeshoptBuffer),
|
|
100790
100822
|
/* harmony export */ "disposeTileTreesForGeometricModels": () => (/* reexport safe */ _tile_internal__WEBPACK_IMPORTED_MODULE_143__.disposeTileTreesForGeometricModels),
|
|
100791
100823
|
/* harmony export */ "edgeParamsFromImdl": () => (/* reexport safe */ _common_imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_16__.edgeParamsFromImdl),
|
|
100792
100824
|
/* harmony export */ "extractImageSourceDimensions": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_13__.extractImageSourceDimensions),
|
|
@@ -139484,11 +139516,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
139484
139516
|
/* harmony import */ var _render_RealityMeshParams__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../render/RealityMeshParams */ "../../core/frontend/lib/esm/render/RealityMeshParams.js");
|
|
139485
139517
|
/* 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
139518
|
/* 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
|
|
139488
|
-
/* harmony import */ var
|
|
139489
|
-
/* harmony import */ var
|
|
139490
|
-
/* harmony import */ var
|
|
139491
|
-
/* harmony import */ var
|
|
139519
|
+
/* harmony import */ var _internal__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
139520
|
+
/* 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");
|
|
139521
|
+
/* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
|
|
139522
|
+
/* harmony import */ var _common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../common/ImageUtil */ "../../core/frontend/lib/esm/common/ImageUtil.js");
|
|
139523
|
+
/* 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");
|
|
139524
|
+
/* harmony import */ var _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../common/gltf/GltfSchema */ "../../core/frontend/lib/esm/common/gltf/GltfSchema.js");
|
|
139492
139525
|
/*---------------------------------------------------------------------------------------------
|
|
139493
139526
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
139494
139527
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -139509,6 +139542,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
139509
139542
|
|
|
139510
139543
|
|
|
139511
139544
|
|
|
139545
|
+
|
|
139512
139546
|
/**
|
|
139513
139547
|
* A chunk of binary data exposed as a typed array.
|
|
139514
139548
|
* The count member indicates how many elements exist. This may be less than this.buffer.length due to padding added to the
|
|
@@ -139529,15 +139563,15 @@ class GltfBufferData {
|
|
|
139529
139563
|
if (expectedType !== actualType) {
|
|
139530
139564
|
// Some data is stored in smaller data types to save space if no values exceed the maximum of the smaller type.
|
|
139531
139565
|
switch (expectedType) {
|
|
139532
|
-
case
|
|
139533
|
-
case
|
|
139566
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
|
|
139567
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
|
|
139534
139568
|
return undefined;
|
|
139535
|
-
case
|
|
139536
|
-
if (
|
|
139569
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
|
|
139570
|
+
if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== actualType)
|
|
139537
139571
|
return undefined;
|
|
139538
139572
|
break;
|
|
139539
|
-
case
|
|
139540
|
-
if (
|
|
139573
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
|
|
139574
|
+
if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== actualType && _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort !== actualType)
|
|
139541
139575
|
return undefined;
|
|
139542
139576
|
break;
|
|
139543
139577
|
}
|
|
@@ -139549,13 +139583,13 @@ class GltfBufferData {
|
|
|
139549
139583
|
// NB: Endianness of typed array data is determined by the 'platform byte order'. Actual data is always little-endian.
|
|
139550
139584
|
// We are assuming little-endian platform. If we find a big-endian platform, we'll need to use a DataView instead.
|
|
139551
139585
|
switch (actualType) {
|
|
139552
|
-
case
|
|
139586
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
|
|
139553
139587
|
return bytes;
|
|
139554
|
-
case
|
|
139588
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
|
|
139555
139589
|
return new Uint16Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 2);
|
|
139556
|
-
case
|
|
139590
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
|
|
139557
139591
|
return new Uint32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
|
|
139558
|
-
case
|
|
139592
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
|
|
139559
139593
|
return new Float32Array(bytes.buffer, bytes.byteOffset, bytes.byteLength / 4);
|
|
139560
139594
|
default:
|
|
139561
139595
|
return undefined;
|
|
@@ -139682,7 +139716,7 @@ function colorFromJson(values) {
|
|
|
139682
139716
|
}
|
|
139683
139717
|
function colorFromMaterial(material, isTransparent) {
|
|
139684
139718
|
let color = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white;
|
|
139685
|
-
if ((0,
|
|
139719
|
+
if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material)) {
|
|
139686
139720
|
if (material.values?.color && Array.isArray(material.values.color))
|
|
139687
139721
|
color = colorFromJson(material.values.color);
|
|
139688
139722
|
}
|
|
@@ -139773,7 +139807,7 @@ class GltfReader {
|
|
|
139773
139807
|
* @throws Error if a node appears more than once during traversal
|
|
139774
139808
|
*/
|
|
139775
139809
|
traverseNodes(nodeIds) {
|
|
139776
|
-
return (0,
|
|
139810
|
+
return (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.traverseGltfNodes)(nodeIds, this._nodes, new Set());
|
|
139777
139811
|
}
|
|
139778
139812
|
/** Traverse the nodes specified by their scene, recursing into their child nodes.
|
|
139779
139813
|
* @throws Error if a node appears more than once during traversal
|
|
@@ -139898,9 +139932,9 @@ class GltfReader {
|
|
|
139898
139932
|
return undefined;
|
|
139899
139933
|
}
|
|
139900
139934
|
const translationsView = this.getBufferView(ext.attributes, "TRANSLATION");
|
|
139901
|
-
const translations = translationsView?.toBufferData(
|
|
139902
|
-
const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(
|
|
139903
|
-
const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(
|
|
139935
|
+
const translations = translationsView?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
139936
|
+
const rotations = this.getBufferView(ext.attributes, "ROTATION")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
139937
|
+
const scales = this.getBufferView(ext.attributes, "SCALE")?.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
139904
139938
|
// All attributes must specify the same count, count must be greater than zero, and at least one attribute must be specified.
|
|
139905
139939
|
const count = translations?.count ?? rotations?.count ?? scales?.count;
|
|
139906
139940
|
if (!count || (rotations && rotations.count !== count) || (scales && scales.count !== count)) {
|
|
@@ -139973,7 +140007,7 @@ class GltfReader {
|
|
|
139973
140007
|
let thisBias;
|
|
139974
140008
|
if (undefined !== pseudoRtcBias)
|
|
139975
140009
|
thisBias = (undefined === thisTransform) ? pseudoRtcBias : thisTransform.matrix.multiplyInverse(pseudoRtcBias);
|
|
139976
|
-
for (const meshKey of (0,
|
|
140010
|
+
for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
|
|
139977
140011
|
const nodeMesh = this._meshes[meshKey];
|
|
139978
140012
|
if (nodeMesh?.primitives) {
|
|
139979
140013
|
const meshes = this.readMeshPrimitives(node, featureTable, thisTransform, thisBias, nodeInstances);
|
|
@@ -140072,23 +140106,28 @@ class GltfReader {
|
|
|
140072
140106
|
return undefined;
|
|
140073
140107
|
const bufferViewAccessorValue = accessor.bufferView;
|
|
140074
140108
|
const bufferView = undefined !== bufferViewAccessorValue ? this._bufferViews[bufferViewAccessorValue] : undefined;
|
|
140075
|
-
if (!bufferView
|
|
140109
|
+
if (!bufferView)
|
|
140076
140110
|
return undefined;
|
|
140077
|
-
|
|
140078
|
-
|
|
140111
|
+
let bufferData = bufferView.resolvedBuffer;
|
|
140112
|
+
if (!bufferData) {
|
|
140113
|
+
if (undefined === bufferView.buffer)
|
|
140114
|
+
return undefined;
|
|
140115
|
+
const buffer = this._buffers[bufferView.buffer];
|
|
140116
|
+
bufferData = buffer?.resolvedBuffer;
|
|
140117
|
+
}
|
|
140079
140118
|
if (!bufferData)
|
|
140080
140119
|
return undefined;
|
|
140081
140120
|
const type = accessor.componentType;
|
|
140082
140121
|
let dataSize = 0;
|
|
140083
140122
|
switch (type) {
|
|
140084
|
-
case
|
|
140123
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
|
|
140085
140124
|
dataSize = 1;
|
|
140086
140125
|
break;
|
|
140087
|
-
case
|
|
140126
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort:
|
|
140088
140127
|
dataSize = 2;
|
|
140089
140128
|
break;
|
|
140090
|
-
case
|
|
140091
|
-
case
|
|
140129
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32:
|
|
140130
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float:
|
|
140092
140131
|
dataSize = 4;
|
|
140093
140132
|
break;
|
|
140094
140133
|
default:
|
|
@@ -140118,10 +140157,10 @@ class GltfReader {
|
|
|
140118
140157
|
return undefined;
|
|
140119
140158
|
}
|
|
140120
140159
|
}
|
|
140121
|
-
readBufferData32(json, accessorName) { return this.readBufferData(json, accessorName,
|
|
140122
|
-
readBufferData16(json, accessorName) { return this.readBufferData(json, accessorName,
|
|
140123
|
-
readBufferData8(json, accessorName) { return this.readBufferData(json, accessorName,
|
|
140124
|
-
readBufferDataFloat(json, accessorName) { return this.readBufferData(json, accessorName,
|
|
140160
|
+
readBufferData32(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UInt32); }
|
|
140161
|
+
readBufferData16(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort); }
|
|
140162
|
+
readBufferData8(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte); }
|
|
140163
|
+
readBufferDataFloat(json, accessorName) { return this.readBufferData(json, accessorName, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float); }
|
|
140125
140164
|
constructor(args) {
|
|
140126
140165
|
this._resolvedTextures = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => compareTextureKeys(lhs, rhs));
|
|
140127
140166
|
this._dracoMeshes = new Map();
|
|
@@ -140131,7 +140170,7 @@ class GltfReader {
|
|
|
140131
140170
|
* (We also don't want to produce mip-maps for them, which is determined indirectly from the wrap mode).
|
|
140132
140171
|
* Allow the default to be optionally overridden.
|
|
140133
140172
|
*/
|
|
140134
|
-
this.defaultWrapMode =
|
|
140173
|
+
this.defaultWrapMode = _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.Repeat;
|
|
140135
140174
|
this._glTF = args.props.glTF;
|
|
140136
140175
|
this._version = args.props.version;
|
|
140137
140176
|
this._yAxisUp = args.props.yAxisUp;
|
|
@@ -140183,7 +140222,7 @@ class GltfReader {
|
|
|
140183
140222
|
if (typeof material !== "object")
|
|
140184
140223
|
return undefined;
|
|
140185
140224
|
// Bimium's shader value...almost certainly obsolete at this point.
|
|
140186
|
-
if ((0,
|
|
140225
|
+
if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
|
|
140187
140226
|
return material.diffuse ?? this.extractId(material.values?.tex);
|
|
140188
140227
|
// KHR_techniques_webgl extension
|
|
140189
140228
|
const techniques = this._glTF.extensions?.KHR_techniques_webgl?.techniques;
|
|
@@ -140193,7 +140232,7 @@ class GltfReader {
|
|
|
140193
140232
|
if (typeof uniforms === "object") {
|
|
140194
140233
|
for (const uniformName of Object.keys(uniforms)) {
|
|
140195
140234
|
const uniform = uniforms[uniformName];
|
|
140196
|
-
if (typeof uniform === "object" && uniform.type ===
|
|
140235
|
+
if (typeof uniform === "object" && uniform.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Sampler2d)
|
|
140197
140236
|
return this.extractId(ext.values[uniformName]?.index);
|
|
140198
140237
|
}
|
|
140199
140238
|
}
|
|
@@ -140204,15 +140243,15 @@ class GltfReader {
|
|
|
140204
140243
|
extractNormalMapId(material) {
|
|
140205
140244
|
if (typeof material !== "object")
|
|
140206
140245
|
return undefined;
|
|
140207
|
-
if ((0,
|
|
140246
|
+
if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
|
|
140208
140247
|
return undefined;
|
|
140209
140248
|
return this.extractId(material.normalTexture?.index);
|
|
140210
140249
|
}
|
|
140211
140250
|
isMaterialTransparent(material) {
|
|
140212
|
-
if ((0,
|
|
140251
|
+
if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material)) {
|
|
140213
140252
|
if (this._glTF.techniques && undefined !== material.technique) {
|
|
140214
140253
|
const technique = this._glTF.techniques[material.technique];
|
|
140215
|
-
if (technique?.states?.enable?.some((state) => state ===
|
|
140254
|
+
if (technique?.states?.enable?.some((state) => state === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfTechniqueState.Blend))
|
|
140216
140255
|
return true;
|
|
140217
140256
|
}
|
|
140218
140257
|
return false;
|
|
@@ -140236,11 +140275,11 @@ class GltfReader {
|
|
|
140236
140275
|
// DisplayParams doesn't want a separate texture mapping if the material already has one.
|
|
140237
140276
|
textureMapping = undefined;
|
|
140238
140277
|
}
|
|
140239
|
-
return new
|
|
140278
|
+
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
140279
|
}
|
|
140241
140280
|
readMeshPrimitives(node, featureTable, thisTransform, thisBias, instances) {
|
|
140242
140281
|
const meshes = [];
|
|
140243
|
-
for (const meshKey of (0,
|
|
140282
|
+
for (const meshKey of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
|
|
140244
140283
|
const nodeMesh = this._meshes[meshKey];
|
|
140245
140284
|
if (nodeMesh?.primitives) {
|
|
140246
140285
|
for (const primitive of nodeMesh.primitives) {
|
|
@@ -140280,9 +140319,9 @@ class GltfReader {
|
|
|
140280
140319
|
return meshes;
|
|
140281
140320
|
}
|
|
140282
140321
|
readMeshPrimitive(primitive, featureTable, pseudoRtcBias) {
|
|
140283
|
-
const meshMode = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(primitive.mode,
|
|
140284
|
-
if (meshMode ===
|
|
140285
|
-
const pointCloud = this.
|
|
140322
|
+
const meshMode = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(primitive.mode, _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Triangles);
|
|
140323
|
+
if (meshMode === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Points /* && !this._vertexTableRequired */) {
|
|
140324
|
+
const pointCloud = this.readPointCloud2(primitive, undefined !== featureTable);
|
|
140286
140325
|
if (pointCloud)
|
|
140287
140326
|
return pointCloud;
|
|
140288
140327
|
}
|
|
@@ -140296,14 +140335,14 @@ class GltfReader {
|
|
|
140296
140335
|
return undefined;
|
|
140297
140336
|
let primitiveType = -1;
|
|
140298
140337
|
switch (meshMode) {
|
|
140299
|
-
case
|
|
140300
|
-
primitiveType =
|
|
140338
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Lines:
|
|
140339
|
+
primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Polyline;
|
|
140301
140340
|
break;
|
|
140302
|
-
case
|
|
140303
|
-
primitiveType =
|
|
140341
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Points:
|
|
140342
|
+
primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point;
|
|
140304
140343
|
break;
|
|
140305
|
-
case
|
|
140306
|
-
primitiveType =
|
|
140344
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfMeshMode.Triangles:
|
|
140345
|
+
primitiveType = _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Mesh;
|
|
140307
140346
|
break;
|
|
140308
140347
|
default:
|
|
140309
140348
|
return undefined;
|
|
@@ -140331,7 +140370,7 @@ class GltfReader {
|
|
|
140331
140370
|
const colorIndices = this.readBufferData16(primitive.attributes, "_COLORINDEX");
|
|
140332
140371
|
if (undefined !== colorIndices && material) {
|
|
140333
140372
|
let texStep;
|
|
140334
|
-
if ((0,
|
|
140373
|
+
if ((0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material))
|
|
140335
140374
|
texStep = material.values?.texStep;
|
|
140336
140375
|
else
|
|
140337
140376
|
texStep = material.extensions?.KHR_techniques_webgl?.values?.u_texStep;
|
|
@@ -140361,14 +140400,14 @@ class GltfReader {
|
|
|
140361
140400
|
if (!this.readVertices(mesh, primitive, pseudoRtcBias))
|
|
140362
140401
|
return undefined;
|
|
140363
140402
|
switch (primitiveType) {
|
|
140364
|
-
case
|
|
140403
|
+
case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Mesh: {
|
|
140365
140404
|
if (!this.readMeshIndices(mesh, primitive))
|
|
140366
140405
|
return undefined;
|
|
140367
140406
|
if (!displayParams.ignoreLighting && !this.readNormals(mesh, primitive.attributes, "NORMAL"))
|
|
140368
140407
|
return undefined;
|
|
140369
140408
|
if (!mesh.uvs) {
|
|
140370
140409
|
let texCoordIndex = 0;
|
|
140371
|
-
if (!(0,
|
|
140410
|
+
if (!(0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.isGltf1Material)(material) && undefined !== material.pbrMetallicRoughness?.baseColorTexture?.texCoord)
|
|
140372
140411
|
texCoordIndex = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(material.pbrMetallicRoughness.baseColorTexture.texCoord);
|
|
140373
140412
|
this.readUVParams(mesh, primitive.attributes, `TEXCOORD_${texCoordIndex}`);
|
|
140374
140413
|
}
|
|
@@ -140376,9 +140415,9 @@ class GltfReader {
|
|
|
140376
140415
|
return undefined;
|
|
140377
140416
|
break;
|
|
140378
140417
|
}
|
|
140379
|
-
case
|
|
140380
|
-
case
|
|
140381
|
-
if (undefined !== mesh.primitive.polylines && !this.readPolylines(mesh.primitive.polylines, primitive, "indices",
|
|
140418
|
+
case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Polyline:
|
|
140419
|
+
case _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point: {
|
|
140420
|
+
if (undefined !== mesh.primitive.polylines && !this.readPolylines(mesh.primitive.polylines, primitive, "indices", _common_render_primitives_MeshPrimitive__WEBPACK_IMPORTED_MODULE_12__.MeshPrimitiveType.Point === primitiveType))
|
|
140382
140421
|
return undefined;
|
|
140383
140422
|
break;
|
|
140384
140423
|
}
|
|
@@ -140400,23 +140439,60 @@ class GltfReader {
|
|
|
140400
140439
|
}
|
|
140401
140440
|
return mesh;
|
|
140402
140441
|
}
|
|
140403
|
-
|
|
140442
|
+
readPointCloud2(primitive, hasFeatures) {
|
|
140443
|
+
let pointRange;
|
|
140444
|
+
let positions;
|
|
140445
|
+
let qparams;
|
|
140404
140446
|
const posView = this.getBufferView(primitive.attributes, "POSITION");
|
|
140405
|
-
|
|
140406
|
-
|
|
140407
|
-
|
|
140408
|
-
|
|
140409
|
-
|
|
140447
|
+
switch (posView?.type) {
|
|
140448
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
|
|
140449
|
+
const posData = posView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
140450
|
+
if (!(posData?.buffer instanceof Float32Array)) {
|
|
140451
|
+
return undefined;
|
|
140452
|
+
}
|
|
140453
|
+
positions = posData.buffer;
|
|
140454
|
+
const strideSkip = posView.stride - 3;
|
|
140455
|
+
pointRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
|
|
140456
|
+
for (let i = 0; i < positions.length; i += strideSkip) {
|
|
140457
|
+
pointRange.extendXYZ(positions[i++], positions[i++], positions[i++]);
|
|
140458
|
+
}
|
|
140459
|
+
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));
|
|
140460
|
+
break;
|
|
140461
|
+
}
|
|
140462
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte:
|
|
140463
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort: {
|
|
140464
|
+
const posData = posView.toBufferData(posView.type);
|
|
140465
|
+
if (!(posData?.buffer instanceof Uint8Array || posData?.buffer instanceof Uint16Array)) {
|
|
140466
|
+
return undefined;
|
|
140467
|
+
}
|
|
140468
|
+
positions = posData.buffer;
|
|
140469
|
+
let min, max;
|
|
140470
|
+
const ext = posView.accessor.extensions?.WEB3D_quantized_attributes;
|
|
140471
|
+
if (ext) {
|
|
140472
|
+
min = ext.decodedMin;
|
|
140473
|
+
max = ext.decodedMax;
|
|
140474
|
+
}
|
|
140475
|
+
else {
|
|
140476
|
+
// Assume KHR_mesh_quantization...
|
|
140477
|
+
min = posView.accessor.min;
|
|
140478
|
+
max = posView.accessor.max;
|
|
140479
|
+
}
|
|
140480
|
+
if (undefined === min || undefined === max) {
|
|
140481
|
+
return undefined;
|
|
140482
|
+
}
|
|
140483
|
+
pointRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createXYZXYZ(min[0], min[1], min[2], max[0], max[1], max[2]);
|
|
140484
|
+
qparams = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.QParams3d.fromRange(pointRange);
|
|
140485
|
+
break;
|
|
140486
|
+
}
|
|
140487
|
+
default:
|
|
140488
|
+
return undefined;
|
|
140489
|
+
}
|
|
140410
140490
|
const colorView = this.getBufferView(primitive.attributes, "COLOR_0");
|
|
140411
|
-
if (!colorView ||
|
|
140491
|
+
if (!colorView || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte !== colorView.type)
|
|
140412
140492
|
return undefined;
|
|
140413
|
-
const colorData = colorView.toBufferData(
|
|
140493
|
+
const colorData = colorView.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte);
|
|
140414
140494
|
if (!(colorData?.buffer instanceof Uint8Array))
|
|
140415
140495
|
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
140496
|
let colors = colorData.buffer;
|
|
140421
140497
|
if ("VEC4" === colorView.accessor.type) {
|
|
140422
140498
|
// ###TODO support transparent point clouds
|
|
@@ -140429,13 +140505,14 @@ class GltfReader {
|
|
|
140429
140505
|
}
|
|
140430
140506
|
}
|
|
140431
140507
|
const features = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FeatureIndex();
|
|
140432
|
-
if (hasFeatures)
|
|
140508
|
+
if (hasFeatures) {
|
|
140433
140509
|
features.type = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FeatureIndexType.Uniform;
|
|
140510
|
+
}
|
|
140434
140511
|
this._containsPointCloud = true;
|
|
140435
140512
|
return {
|
|
140436
140513
|
type: "pointcloud",
|
|
140437
|
-
positions
|
|
140438
|
-
qparams
|
|
140514
|
+
positions,
|
|
140515
|
+
qparams,
|
|
140439
140516
|
pointRange,
|
|
140440
140517
|
colors,
|
|
140441
140518
|
colorFormat: "rgb",
|
|
@@ -140542,8 +140619,8 @@ class GltfReader {
|
|
|
140542
140619
|
const view = this.getBufferView(primitive.attributes, "POSITION");
|
|
140543
140620
|
if (undefined === view)
|
|
140544
140621
|
return false;
|
|
140545
|
-
if (
|
|
140546
|
-
const buffer = view.toBufferData(
|
|
140622
|
+
if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float === view.type) {
|
|
140623
|
+
const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
140547
140624
|
if (undefined === buffer)
|
|
140548
140625
|
return false;
|
|
140549
140626
|
const strideSkip = view.stride - 3;
|
|
@@ -140562,15 +140639,23 @@ class GltfReader {
|
|
|
140562
140639
|
mesh.points = positions.toTypedArray();
|
|
140563
140640
|
}
|
|
140564
140641
|
else {
|
|
140565
|
-
if (
|
|
140642
|
+
if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort !== view.type)
|
|
140566
140643
|
return false;
|
|
140644
|
+
let rangeMin, rangeMax;
|
|
140567
140645
|
const quantized = view.accessor.extensions?.WEB3D_quantized_attributes;
|
|
140568
|
-
|
|
140569
|
-
|
|
140570
|
-
|
|
140646
|
+
if (quantized) {
|
|
140647
|
+
rangeMin = quantized.decodedMin;
|
|
140648
|
+
rangeMax = quantized.decodedMax;
|
|
140649
|
+
}
|
|
140650
|
+
else {
|
|
140651
|
+
// Assume KHR_mesh_quantization...
|
|
140652
|
+
rangeMin = view.accessor.min;
|
|
140653
|
+
rangeMax = view.accessor.max;
|
|
140654
|
+
}
|
|
140655
|
+
if (undefined === rangeMin || undefined === rangeMax) // required by spec...
|
|
140571
140656
|
return false;
|
|
140572
140657
|
// ###TODO apply WEB3D_quantized_attributes.decodeMatrix? Have not encountered in the wild; glTF 1.0 only.
|
|
140573
|
-
const buffer = view.toBufferData(
|
|
140658
|
+
const buffer = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort);
|
|
140574
140659
|
if (undefined === buffer || !(buffer.buffer instanceof Uint16Array))
|
|
140575
140660
|
return false;
|
|
140576
140661
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(buffer.buffer instanceof Uint16Array);
|
|
@@ -140632,8 +140717,8 @@ class GltfReader {
|
|
|
140632
140717
|
if (undefined === view)
|
|
140633
140718
|
return false;
|
|
140634
140719
|
switch (view.type) {
|
|
140635
|
-
case
|
|
140636
|
-
const data = view.toBufferData(
|
|
140720
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
|
|
140721
|
+
const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float);
|
|
140637
140722
|
if (undefined === data)
|
|
140638
140723
|
return false;
|
|
140639
140724
|
mesh.normals = new Uint16Array(data.count);
|
|
@@ -140645,8 +140730,8 @@ class GltfReader {
|
|
|
140645
140730
|
}
|
|
140646
140731
|
return true;
|
|
140647
140732
|
}
|
|
140648
|
-
case
|
|
140649
|
-
const data = view.toBufferData(
|
|
140733
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte: {
|
|
140734
|
+
const data = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedByte);
|
|
140650
140735
|
if (undefined === data)
|
|
140651
140736
|
return false;
|
|
140652
140737
|
// ###TODO: we shouldn't have to allocate OctEncodedNormal objects...just use uint16s / numbers...
|
|
@@ -140665,13 +140750,13 @@ class GltfReader {
|
|
|
140665
140750
|
}
|
|
140666
140751
|
readColors(mesh, attribute, accessorName) {
|
|
140667
140752
|
const view = this.getBufferView(attribute, accessorName);
|
|
140668
|
-
if (!view || (
|
|
140753
|
+
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
140754
|
return false;
|
|
140670
140755
|
const data = view.toBufferData(view.type);
|
|
140671
140756
|
if (!data)
|
|
140672
140757
|
return false;
|
|
140673
140758
|
const hasAlpha = "VEC4" === view.accessor.type;
|
|
140674
|
-
const factor = view.type ===
|
|
140759
|
+
const factor = view.type === _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float ? 255 : 1;
|
|
140675
140760
|
const rgbt = new Uint8Array(4);
|
|
140676
140761
|
const color = new Uint32Array(rgbt.buffer);
|
|
140677
140762
|
for (let i = 0; i < data.count; i++) {
|
|
@@ -140689,7 +140774,7 @@ class GltfReader {
|
|
|
140689
140774
|
if (view === undefined)
|
|
140690
140775
|
return false;
|
|
140691
140776
|
switch (view.type) {
|
|
140692
|
-
case
|
|
140777
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.Float: {
|
|
140693
140778
|
const data = this.readBufferDataFloat(json, accessorName);
|
|
140694
140779
|
if (!data)
|
|
140695
140780
|
return false;
|
|
@@ -140707,13 +140792,13 @@ class GltfReader {
|
|
|
140707
140792
|
}
|
|
140708
140793
|
return true;
|
|
140709
140794
|
}
|
|
140710
|
-
case
|
|
140795
|
+
case _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort: {
|
|
140711
140796
|
const quantized = view.accessor.extensions?.WEB3D_quantized_attributes;
|
|
140712
140797
|
const rangeMin = quantized?.decodedMin;
|
|
140713
140798
|
const rangeMax = quantized?.decodedMax;
|
|
140714
140799
|
if (undefined === rangeMin || undefined === rangeMax)
|
|
140715
140800
|
return false;
|
|
140716
|
-
const qData = view.toBufferData(
|
|
140801
|
+
const qData = view.toBufferData(_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfDataType.UnsignedShort);
|
|
140717
140802
|
if (undefined === qData || !(qData.buffer instanceof Uint16Array))
|
|
140718
140803
|
return false;
|
|
140719
140804
|
mesh.uvRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range2d.createXYXY(rangeMin[0], rangeMin[1], rangeMax[0], rangeMax[1]);
|
|
@@ -140767,10 +140852,30 @@ class GltfReader {
|
|
|
140767
140852
|
async resolveResources() {
|
|
140768
140853
|
// Load any external images and buffers.
|
|
140769
140854
|
await this._resolveResources();
|
|
140855
|
+
// Decompress any meshopt-compressed buffer views
|
|
140856
|
+
const decodeMeshoptBuffers = [];
|
|
140857
|
+
for (const bv of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._bufferViews)) {
|
|
140858
|
+
const ext = bv.extensions?.EXT_meshopt_compression;
|
|
140859
|
+
if (ext) {
|
|
140860
|
+
const bufferData = this._buffers[ext.buffer]?.resolvedBuffer;
|
|
140861
|
+
if (bufferData) {
|
|
140862
|
+
const source = new Uint8Array(bufferData.buffer, bufferData.byteOffset + (ext.byteOffset ?? 0), ext.byteLength ?? 0);
|
|
140863
|
+
const decode = async () => {
|
|
140864
|
+
bv.resolvedBuffer = await (0,_internal__WEBPACK_IMPORTED_MODULE_8__.decodeMeshoptBuffer)(source, ext);
|
|
140865
|
+
if (bv.resolvedBuffer) {
|
|
140866
|
+
bv.byteLength = bv.resolvedBuffer.byteLength;
|
|
140867
|
+
bv.byteOffset = 0;
|
|
140868
|
+
}
|
|
140869
|
+
};
|
|
140870
|
+
decodeMeshoptBuffers.push(decode());
|
|
140871
|
+
}
|
|
140872
|
+
}
|
|
140873
|
+
}
|
|
140874
|
+
await Promise.all(decodeMeshoptBuffers);
|
|
140770
140875
|
// If any meshes are draco-compressed, dynamically load the decoder module and then decode the meshes.
|
|
140771
140876
|
const dracoMeshes = [];
|
|
140772
140877
|
for (const node of this.traverseScene()) {
|
|
140773
|
-
for (const meshId of (0,
|
|
140878
|
+
for (const meshId of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.getGltfNodeMeshIds)(node)) {
|
|
140774
140879
|
const mesh = this._meshes[meshId];
|
|
140775
140880
|
if (mesh?.primitives)
|
|
140776
140881
|
for (const primitive of mesh.primitives)
|
|
@@ -140785,8 +140890,8 @@ class GltfReader {
|
|
|
140785
140890
|
await Promise.all(dracoMeshes.map(async (x) => this.decodeDracoMesh(x, dracoLoader)));
|
|
140786
140891
|
}
|
|
140787
140892
|
catch (err) {
|
|
140788
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(
|
|
140789
|
-
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(
|
|
140893
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logWarning(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__.FrontendLoggerCategory.Render, "Failed to decode draco-encoded glTF mesh");
|
|
140894
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_10__.FrontendLoggerCategory.Render, err);
|
|
140790
140895
|
}
|
|
140791
140896
|
}
|
|
140792
140897
|
async _resolveResources() {
|
|
@@ -140794,14 +140899,14 @@ class GltfReader {
|
|
|
140794
140899
|
// be required for the scene.
|
|
140795
140900
|
const promises = [];
|
|
140796
140901
|
try {
|
|
140797
|
-
for (const buffer of (0,
|
|
140902
|
+
for (const buffer of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._buffers))
|
|
140798
140903
|
if (!buffer.resolvedBuffer)
|
|
140799
140904
|
promises.push(this.resolveBuffer(buffer));
|
|
140800
140905
|
await Promise.all(promises);
|
|
140801
140906
|
if (this._isCanceled)
|
|
140802
140907
|
return;
|
|
140803
140908
|
promises.length = 0;
|
|
140804
|
-
for (const image of (0,
|
|
140909
|
+
for (const image of (0,_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.gltfDictionaryIterator)(this._images))
|
|
140805
140910
|
if (!image.resolvedImage)
|
|
140806
140911
|
promises.push(this.resolveImage(image));
|
|
140807
140912
|
await Promise.all(promises);
|
|
@@ -140855,7 +140960,7 @@ class GltfReader {
|
|
|
140855
140960
|
return;
|
|
140856
140961
|
const bvSrc = undefined !== image.bufferView ? image : image.extensions?.KHR_binary_glTF;
|
|
140857
140962
|
if (undefined !== bvSrc?.bufferView) {
|
|
140858
|
-
const format = undefined !== bvSrc.mimeType ? (0,
|
|
140963
|
+
const format = undefined !== bvSrc.mimeType ? (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.getImageSourceFormatForMimeType)(bvSrc.mimeType) : undefined;
|
|
140859
140964
|
const bufferView = this._bufferViews[bvSrc.bufferView];
|
|
140860
140965
|
if (undefined === format || !bufferView || !bufferView.byteLength || bufferView.byteLength < 0)
|
|
140861
140966
|
return;
|
|
@@ -140867,9 +140972,9 @@ class GltfReader {
|
|
|
140867
140972
|
try {
|
|
140868
140973
|
const imageSource = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageSource(bytes, format);
|
|
140869
140974
|
if (this._system.supportsCreateImageBitmap)
|
|
140870
|
-
image.resolvedImage = await (0,
|
|
140975
|
+
image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.imageBitmapFromImageSource)(imageSource);
|
|
140871
140976
|
else
|
|
140872
|
-
image.resolvedImage = await (0,
|
|
140977
|
+
image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.imageElementFromImageSource)(imageSource);
|
|
140873
140978
|
}
|
|
140874
140979
|
catch (_) {
|
|
140875
140980
|
//
|
|
@@ -140878,7 +140983,7 @@ class GltfReader {
|
|
|
140878
140983
|
}
|
|
140879
140984
|
const url = undefined !== image.uri ? this.resolveUrl(image.uri) : undefined;
|
|
140880
140985
|
if (undefined !== url)
|
|
140881
|
-
image.resolvedImage = await (0,
|
|
140986
|
+
image.resolvedImage = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_11__.tryImageElementFromUrl)(url);
|
|
140882
140987
|
}
|
|
140883
140988
|
/** Exposed strictly for testing. */
|
|
140884
140989
|
getTextureType(sampler) {
|
|
@@ -140887,7 +140992,7 @@ class GltfReader {
|
|
|
140887
140992
|
let wrapT = sampler?.wrapT;
|
|
140888
140993
|
if (undefined === wrapS && undefined === wrapT)
|
|
140889
140994
|
wrapS = wrapT = this.defaultWrapMode;
|
|
140890
|
-
if (
|
|
140995
|
+
if (_common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.ClampToEdge === wrapS || _common_gltf_GltfSchema__WEBPACK_IMPORTED_MODULE_13__.GltfWrapMode.ClampToEdge === wrapT)
|
|
140891
140996
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.TileSection;
|
|
140892
140997
|
return _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.Normal;
|
|
140893
140998
|
}
|
|
@@ -143023,6 +143128,88 @@ class LRUTileList {
|
|
|
143023
143128
|
}
|
|
143024
143129
|
|
|
143025
143130
|
|
|
143131
|
+
/***/ }),
|
|
143132
|
+
|
|
143133
|
+
/***/ "../../core/frontend/lib/esm/tile/MeshoptCompression.js":
|
|
143134
|
+
/*!**************************************************************!*\
|
|
143135
|
+
!*** ../../core/frontend/lib/esm/tile/MeshoptCompression.js ***!
|
|
143136
|
+
\**************************************************************/
|
|
143137
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
143138
|
+
|
|
143139
|
+
"use strict";
|
|
143140
|
+
__webpack_require__.r(__webpack_exports__);
|
|
143141
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
143142
|
+
/* harmony export */ "decodeMeshoptBuffer": () => (/* binding */ decodeMeshoptBuffer)
|
|
143143
|
+
/* harmony export */ });
|
|
143144
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
143145
|
+
/* harmony import */ var _common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../common/FrontendLoggerCategory */ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js");
|
|
143146
|
+
/*---------------------------------------------------------------------------------------------
|
|
143147
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
143148
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
143149
|
+
*--------------------------------------------------------------------------------------------*/
|
|
143150
|
+
/** @packageDocumentation
|
|
143151
|
+
* @module Tiles
|
|
143152
|
+
*/
|
|
143153
|
+
|
|
143154
|
+
|
|
143155
|
+
/** Loads and configures the MeshoptDecoder module on demand. */
|
|
143156
|
+
class Loader {
|
|
143157
|
+
constructor() {
|
|
143158
|
+
this._status = "uninitialized";
|
|
143159
|
+
}
|
|
143160
|
+
async getDecoder() {
|
|
143161
|
+
const status = this._status;
|
|
143162
|
+
switch (status) {
|
|
143163
|
+
case "failed":
|
|
143164
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._decoder);
|
|
143165
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
|
|
143166
|
+
return undefined;
|
|
143167
|
+
case "ready":
|
|
143168
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._decoder);
|
|
143169
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
|
|
143170
|
+
return this._decoder;
|
|
143171
|
+
case "loading":
|
|
143172
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== this._promise);
|
|
143173
|
+
await this._promise;
|
|
143174
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)("failed" === this._status || "ready" === this._status);
|
|
143175
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._promise);
|
|
143176
|
+
return this._decoder;
|
|
143177
|
+
}
|
|
143178
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)("uninitialized" === status);
|
|
143179
|
+
this._status = "loading";
|
|
143180
|
+
this._promise = this.load();
|
|
143181
|
+
return this.getDecoder();
|
|
143182
|
+
}
|
|
143183
|
+
async load() {
|
|
143184
|
+
try {
|
|
143185
|
+
// Import the module on first use.
|
|
143186
|
+
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;
|
|
143187
|
+
await decoder.ready;
|
|
143188
|
+
// Configure it to do the decoding outside of the main thread. No compelling reason to use more than one worker.
|
|
143189
|
+
decoder.useWorkers(1);
|
|
143190
|
+
this._status = "ready";
|
|
143191
|
+
this._decoder = decoder;
|
|
143192
|
+
}
|
|
143193
|
+
catch (err) {
|
|
143194
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Logger.logException(_common_FrontendLoggerCategory__WEBPACK_IMPORTED_MODULE_1__.FrontendLoggerCategory.Render, err);
|
|
143195
|
+
this._status = "failed";
|
|
143196
|
+
}
|
|
143197
|
+
finally {
|
|
143198
|
+
this._promise = undefined;
|
|
143199
|
+
}
|
|
143200
|
+
}
|
|
143201
|
+
}
|
|
143202
|
+
const loader = new Loader();
|
|
143203
|
+
/** @internal */
|
|
143204
|
+
async function decodeMeshoptBuffer(source, args) {
|
|
143205
|
+
const decoder = await loader.getDecoder();
|
|
143206
|
+
if (!decoder) {
|
|
143207
|
+
return undefined;
|
|
143208
|
+
}
|
|
143209
|
+
return decoder.decodeGltfBufferAsync(args.count, args.byteStride, source, args.mode, args.filter);
|
|
143210
|
+
}
|
|
143211
|
+
|
|
143212
|
+
|
|
143026
143213
|
/***/ }),
|
|
143027
143214
|
|
|
143028
143215
|
/***/ "../../core/frontend/lib/esm/tile/OPCFormatInterpreter.js":
|
|
@@ -150196,6 +150383,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
150196
150383
|
/* harmony export */ "createRealityTileTreeReference": () => (/* reexport safe */ _RealityModelTileTree__WEBPACK_IMPORTED_MODULE_73__.createRealityTileTreeReference),
|
|
150197
150384
|
/* harmony export */ "createSpatialTileTreeReferences": () => (/* reexport safe */ _PrimaryTileTree__WEBPACK_IMPORTED_MODULE_78__.createSpatialTileTreeReferences),
|
|
150198
150385
|
/* harmony export */ "decodeImdlGraphics": () => (/* reexport safe */ _ImdlGraphicsCreator__WEBPACK_IMPORTED_MODULE_35__.decodeImdlGraphics),
|
|
150386
|
+
/* harmony export */ "decodeMeshoptBuffer": () => (/* reexport safe */ _MeshoptCompression__WEBPACK_IMPORTED_MODULE_89__.decodeMeshoptBuffer),
|
|
150199
150387
|
/* harmony export */ "disposeTileTreesForGeometricModels": () => (/* reexport safe */ _PrimaryTileTree__WEBPACK_IMPORTED_MODULE_78__.disposeTileTreesForGeometricModels),
|
|
150200
150388
|
/* harmony export */ "getCesiumAccessTokenAndEndpointUrl": () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_64__.getCesiumAccessTokenAndEndpointUrl),
|
|
150201
150389
|
/* harmony export */ "getCesiumAssetUrl": () => (/* reexport safe */ _map_CesiumTerrainProvider__WEBPACK_IMPORTED_MODULE_64__.getCesiumAssetUrl),
|
|
@@ -150302,6 +150490,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
150302
150490
|
/* harmony import */ var _ThreeDTileFormatInterpreter__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ./ThreeDTileFormatInterpreter */ "../../core/frontend/lib/esm/tile/ThreeDTileFormatInterpreter.js");
|
|
150303
150491
|
/* harmony import */ var _OPCFormatInterpreter__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ./OPCFormatInterpreter */ "../../core/frontend/lib/esm/tile/OPCFormatInterpreter.js");
|
|
150304
150492
|
/* harmony import */ var _FetchCloudStorage__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ./FetchCloudStorage */ "../../core/frontend/lib/esm/tile/FetchCloudStorage.js");
|
|
150493
|
+
/* harmony import */ var _MeshoptCompression__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ./MeshoptCompression */ "../../core/frontend/lib/esm/tile/MeshoptCompression.js");
|
|
150305
150494
|
/*---------------------------------------------------------------------------------------------
|
|
150306
150495
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
150307
150496
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -150407,6 +150596,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
150407
150596
|
|
|
150408
150597
|
|
|
150409
150598
|
|
|
150599
|
+
|
|
150410
150600
|
|
|
150411
150601
|
|
|
150412
150602
|
/***/ }),
|
|
@@ -154291,8 +154481,11 @@ class WmtsMapLayerFormat extends ImageryMapLayerFormat {
|
|
|
154291
154481
|
return { status: _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.Valid, subLayers };
|
|
154292
154482
|
}
|
|
154293
154483
|
catch (err) {
|
|
154294
|
-
|
|
154295
|
-
|
|
154484
|
+
let status = _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidUrl;
|
|
154485
|
+
if (err?.status === 401) {
|
|
154486
|
+
status = ((userName && password) ? _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.InvalidCredentials : _internal__WEBPACK_IMPORTED_MODULE_0__.MapLayerSourceStatus.RequireAuth);
|
|
154487
|
+
}
|
|
154488
|
+
return { status };
|
|
154296
154489
|
}
|
|
154297
154490
|
}
|
|
154298
154491
|
}
|
|
@@ -184286,7 +184479,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184286
184479
|
/* harmony export */ "BSplineWrapMode": () => (/* reexport safe */ _bspline_KnotVector__WEBPACK_IMPORTED_MODULE_108__.BSplineWrapMode),
|
|
184287
184480
|
/* harmony export */ "BagOfCurves": () => (/* reexport safe */ _curve_CurveCollection__WEBPACK_IMPORTED_MODULE_64__.BagOfCurves),
|
|
184288
184481
|
/* harmony export */ "BarycentricTriangle": () => (/* reexport safe */ _geometry3d_BarycentricTriangle__WEBPACK_IMPORTED_MODULE_3__.BarycentricTriangle),
|
|
184289
|
-
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */
|
|
184482
|
+
/* harmony export */ "BentleyGeometryFlatBuffer": () => (/* reexport safe */ _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_130__.BentleyGeometryFlatBuffer),
|
|
184290
184483
|
/* harmony export */ "Bezier1dNd": () => (/* reexport safe */ _bspline_Bezier1dNd__WEBPACK_IMPORTED_MODULE_98__.Bezier1dNd),
|
|
184291
184484
|
/* harmony export */ "BezierCoffs": () => (/* reexport safe */ _numerics_BezierPolynomials__WEBPACK_IMPORTED_MODULE_51__.BezierCoffs),
|
|
184292
184485
|
/* harmony export */ "BezierCurve3d": () => (/* reexport safe */ _bspline_BezierCurve3d__WEBPACK_IMPORTED_MODULE_100__.BezierCurve3d),
|
|
@@ -184450,6 +184643,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184450
184643
|
/* harmony export */ "RuledSweep": () => (/* reexport safe */ _solid_RuledSweep__WEBPACK_IMPORTED_MODULE_92__.RuledSweep),
|
|
184451
184644
|
/* harmony export */ "Sample": () => (/* reexport safe */ _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__.Sample),
|
|
184452
184645
|
/* harmony export */ "Segment1d": () => (/* reexport safe */ _geometry3d_Segment1d__WEBPACK_IMPORTED_MODULE_31__.Segment1d),
|
|
184646
|
+
/* harmony export */ "SerializationHelpers": () => (/* reexport safe */ _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_129__.SerializationHelpers),
|
|
184453
184647
|
/* harmony export */ "SineCosinePolynomial": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SineCosinePolynomial),
|
|
184454
184648
|
/* harmony export */ "SmallSystem": () => (/* reexport safe */ _numerics_Polynomials__WEBPACK_IMPORTED_MODULE_55__.SmallSystem),
|
|
184455
184649
|
/* harmony export */ "SmoothTransformBetweenFrusta": () => (/* reexport safe */ _geometry3d_FrustumAnimation__WEBPACK_IMPORTED_MODULE_7__.SmoothTransformBetweenFrusta),
|
|
@@ -184618,7 +184812,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184618
184812
|
/* harmony import */ var _serialization_IModelJsonSchema__WEBPACK_IMPORTED_MODULE_126__ = __webpack_require__(/*! ./serialization/IModelJsonSchema */ "../../core/geometry/lib/esm/serialization/IModelJsonSchema.js");
|
|
184619
184813
|
/* harmony import */ var _serialization_DeepCompare__WEBPACK_IMPORTED_MODULE_127__ = __webpack_require__(/*! ./serialization/DeepCompare */ "../../core/geometry/lib/esm/serialization/DeepCompare.js");
|
|
184620
184814
|
/* harmony import */ var _serialization_GeometrySamples__WEBPACK_IMPORTED_MODULE_128__ = __webpack_require__(/*! ./serialization/GeometrySamples */ "../../core/geometry/lib/esm/serialization/GeometrySamples.js");
|
|
184621
|
-
/* harmony import */ var
|
|
184815
|
+
/* harmony import */ var _serialization_SerializationHelpers__WEBPACK_IMPORTED_MODULE_129__ = __webpack_require__(/*! ./serialization/SerializationHelpers */ "../../core/geometry/lib/esm/serialization/SerializationHelpers.js");
|
|
184816
|
+
/* harmony import */ var _serialization_BentleyGeometryFlatBuffer__WEBPACK_IMPORTED_MODULE_130__ = __webpack_require__(/*! ./serialization/BentleyGeometryFlatBuffer */ "../../core/geometry/lib/esm/serialization/BentleyGeometryFlatBuffer.js");
|
|
184622
184817
|
/*---------------------------------------------------------------------------------------------
|
|
184623
184818
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
184624
184819
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -184870,6 +185065,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
184870
185065
|
|
|
184871
185066
|
|
|
184872
185067
|
|
|
185068
|
+
|
|
184873
185069
|
|
|
184874
185070
|
|
|
184875
185071
|
/***/ }),
|
|
@@ -254950,22 +255146,22 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
254950
255146
|
|
|
254951
255147
|
|
|
254952
255148
|
/**
|
|
254953
|
-
* `SerializationHelpers` namespace has helper classes for serializing and deserializing geometry.
|
|
254954
|
-
* @
|
|
255149
|
+
* The `SerializationHelpers` namespace has helper classes for serializing and deserializing geometry, such as B-spline curves and surfaces.
|
|
255150
|
+
* @public
|
|
254955
255151
|
*/
|
|
254956
255152
|
var SerializationHelpers;
|
|
254957
255153
|
(function (SerializationHelpers) {
|
|
254958
|
-
/** Constructor
|
|
255154
|
+
/** Constructor for BSplineCurveData that populates the required data. Inputs are captured, not copied. */
|
|
254959
255155
|
function createBSplineCurveData(poles, dim, knots, numPoles, order) {
|
|
254960
255156
|
return { poles, dim, params: { numPoles, order, knots } };
|
|
254961
255157
|
}
|
|
254962
255158
|
SerializationHelpers.createBSplineCurveData = createBSplineCurveData;
|
|
254963
|
-
/** Constructor
|
|
255159
|
+
/** Constructor for BSplineSurfaceData that populates the required data. Inputs are captured, not copied. */
|
|
254964
255160
|
function createBSplineSurfaceData(poles, dim, uKnots, uNumPoles, uOrder, vKnots, vNumPoles, vOrder) {
|
|
254965
255161
|
return { poles, dim, uParams: { numPoles: uNumPoles, order: uOrder, knots: uKnots }, vParams: { numPoles: vNumPoles, order: vOrder, knots: vKnots } };
|
|
254966
255162
|
}
|
|
254967
255163
|
SerializationHelpers.createBSplineSurfaceData = createBSplineSurfaceData;
|
|
254968
|
-
/** Clone curve data */
|
|
255164
|
+
/** Clone B-spline curve data */
|
|
254969
255165
|
function cloneBSplineCurveData(source) {
|
|
254970
255166
|
return {
|
|
254971
255167
|
poles: (source.poles instanceof Float64Array) ? new Float64Array(source.poles) : _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.copy2d(source.poles),
|
|
@@ -254981,7 +255177,7 @@ var SerializationHelpers;
|
|
|
254981
255177
|
};
|
|
254982
255178
|
}
|
|
254983
255179
|
SerializationHelpers.cloneBSplineCurveData = cloneBSplineCurveData;
|
|
254984
|
-
/** Clone surface data */
|
|
255180
|
+
/** Clone B-spline surface data */
|
|
254985
255181
|
function cloneBSplineSurfaceData(source) {
|
|
254986
255182
|
return {
|
|
254987
255183
|
poles: (source.poles instanceof Float64Array) ? new Float64Array(source.poles) : _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.copy3d(source.poles),
|
|
@@ -255004,7 +255200,7 @@ var SerializationHelpers;
|
|
|
255004
255200
|
};
|
|
255005
255201
|
}
|
|
255006
255202
|
SerializationHelpers.cloneBSplineSurfaceData = cloneBSplineSurfaceData;
|
|
255007
|
-
/** Copy from source to dest */
|
|
255203
|
+
/** Copy B-spline curve data from source to dest */
|
|
255008
255204
|
function copyBSplineCurveDataPoles(source) {
|
|
255009
255205
|
let nPole = 0;
|
|
255010
255206
|
let nCoordPerPole = 0;
|
|
@@ -255051,7 +255247,7 @@ var SerializationHelpers;
|
|
|
255051
255247
|
weights = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.create(source.weights);
|
|
255052
255248
|
return { poles, weights };
|
|
255053
255249
|
}
|
|
255054
|
-
/** Copy from source to dest */
|
|
255250
|
+
/** Copy B-spline surface data from source to dest */
|
|
255055
255251
|
function copyBSplineSurfaceDataPoles(source) {
|
|
255056
255252
|
let nPoleRow = 0;
|
|
255057
255253
|
let nPolePerRow = 0;
|
|
@@ -255110,7 +255306,7 @@ var SerializationHelpers;
|
|
|
255110
255306
|
}
|
|
255111
255307
|
return { poles, weights };
|
|
255112
255308
|
}
|
|
255113
|
-
/** Convert data arrays to the types specified by options. */
|
|
255309
|
+
/** Convert B-spline curve data arrays to the types specified by options. */
|
|
255114
255310
|
function convertBSplineCurveDataArrays(data, options) {
|
|
255115
255311
|
if (undefined !== options?.jsonPoles) {
|
|
255116
255312
|
const packedPoles = data.poles instanceof Float64Array;
|
|
@@ -255134,7 +255330,7 @@ var SerializationHelpers;
|
|
|
255134
255330
|
data.params.knots = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.pack(data.params.knots);
|
|
255135
255331
|
}
|
|
255136
255332
|
}
|
|
255137
|
-
/** Convert data arrays to the types specified by options. */
|
|
255333
|
+
/** Convert B-spline surface data arrays to the types specified by options. */
|
|
255138
255334
|
function convertBSplineSurfaceDataArrays(data, options) {
|
|
255139
255335
|
if (undefined !== options?.jsonPoles) {
|
|
255140
255336
|
const packedPoles = data.poles instanceof Float64Array;
|
|
@@ -255163,6 +255359,7 @@ var SerializationHelpers;
|
|
|
255163
255359
|
data.vParams.knots = _geometry3d_PointHelpers__WEBPACK_IMPORTED_MODULE_0__.NumberArray.pack(data.vParams.knots);
|
|
255164
255360
|
}
|
|
255165
255361
|
}
|
|
255362
|
+
/** Helper class for preparing geometry data for import. */
|
|
255166
255363
|
class Import {
|
|
255167
255364
|
/** copy knots, with options to control destination type and extraneous knot removal */
|
|
255168
255365
|
static copyKnots(knots, options, iStart, iEnd) {
|
|
@@ -255359,6 +255556,7 @@ var SerializationHelpers;
|
|
|
255359
255556
|
}
|
|
255360
255557
|
}
|
|
255361
255558
|
SerializationHelpers.Import = Import;
|
|
255559
|
+
/** Helper class for preparing geometry data for export. */
|
|
255362
255560
|
class Export {
|
|
255363
255561
|
/**
|
|
255364
255562
|
* Restore special legacy periodic B-spline knots opened via BSplineWrapMode.OpenByRemovingKnots logic.
|
|
@@ -293539,7 +293737,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
293539
293737
|
/***/ ((module) => {
|
|
293540
293738
|
|
|
293541
293739
|
"use strict";
|
|
293542
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.6.0-dev.
|
|
293740
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.6.0-dev.13","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.13","@itwin/core-bentley":"workspace:^4.6.0-dev.13","@itwin/core-common":"workspace:^4.6.0-dev.13","@itwin/core-geometry":"workspace:^4.6.0-dev.13","@itwin/core-orbitgt":"workspace:^4.6.0-dev.13","@itwin/core-quantity":"workspace:^4.6.0-dev.13"},"//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
293741
|
|
|
293544
293742
|
/***/ })
|
|
293545
293743
|
|