@itwin/ecschema-rpcinterface-tests 4.8.0-dev.29 → 4.8.0-dev.31
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 +263 -17
- 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.map +1 -1
- package/package.json +15 -15
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\
|
|
1
|
+
{"version":3,"file":"_bea9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\6\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.1.6\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -29176,7 +29176,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
29176
29176
|
|
|
29177
29177
|
|
|
29178
29178
|
// cspell: ignore ttbbggrr bbggrr rrggbb aabbggrr abgr rrggbb hsla lerp torgb dhue dsaturation dvalue intpart fractpart cyanish
|
|
29179
|
-
// portions adapted from Three.js Copyright © 2010-
|
|
29179
|
+
// portions adapted from Three.js Copyright © 2010-2024 three.js authors
|
|
29180
29180
|
const scratchBytes = new Uint8Array(4);
|
|
29181
29181
|
const scratchUInt32 = new Uint32Array(scratchBytes.buffer);
|
|
29182
29182
|
/** An immutable integer representation of a color.
|
|
@@ -86246,19 +86246,30 @@ class RealityDataSourceTilesetUrlImpl {
|
|
|
86246
86246
|
this.setBaseUrl(url);
|
|
86247
86247
|
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(url, "json");
|
|
86248
86248
|
}
|
|
86249
|
+
isValidURL(url) {
|
|
86250
|
+
try {
|
|
86251
|
+
new URL(url);
|
|
86252
|
+
}
|
|
86253
|
+
catch (_) {
|
|
86254
|
+
return false;
|
|
86255
|
+
}
|
|
86256
|
+
return true;
|
|
86257
|
+
}
|
|
86258
|
+
/** Returns the tile URL. If the tile path is a full URL, it is returned as is. Otherwise, the base URL is prepended to the tile path. */
|
|
86259
|
+
getTileUrl(tilePath) {
|
|
86260
|
+
return this.isValidURL(tilePath) ? tilePath : this._baseUrl + tilePath;
|
|
86261
|
+
}
|
|
86249
86262
|
/**
|
|
86250
86263
|
* Returns the tile content. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
86251
86264
|
*/
|
|
86252
86265
|
async getTileContent(name) {
|
|
86253
|
-
|
|
86254
|
-
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(tileUrl, "arraybuffer");
|
|
86266
|
+
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(this.getTileUrl(name), "arraybuffer");
|
|
86255
86267
|
}
|
|
86256
86268
|
/**
|
|
86257
86269
|
* Returns the tile content in json format. The path to the tile is relative to the base url of present reality data whatever the type.
|
|
86258
86270
|
*/
|
|
86259
86271
|
async getTileJson(name) {
|
|
86260
|
-
|
|
86261
|
-
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(tileUrl, "json");
|
|
86272
|
+
return (0,_request_Request__WEBPACK_IMPORTED_MODULE_2__.request)(this.getTileUrl(name), "json");
|
|
86262
86273
|
}
|
|
86263
86274
|
getTileContentType(url) {
|
|
86264
86275
|
return new URL(url, "https://localhost/").pathname.toLowerCase().endsWith("json") ? "tileset" : "tile";
|
|
@@ -103965,16 +103976,16 @@ var FeatureSymbology;
|
|
|
103965
103976
|
* @internal
|
|
103966
103977
|
*/
|
|
103967
103978
|
initFromViewport(viewport) {
|
|
103968
|
-
|
|
103969
|
-
this._initFromView(view);
|
|
103979
|
+
// Set the initial always/never-drawn sets. Later, initFromView can add more elements to them.
|
|
103970
103980
|
if (undefined !== viewport.neverDrawn)
|
|
103971
103981
|
this.setNeverDrawnSet(viewport.neverDrawn);
|
|
103972
103982
|
if (undefined !== viewport.alwaysDrawn)
|
|
103973
103983
|
this.setAlwaysDrawnSet(viewport.alwaysDrawn, viewport.isAlwaysDrawnExclusive);
|
|
103984
|
+
this._initFromView(viewport.view);
|
|
103974
103985
|
viewport.addFeatureOverrides(this);
|
|
103975
103986
|
viewport.addModelSubCategoryVisibilityOverrides(this, this._modelSubCategoryOverrides);
|
|
103976
103987
|
// This will include any per-model subcategory visibility overrides added above.
|
|
103977
|
-
this._initSubCategoryOverrides(view);
|
|
103988
|
+
this._initSubCategoryOverrides(viewport.view);
|
|
103978
103989
|
}
|
|
103979
103990
|
_initFromView(view) {
|
|
103980
103991
|
const { viewFlags } = view;
|
|
@@ -138692,14 +138703,13 @@ class B3dmReader extends _internal__WEBPACK_IMPORTED_MODULE_4__.GltfReader {
|
|
|
138692
138703
|
constructor(props, iModel, modelId, is3d, system, _range, _isLeaf, _batchTableLength, _transformToRoot, _batchTableJson, shouldAbort, _idMap, _pseudoRtcBias, deduplicateVertices = false) {
|
|
138693
138704
|
super({
|
|
138694
138705
|
props, iModel, system, shouldAbort, deduplicateVertices,
|
|
138695
|
-
is2d: !is3d,
|
|
138706
|
+
is2d: !is3d, idMap: _idMap,
|
|
138696
138707
|
});
|
|
138697
138708
|
this._range = _range;
|
|
138698
138709
|
this._isLeaf = _isLeaf;
|
|
138699
138710
|
this._batchTableLength = _batchTableLength;
|
|
138700
138711
|
this._transformToRoot = _transformToRoot;
|
|
138701
138712
|
this._batchTableJson = _batchTableJson;
|
|
138702
|
-
this._idMap = _idMap;
|
|
138703
138713
|
this._pseudoRtcBias = _pseudoRtcBias;
|
|
138704
138714
|
this._batchIdRemap = new Map();
|
|
138705
138715
|
this._modelId = modelId;
|
|
@@ -139984,6 +139994,8 @@ function compareTextureKeys(lhs, rhs) {
|
|
|
139984
139994
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)("number" === typeof lhs.id && "number" === typeof rhs.id);
|
|
139985
139995
|
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareNumbers)(lhs.id, rhs.id);
|
|
139986
139996
|
}
|
|
139997
|
+
;
|
|
139998
|
+
;
|
|
139987
139999
|
/** Deserializes [glTF](https://www.khronos.org/gltf/).
|
|
139988
140000
|
* @internal
|
|
139989
140001
|
*/
|
|
@@ -140039,6 +140051,12 @@ class GltfReader {
|
|
|
140039
140051
|
this._computedContentRange = contentRange = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d.createNull();
|
|
140040
140052
|
else
|
|
140041
140053
|
this._computedContentRange = undefined;
|
|
140054
|
+
// Save feature table model id in case we need to recreate it after reading instances
|
|
140055
|
+
const featureTableModelId = featureTable?.modelId;
|
|
140056
|
+
// Flush feature table if instance features are used
|
|
140057
|
+
if (this._structuralMetadata && this._glTF.extensionsUsed?.includes("EXT_instance_features") && this._idMap) {
|
|
140058
|
+
featureTable = undefined;
|
|
140059
|
+
}
|
|
140042
140060
|
// ###TODO this looks like a hack? Why does it assume the first node's transform is special, or that the transform will be specified as a matrix instead of translation+rot+scale?
|
|
140043
140061
|
if (this._returnToCenter || this._nodes[0]?.matrix || (pseudoRtcBias && pseudoRtcBias.magnitude() < 1.0E5))
|
|
140044
140062
|
pseudoRtcBias = undefined;
|
|
@@ -140051,6 +140069,14 @@ class GltfReader {
|
|
|
140051
140069
|
if (node && _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileReadStatus.Success !== (readStatus = this.readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, instances, pseudoRtcBias)))
|
|
140052
140070
|
return { readStatus, isLeaf };
|
|
140053
140071
|
}
|
|
140072
|
+
// Creates a feature table based on instance features
|
|
140073
|
+
// The table must be created after reading instances, since the maximum number of features is not known until all instances have been read.
|
|
140074
|
+
if (this._instanceFeatures.length > 0 && this._idMap) {
|
|
140075
|
+
featureTable = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FeatureTable(this._instanceFeatures.length, featureTableModelId);
|
|
140076
|
+
for (let instanceFeatureId = 0; instanceFeatureId < this._instanceFeatures.length; instanceFeatureId++) {
|
|
140077
|
+
featureTable.insertWithIndex(this._instanceFeatures[instanceFeatureId], instanceFeatureId);
|
|
140078
|
+
}
|
|
140079
|
+
}
|
|
140054
140080
|
if (0 === renderGraphicList.length)
|
|
140055
140081
|
return { readStatus: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TileReadStatus.InvalidTileData, isLeaf };
|
|
140056
140082
|
let renderGraphic;
|
|
@@ -140181,9 +140207,67 @@ class GltfReader {
|
|
|
140181
140207
|
transforms[idx + 10] = tf.matrix.coffs[8];
|
|
140182
140208
|
transforms[idx + 11] = tf.origin.z;
|
|
140183
140209
|
}
|
|
140184
|
-
|
|
140185
|
-
//
|
|
140186
|
-
const
|
|
140210
|
+
let featureIds = ((featureTable && featureTable.isUniform)) ? new Uint8Array(3 * count) : undefined;
|
|
140211
|
+
// Resolve instance features if the EXT_instance_features if present
|
|
140212
|
+
const instanceFeaturesExt = node.extensions?.EXT_instance_features;
|
|
140213
|
+
if (this._structuralMetadata && instanceFeaturesExt && this._idMap) {
|
|
140214
|
+
if (!featureIds)
|
|
140215
|
+
featureIds = new Uint8Array(3 * count);
|
|
140216
|
+
// Resolve feature buffers before creating instance table
|
|
140217
|
+
const featureBuffers = new Map();
|
|
140218
|
+
for (const featureIdDesc of instanceFeaturesExt.featureIds) {
|
|
140219
|
+
if (featureIdDesc.attribute !== undefined) {
|
|
140220
|
+
const bufferView = this.getBufferView(ext.attributes, `_FEATURE_ID_${featureIdDesc.attribute}`);
|
|
140221
|
+
if (bufferView) {
|
|
140222
|
+
const bufferData = bufferView.toBufferData(bufferView.type)?.buffer;
|
|
140223
|
+
if (bufferData) {
|
|
140224
|
+
featureBuffers.set(featureIdDesc.attribute, bufferData);
|
|
140225
|
+
}
|
|
140226
|
+
}
|
|
140227
|
+
}
|
|
140228
|
+
}
|
|
140229
|
+
for (let localInstanceId = 0; localInstanceId < count; localInstanceId++) {
|
|
140230
|
+
const instanceProps = {};
|
|
140231
|
+
for (const featureIdDesc of instanceFeaturesExt.featureIds) {
|
|
140232
|
+
const table = this._structuralMetadata.tables[featureIdDesc.propertyTable];
|
|
140233
|
+
instanceProps[table.name] = {};
|
|
140234
|
+
// If the attribute is not defined, then the feature id corresponds to the instance id
|
|
140235
|
+
if (featureIdDesc.attribute === undefined) {
|
|
140236
|
+
for (const entries of table.entries) {
|
|
140237
|
+
if (entries.values[localInstanceId] !== undefined) {
|
|
140238
|
+
instanceProps[table.name][entries.name] = entries.values[localInstanceId];
|
|
140239
|
+
}
|
|
140240
|
+
}
|
|
140241
|
+
}
|
|
140242
|
+
else if (featureBuffers.has(featureIdDesc.attribute)) {
|
|
140243
|
+
const featureBuffer = featureBuffers.get(featureIdDesc.attribute);
|
|
140244
|
+
if (!featureBuffer) {
|
|
140245
|
+
continue;
|
|
140246
|
+
}
|
|
140247
|
+
const featureId = featureBuffer[localInstanceId];
|
|
140248
|
+
if (featureIdDesc.nullFeatureId !== undefined && featureId === featureIdDesc.nullFeatureId) {
|
|
140249
|
+
continue;
|
|
140250
|
+
}
|
|
140251
|
+
for (const entries of table.entries) {
|
|
140252
|
+
if (entries.values[featureId] !== undefined) {
|
|
140253
|
+
instanceProps[table.name][entries.name] = entries.values[featureId];
|
|
140254
|
+
}
|
|
140255
|
+
}
|
|
140256
|
+
}
|
|
140257
|
+
}
|
|
140258
|
+
const instanceElementId = this._idMap.getBatchId(instanceProps);
|
|
140259
|
+
// If the element id is already assigned to a previous instance,
|
|
140260
|
+
// reuse the previous feature id to avoid collision in the feature table
|
|
140261
|
+
if (!this._instanceElementIdToFeatureId.has(instanceElementId)) {
|
|
140262
|
+
this._instanceElementIdToFeatureId.set(instanceElementId, this._instanceFeatures.length);
|
|
140263
|
+
this._instanceFeatures.push(new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Feature(instanceElementId));
|
|
140264
|
+
}
|
|
140265
|
+
const instanceFeatureId = this._instanceElementIdToFeatureId.get(instanceElementId);
|
|
140266
|
+
featureIds[localInstanceId * 3 + 0] = instanceFeatureId & 0xFF;
|
|
140267
|
+
featureIds[localInstanceId * 3 + 1] = (instanceFeatureId >> 8) & 0xFF;
|
|
140268
|
+
featureIds[localInstanceId * 3 + 2] = (instanceFeatureId >> 16) & 0xFF;
|
|
140269
|
+
}
|
|
140270
|
+
}
|
|
140187
140271
|
return { count, transforms, transformCenter, featureIds };
|
|
140188
140272
|
}
|
|
140189
140273
|
readNodeAndCreateGraphics(renderGraphicList, node, featureTable, transformStack, batchInstances, pseudoRtcBias) {
|
|
@@ -140362,6 +140446,8 @@ class GltfReader {
|
|
|
140362
140446
|
this._resolvedTextures = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Dictionary((lhs, rhs) => compareTextureKeys(lhs, rhs));
|
|
140363
140447
|
this._dracoMeshes = new Map();
|
|
140364
140448
|
this._containsPointCloud = false;
|
|
140449
|
+
this._instanceFeatures = [];
|
|
140450
|
+
this._instanceElementIdToFeatureId = new Map();
|
|
140365
140451
|
/** The glTF spec says that if GltfSampler.wrapS/T are omitted, they default to Repeat.
|
|
140366
140452
|
* However, the reality data service serves tiles that lack any wrapS/T property, and we want those clamped to edge, not repeated.
|
|
140367
140453
|
* (We also don't want to produce mip-maps for them, which is determined indirectly from the wrap mode).
|
|
@@ -140399,6 +140485,7 @@ class GltfReader {
|
|
|
140399
140485
|
if (!sceneNodes)
|
|
140400
140486
|
sceneNodes = Object.keys(this._nodes);
|
|
140401
140487
|
this._sceneNodes = sceneNodes;
|
|
140488
|
+
this._idMap = args.idMap;
|
|
140402
140489
|
}
|
|
140403
140490
|
readBufferData(json, accessorName, type) {
|
|
140404
140491
|
const view = this.getBufferView(json, accessorName);
|
|
@@ -141297,6 +141384,7 @@ class GltfGraphicsReader extends GltfReader {
|
|
|
141297
141384
|
props,
|
|
141298
141385
|
iModel: args.iModel,
|
|
141299
141386
|
vertexTableRequired: true,
|
|
141387
|
+
idMap: args.idMap,
|
|
141300
141388
|
});
|
|
141301
141389
|
this._contentRange = args.contentRange;
|
|
141302
141390
|
this._transform = args.transform;
|
|
@@ -141314,10 +141402,168 @@ class GltfGraphicsReader extends GltfReader {
|
|
|
141314
141402
|
renderMode: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMode.SmoothShade,
|
|
141315
141403
|
};
|
|
141316
141404
|
}
|
|
141405
|
+
getGltfStructuralMetadataBuffer(id, type) {
|
|
141406
|
+
const bufferView = this._bufferViews[id];
|
|
141407
|
+
if (!bufferView || undefined === bufferView.buffer)
|
|
141408
|
+
return undefined;
|
|
141409
|
+
if (!bufferView.byteLength || bufferView.byteLength === 0) {
|
|
141410
|
+
return undefined;
|
|
141411
|
+
}
|
|
141412
|
+
const bufferData = this._buffers[bufferView.buffer]?.resolvedBuffer;
|
|
141413
|
+
if (!bufferData)
|
|
141414
|
+
return undefined;
|
|
141415
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== bufferView.byteLength); // required by spec; TypeScript interface is wrong.
|
|
141416
|
+
const byteOffset = bufferView.byteOffset ?? 0;
|
|
141417
|
+
const subarray = bufferData.slice(byteOffset, byteOffset + bufferView.byteLength);
|
|
141418
|
+
switch (type) {
|
|
141419
|
+
case "INT8":
|
|
141420
|
+
return new Int8Array(subarray.buffer, 0, bufferView.byteLength);
|
|
141421
|
+
case "UINT8":
|
|
141422
|
+
return new Uint8Array(subarray.buffer, 0, bufferView.byteLength);
|
|
141423
|
+
case "INT16":
|
|
141424
|
+
return new Int16Array(subarray.buffer, 0, bufferView.byteLength / 2);
|
|
141425
|
+
case "UINT16":
|
|
141426
|
+
return new Uint16Array(subarray.buffer, 0, bufferView.byteLength / 2);
|
|
141427
|
+
case "INT32":
|
|
141428
|
+
return new Int32Array(subarray.buffer, 0, bufferView.byteLength / 4);
|
|
141429
|
+
case "UINT32":
|
|
141430
|
+
return new Uint32Array(subarray.buffer, 0, bufferView.byteLength / 4);
|
|
141431
|
+
case "INT64":
|
|
141432
|
+
return new BigInt64Array(subarray.buffer, 0, bufferView.byteLength / 8);
|
|
141433
|
+
case "UINT64":
|
|
141434
|
+
return new BigUint64Array(subarray.buffer, 0, bufferView.byteLength / 8);
|
|
141435
|
+
case "FLOAT32":
|
|
141436
|
+
return new Float32Array(subarray.buffer, 0, bufferView.byteLength / 4);
|
|
141437
|
+
case "FLOAT64":
|
|
141438
|
+
return new Float64Array(subarray.buffer, 0, bufferView.byteLength / 8);
|
|
141439
|
+
}
|
|
141440
|
+
return undefined;
|
|
141441
|
+
}
|
|
141442
|
+
getGltfStructuralMetadataPropertyValues(property, classProperty, count) {
|
|
141443
|
+
// Not supported for now
|
|
141444
|
+
if (classProperty.type === "ENUM" || classProperty.type === "BOOLEAN") {
|
|
141445
|
+
return undefined;
|
|
141446
|
+
}
|
|
141447
|
+
let getPropertyValue;
|
|
141448
|
+
if (classProperty.type === "STRING" && property.stringOffsets) {
|
|
141449
|
+
const stringValues = this.getGltfStructuralMetadataBuffer(property.values, "UINT8");
|
|
141450
|
+
if (!stringValues) {
|
|
141451
|
+
return undefined;
|
|
141452
|
+
}
|
|
141453
|
+
const stringOffsets = this.getGltfStructuralMetadataBuffer(property.stringOffsets, "UINT32");
|
|
141454
|
+
if (!stringOffsets) {
|
|
141455
|
+
return undefined;
|
|
141456
|
+
}
|
|
141457
|
+
getPropertyValue = (index) => {
|
|
141458
|
+
const begin = stringOffsets[index];
|
|
141459
|
+
const end = stringOffsets[index + 1];
|
|
141460
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.utf8ToString)(stringValues.subarray(begin, end));
|
|
141461
|
+
};
|
|
141462
|
+
}
|
|
141463
|
+
else {
|
|
141464
|
+
if (!classProperty.componentType) {
|
|
141465
|
+
return undefined;
|
|
141466
|
+
}
|
|
141467
|
+
let numComponents = -1;
|
|
141468
|
+
switch (classProperty.type) {
|
|
141469
|
+
case "SCALAR":
|
|
141470
|
+
numComponents = 1;
|
|
141471
|
+
break;
|
|
141472
|
+
case "VEC2":
|
|
141473
|
+
numComponents = 2;
|
|
141474
|
+
break;
|
|
141475
|
+
case "VEC3":
|
|
141476
|
+
numComponents = 3;
|
|
141477
|
+
break;
|
|
141478
|
+
case "VEC4":
|
|
141479
|
+
numComponents = 4;
|
|
141480
|
+
break;
|
|
141481
|
+
case "MAT2":
|
|
141482
|
+
numComponents = 4;
|
|
141483
|
+
break;
|
|
141484
|
+
case "MAT3":
|
|
141485
|
+
numComponents = 9;
|
|
141486
|
+
break;
|
|
141487
|
+
case "MAT4":
|
|
141488
|
+
numComponents = 16;
|
|
141489
|
+
break;
|
|
141490
|
+
}
|
|
141491
|
+
if (numComponents === -1) {
|
|
141492
|
+
return undefined;
|
|
141493
|
+
}
|
|
141494
|
+
const values = this.getGltfStructuralMetadataBuffer(property.values, classProperty.componentType);
|
|
141495
|
+
if (!values) {
|
|
141496
|
+
return undefined;
|
|
141497
|
+
}
|
|
141498
|
+
if (numComponents === 1) {
|
|
141499
|
+
getPropertyValue = (index) => {
|
|
141500
|
+
return values[index];
|
|
141501
|
+
};
|
|
141502
|
+
}
|
|
141503
|
+
else {
|
|
141504
|
+
getPropertyValue = (index) => {
|
|
141505
|
+
const result = [];
|
|
141506
|
+
for (let i = 0; i < numComponents; i++) {
|
|
141507
|
+
result.push(values[index * numComponents + i]);
|
|
141508
|
+
}
|
|
141509
|
+
return result;
|
|
141510
|
+
};
|
|
141511
|
+
}
|
|
141512
|
+
}
|
|
141513
|
+
const propertyValues = [];
|
|
141514
|
+
for (let i = 0; i < count; i++) {
|
|
141515
|
+
const value = getPropertyValue(i);
|
|
141516
|
+
const propertyValue = (typeof value === "bigint") ? value.toString() : value;
|
|
141517
|
+
if (!classProperty.noData || propertyValue !== classProperty.noData) {
|
|
141518
|
+
propertyValues.push(propertyValue);
|
|
141519
|
+
}
|
|
141520
|
+
else {
|
|
141521
|
+
propertyValues.push(undefined);
|
|
141522
|
+
}
|
|
141523
|
+
}
|
|
141524
|
+
return propertyValues;
|
|
141525
|
+
}
|
|
141526
|
+
readGltfStructuralMetadata() {
|
|
141527
|
+
const propertyTables = this._glTF.extensions?.EXT_structural_metadata?.propertyTables;
|
|
141528
|
+
const schema = this._glTF.extensions?.EXT_structural_metadata?.schema;
|
|
141529
|
+
if (propertyTables && schema && schema.classes) {
|
|
141530
|
+
this._structuralMetadata = { tables: [] };
|
|
141531
|
+
for (const propertyTable of propertyTables) {
|
|
141532
|
+
if (!propertyTable.properties || !schema.classes) {
|
|
141533
|
+
continue;
|
|
141534
|
+
}
|
|
141535
|
+
const propertyTableSchema = schema.classes[propertyTable.class];
|
|
141536
|
+
if (!propertyTableSchema || !propertyTableSchema.properties) {
|
|
141537
|
+
continue;
|
|
141538
|
+
}
|
|
141539
|
+
const structuralMetadataTable = {
|
|
141540
|
+
name: propertyTableSchema.name ?? propertyTable.class,
|
|
141541
|
+
entries: [],
|
|
141542
|
+
};
|
|
141543
|
+
for (const [propertyName, property] of Object.entries(propertyTable.properties)) {
|
|
141544
|
+
const propertySchema = propertyTableSchema.properties[propertyName];
|
|
141545
|
+
if (!property || !propertySchema) {
|
|
141546
|
+
continue;
|
|
141547
|
+
}
|
|
141548
|
+
const propertyValues = this.getGltfStructuralMetadataPropertyValues(property, propertySchema, propertyTable.count);
|
|
141549
|
+
if (!propertyValues) {
|
|
141550
|
+
continue;
|
|
141551
|
+
}
|
|
141552
|
+
structuralMetadataTable.entries.push({
|
|
141553
|
+
name: propertySchema.name ?? propertyName,
|
|
141554
|
+
values: propertyValues,
|
|
141555
|
+
});
|
|
141556
|
+
}
|
|
141557
|
+
this._structuralMetadata.tables.push(structuralMetadataTable);
|
|
141558
|
+
}
|
|
141559
|
+
}
|
|
141560
|
+
}
|
|
141317
141561
|
async read() {
|
|
141318
141562
|
await this.resolveResources();
|
|
141563
|
+
this.readGltfStructuralMetadata();
|
|
141319
141564
|
return this.readGltfAndCreateGraphics(this._isLeaf, this._featureTable, this._contentRange, this._transform);
|
|
141320
141565
|
}
|
|
141566
|
+
get structuralMetadata() { return this._structuralMetadata; }
|
|
141321
141567
|
get nodes() { return this._nodes; }
|
|
141322
141568
|
get scenes() { return this._glTF.scenes ?? emptyDict; }
|
|
141323
141569
|
get sceneNodes() { return this._sceneNodes; }
|
|
@@ -141448,14 +141694,13 @@ class I3dmReader extends _internal__WEBPACK_IMPORTED_MODULE_3__.GltfReader {
|
|
|
141448
141694
|
constructor(_featureBinary, _featureJson, _batchTableJson, props, iModel, modelId, is3d, system, _range, _isLeaf, shouldAbort, _idMap, deduplicateVertices = false) {
|
|
141449
141695
|
super({
|
|
141450
141696
|
props, iModel, system, shouldAbort, deduplicateVertices,
|
|
141451
|
-
is2d: !is3d,
|
|
141697
|
+
is2d: !is3d, idMap: _idMap,
|
|
141452
141698
|
});
|
|
141453
141699
|
this._featureBinary = _featureBinary;
|
|
141454
141700
|
this._featureJson = _featureJson;
|
|
141455
141701
|
this._batchTableJson = _batchTableJson;
|
|
141456
141702
|
this._range = _range;
|
|
141457
141703
|
this._isLeaf = _isLeaf;
|
|
141458
|
-
this._idMap = _idMap;
|
|
141459
141704
|
this._instanceCount = 0;
|
|
141460
141705
|
this._modelId = modelId;
|
|
141461
141706
|
}
|
|
@@ -145586,7 +145831,7 @@ class RealityTreeReference extends RealityModelTileTree.Reference {
|
|
|
145586
145831
|
if (batch !== undefined)
|
|
145587
145832
|
for (const key of Object.keys(batch))
|
|
145588
145833
|
if (-1 === key.indexOf("#")) // Avoid internal cesium
|
|
145589
|
-
strings.push(`${key}: ${batch[key]}`);
|
|
145834
|
+
strings.push(`${key}: ${JSON.stringify(batch[key])}`);
|
|
145590
145835
|
const div = document.createElement("div");
|
|
145591
145836
|
div.innerHTML = strings.join("<br>");
|
|
145592
145837
|
return div;
|
|
@@ -146334,6 +146579,7 @@ class RealityTileLoader {
|
|
|
146334
146579
|
transform: tile.transformToRoot,
|
|
146335
146580
|
hasChildren: !tile.isLeaf,
|
|
146336
146581
|
pickableOptions: { id: modelId },
|
|
146582
|
+
idMap: this.getBatchIdMap(),
|
|
146337
146583
|
});
|
|
146338
146584
|
}
|
|
146339
146585
|
break;
|
|
@@ -298453,7 +298699,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
298453
298699
|
/***/ ((module) => {
|
|
298454
298700
|
|
|
298455
298701
|
"use strict";
|
|
298456
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.
|
|
298702
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.31","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 --no-inline-config -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.8.0-dev.31","@itwin/core-bentley":"workspace:^4.8.0-dev.31","@itwin/core-common":"workspace:^4.8.0-dev.31","@itwin/core-geometry":"workspace:^4.8.0-dev.31","@itwin/core-orbitgt":"workspace:^4.8.0-dev.31","@itwin/core-quantity":"workspace:^4.8.0-dev.31"},"//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.2","@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.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","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"}}');
|
|
298457
298703
|
|
|
298458
298704
|
/***/ })
|
|
298459
298705
|
|