@itwin/ecschema-rpcinterface-tests 4.0.0-dev.94 → 4.0.0-dev.96
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/_a8a9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +81 -31
- 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/object-storage.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_itwin_object-storage-azure_1_6_0_node_modules_itwin_obj-0f69b1.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_3_3_node_modules_loaders_gl_draco_di-28f62e.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_reflect-metadata_0_1_13_node_modules_reflect-metadata_R-610cb3.bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_a8a9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\
|
|
1
|
+
{"version":3,"file":"_a8a9.bundled-tests.js","mappings":";;;;;;;;AAAA","sources":["file:///ignored|D:\\vsts_a\\8\\s\\common\\temp\\node_modules\\.pnpm\\@loaders.gl+worker-utils@3.3.3\\node_modules\\@loaders.gl\\worker-utils\\dist\\esm\\lib\\library-utils|../node/require-utils.node"],"names":[],"sourceRoot":""}
|
|
@@ -39074,6 +39074,23 @@ class FeatureTable extends _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Inde
|
|
|
39074
39074
|
getArray() { return this._array; }
|
|
39075
39075
|
}
|
|
39076
39076
|
const scratchPackedFeature = PackedFeature.create();
|
|
39077
|
+
function populateAnimationNodeIds(table, computeNodeId, maxNodeId) {
|
|
39078
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(maxNodeId > 0);
|
|
39079
|
+
let nodeIds;
|
|
39080
|
+
const outputFeature = PackedFeature.createWithIndex();
|
|
39081
|
+
for (const feature of table.iterable(outputFeature)) {
|
|
39082
|
+
const nodeId = computeNodeId(feature);
|
|
39083
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(nodeId <= maxNodeId);
|
|
39084
|
+
if (0 !== nodeId) {
|
|
39085
|
+
if (!nodeIds) {
|
|
39086
|
+
const size = table.numFeatures;
|
|
39087
|
+
nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));
|
|
39088
|
+
}
|
|
39089
|
+
nodeIds[feature.index] = nodeId;
|
|
39090
|
+
}
|
|
39091
|
+
}
|
|
39092
|
+
return nodeIds;
|
|
39093
|
+
}
|
|
39077
39094
|
/**
|
|
39078
39095
|
* An immutable, packed representation of a [[FeatureTable]]. The features are packed into a single array of 32-bit integer values,
|
|
39079
39096
|
* wherein each feature occupies 3 32-bit integers.
|
|
@@ -39082,6 +39099,11 @@ const scratchPackedFeature = PackedFeature.create();
|
|
|
39082
39099
|
class PackedFeatureTable {
|
|
39083
39100
|
get byteLength() { return this._data.byteLength; }
|
|
39084
39101
|
get animationNodeIds() { return this._animationNodeIds; }
|
|
39102
|
+
/** @internal for use by MultiModelPackedFeatureTable */
|
|
39103
|
+
setAnimationNodeIds(nodeIds) {
|
|
39104
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._animationNodeIds);
|
|
39105
|
+
this._animationNodeIds = nodeIds;
|
|
39106
|
+
}
|
|
39085
39107
|
/** Construct a PackedFeatureTable from the packed binary data.
|
|
39086
39108
|
* This is used internally when deserializing Tiles in iMdl format.
|
|
39087
39109
|
* @internal
|
|
@@ -39215,22 +39237,7 @@ class PackedFeatureTable {
|
|
|
39215
39237
|
}
|
|
39216
39238
|
populateAnimationNodeIds(computeNodeId, maxNodeId) {
|
|
39217
39239
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined === this._animationNodeIds);
|
|
39218
|
-
(
|
|
39219
|
-
const pair = { lower: 0, upper: 0 };
|
|
39220
|
-
let haveNodes = false;
|
|
39221
|
-
const size = this.numFeatures;
|
|
39222
|
-
const nodeIds = maxNodeId < 0x100 ? new Uint8Array(size) : (maxNodeId < 0x10000 ? new Uint16Array(size) : new Uint32Array(size));
|
|
39223
|
-
for (let i = 0; i < this.numFeatures; i++) {
|
|
39224
|
-
this.getElementIdPair(i, pair);
|
|
39225
|
-
const nodeId = computeNodeId(pair, i);
|
|
39226
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(nodeId <= maxNodeId);
|
|
39227
|
-
if (0 !== nodeId) {
|
|
39228
|
-
nodeIds[i] = nodeId;
|
|
39229
|
-
haveNodes = true;
|
|
39230
|
-
}
|
|
39231
|
-
}
|
|
39232
|
-
if (haveNodes)
|
|
39233
|
-
this._animationNodeIds = nodeIds;
|
|
39240
|
+
this._animationNodeIds = populateAnimationNodeIds(this, computeNodeId, maxNodeId);
|
|
39234
39241
|
}
|
|
39235
39242
|
*iterator(output) {
|
|
39236
39243
|
for (let i = 0; i < this.numFeatures; i++) {
|
|
@@ -39335,6 +39342,7 @@ class MultiModelPackedFeatureTable {
|
|
|
39335
39342
|
get batchModelIdPair() { return this._features.batchModelIdPair; }
|
|
39336
39343
|
get numFeatures() { return this._features.numFeatures; }
|
|
39337
39344
|
get type() { return this._features.type; }
|
|
39345
|
+
get animationNodeIds() { return this._features.animationNodeIds; }
|
|
39338
39346
|
get byteLength() {
|
|
39339
39347
|
return this._features.byteLength + this._models.byteLength;
|
|
39340
39348
|
}
|
|
@@ -39375,6 +39383,12 @@ class MultiModelPackedFeatureTable {
|
|
|
39375
39383
|
[Symbol.iterator]: () => this.iterator(output),
|
|
39376
39384
|
};
|
|
39377
39385
|
}
|
|
39386
|
+
getAnimationNodeId(featureIndex) {
|
|
39387
|
+
return this._features.getAnimationNodeId(featureIndex);
|
|
39388
|
+
}
|
|
39389
|
+
populateAnimationNodeIds(computeNodeId, maxNodeId) {
|
|
39390
|
+
this._features.setAnimationNodeIds(populateAnimationNodeIds(this, computeNodeId, maxNodeId));
|
|
39391
|
+
}
|
|
39378
39392
|
}
|
|
39379
39393
|
|
|
39380
39394
|
|
|
@@ -45456,6 +45470,12 @@ var RenderSchedule;
|
|
|
45456
45470
|
}
|
|
45457
45471
|
return this._discreteBatchIds;
|
|
45458
45472
|
}
|
|
45473
|
+
/** @internal see ImdlReader.readAnimationBranches */
|
|
45474
|
+
getBatchIdForFeature(feature) {
|
|
45475
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.modelId) === this.modelId);
|
|
45476
|
+
const elementTimeline = this.getTimelineForElement(feature.elementId.lower, feature.elementId.upper);
|
|
45477
|
+
return elementTimeline?.batchId ?? 0;
|
|
45478
|
+
}
|
|
45459
45479
|
}
|
|
45460
45480
|
RenderSchedule.ModelTimeline = ModelTimeline;
|
|
45461
45481
|
/** Specifies how to animate the contents of a [ViewState]($frontend) over time. The script contains any number of [[RenderSchedule.ModelTimeline]]s, each describing how
|
|
@@ -45556,6 +45576,36 @@ var RenderSchedule;
|
|
|
45556
45576
|
// Only if the script contains animation (cutting plane, transform or visibility by node ID) do we require separate tilesets for animations.
|
|
45557
45577
|
return this.requiresBatching && this.modelTimelines.some((x) => x.modelId === modelId && x.requiresBatching);
|
|
45558
45578
|
}
|
|
45579
|
+
/** The batch Ids of the subset of [[elementTimelines]] that apply a transform and/or cutting plane.
|
|
45580
|
+
* @alpha
|
|
45581
|
+
*/
|
|
45582
|
+
get discreteBatchIds() {
|
|
45583
|
+
if (this._discreteBatchIds)
|
|
45584
|
+
return this._discreteBatchIds;
|
|
45585
|
+
this._discreteBatchIds = new Set();
|
|
45586
|
+
for (const timeline of this.modelTimelines)
|
|
45587
|
+
for (const batchId of timeline.discreteBatchIds)
|
|
45588
|
+
this._discreteBatchIds.add(batchId);
|
|
45589
|
+
return this._discreteBatchIds;
|
|
45590
|
+
}
|
|
45591
|
+
/** @internal see ImdlReader.readAnimationBranches. */
|
|
45592
|
+
getBatchIdForFeature(feature) {
|
|
45593
|
+
let timeline;
|
|
45594
|
+
const prev = this._lastFeatureModelTimeline;
|
|
45595
|
+
if (prev && prev.idLower === feature.modelId.lower && prev.idUpper === feature.modelId.upper) {
|
|
45596
|
+
timeline = prev.timeline;
|
|
45597
|
+
}
|
|
45598
|
+
else {
|
|
45599
|
+
const modelId = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Id64.fromUint32PairObject(feature.modelId);
|
|
45600
|
+
timeline = this.find(modelId);
|
|
45601
|
+
this._lastFeatureModelTimeline = { timeline, idLower: feature.modelId.lower, idUpper: feature.modelId.upper };
|
|
45602
|
+
}
|
|
45603
|
+
return timeline?.getBatchIdForFeature(feature) ?? 0;
|
|
45604
|
+
}
|
|
45605
|
+
/** @alpha */
|
|
45606
|
+
get maxBatchId() {
|
|
45607
|
+
return this._maxBatchId ?? (this._maxBatchId = this.modelTimelines.reduce((accum, timeline) => Math.max(accum, timeline.maxBatchId), 0));
|
|
45608
|
+
}
|
|
45559
45609
|
}
|
|
45560
45610
|
RenderSchedule.Script = Script;
|
|
45561
45611
|
/** A reference to a [[RenderSchedule.Script]], optionally identifying the source of the script.
|
|
@@ -108548,7 +108598,6 @@ class VertexTableSplitter {
|
|
|
108548
108598
|
const vertSize = this._input.vertices.numRgbaPerVertex;
|
|
108549
108599
|
const vertex = new Uint32Array(vertSize);
|
|
108550
108600
|
const vertexTable = new Uint32Array(this._input.vertices.data.buffer, this._input.vertices.data.byteOffset, this._input.vertices.numVertices * vertSize);
|
|
108551
|
-
const elemIdPair = { lower: 0, upper: 0 };
|
|
108552
108601
|
for (const index of this._input.indices) {
|
|
108553
108602
|
// Extract the data for this vertex without allocating new typed arrays.
|
|
108554
108603
|
const vertexOffset = index * vertSize;
|
|
@@ -108558,8 +108607,7 @@ class VertexTableSplitter {
|
|
|
108558
108607
|
const featureIndex = vertex[2] & 0x00ffffff;
|
|
108559
108608
|
if (curState.featureIndex !== featureIndex) {
|
|
108560
108609
|
curState.featureIndex = featureIndex;
|
|
108561
|
-
this.
|
|
108562
|
-
const nodeId = this._computeNodeId(elemIdPair, featureIndex);
|
|
108610
|
+
const nodeId = this._computeNodeId(featureIndex);
|
|
108563
108611
|
let node = this._nodes.get(nodeId);
|
|
108564
108612
|
if (undefined === node)
|
|
108565
108613
|
this._nodes.set(nodeId, node = new Node(this._input.vertices, this._input.atlasOffset));
|
|
@@ -142907,9 +142955,7 @@ class ImdlReader {
|
|
|
142907
142955
|
this._patternGeometry.set(patternName, geometry);
|
|
142908
142956
|
return geometry;
|
|
142909
142957
|
}
|
|
142910
|
-
readAnimationBranches(output, mesh, featureTable) {
|
|
142911
|
-
const timeline = this._timeline;
|
|
142912
|
-
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== timeline);
|
|
142958
|
+
readAnimationBranches(output, mesh, featureTable, timeline) {
|
|
142913
142959
|
const primitives = mesh.primitives;
|
|
142914
142960
|
if (!primitives)
|
|
142915
142961
|
return;
|
|
@@ -142923,12 +142969,9 @@ class ImdlReader {
|
|
|
142923
142969
|
}
|
|
142924
142970
|
return branch;
|
|
142925
142971
|
};
|
|
142926
|
-
featureTable.populateAnimationNodeIds((
|
|
142927
|
-
const elementTimeline = timeline.getTimelineForElement(elemIdPair.lower, elemIdPair.upper);
|
|
142928
|
-
return elementTimeline?.batchId ?? 0;
|
|
142929
|
-
}, timeline.maxBatchId);
|
|
142972
|
+
featureTable.populateAnimationNodeIds((feature) => timeline.getBatchIdForFeature(feature), timeline.maxBatchId);
|
|
142930
142973
|
const discreteNodeIds = timeline.discreteBatchIds;
|
|
142931
|
-
const computeNodeId = (
|
|
142974
|
+
const computeNodeId = (featureIndex) => {
|
|
142932
142975
|
const nodeId = featureTable.getAnimationNodeId(featureIndex);
|
|
142933
142976
|
return 0 !== nodeId && discreteNodeIds.has(nodeId) ? nodeId : 0;
|
|
142934
142977
|
};
|
|
@@ -143030,8 +143073,7 @@ class ImdlReader {
|
|
|
143030
143073
|
if ("Node_Root" === nodeKey) {
|
|
143031
143074
|
if (this._timeline) {
|
|
143032
143075
|
// Split up the root node into transform nodes.
|
|
143033
|
-
(
|
|
143034
|
-
this.readAnimationBranches(graphics, meshValue, featureTable);
|
|
143076
|
+
this.readAnimationBranches(graphics, meshValue, featureTable, this._timeline);
|
|
143035
143077
|
}
|
|
143036
143078
|
else if (this._containsTransformNodes) {
|
|
143037
143079
|
// If transform nodes exist in the tile tree, then we need to create a branch for Node_Root so that elements not associated with
|
|
@@ -202174,6 +202216,7 @@ class BarycentricTriangle {
|
|
|
202174
202216
|
* * `d.isValid` returns true if and only if `this.normal()` is defined.
|
|
202175
202217
|
* * `d.classify` can be used to determine where P lies with respect to the triangle.
|
|
202176
202218
|
* * `d.a` is the signed projection distance: `P = p + a * this.normal()`.
|
|
202219
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/BarycentricTriangle
|
|
202177
202220
|
* @see [[fractionToPoint]]
|
|
202178
202221
|
*/
|
|
202179
202222
|
pointToFraction(point, result) {
|
|
@@ -202410,6 +202453,7 @@ class BarycentricTriangle {
|
|
|
202410
202453
|
* * The ray intersects the triangle if and only if `d.isValid` returns true, `d.a` >= 0, and `d.isInsideOrOn`
|
|
202411
202454
|
* returns true.
|
|
202412
202455
|
* * `d.classify` can be used to determine where the intersection lies with respect to the triangle.
|
|
202456
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/RayTriangleIntersection
|
|
202413
202457
|
* @see [[pointToFraction]]
|
|
202414
202458
|
*/
|
|
202415
202459
|
intersectRay3d(ray, result) {
|
|
@@ -218635,7 +218679,13 @@ class Ray3d {
|
|
|
218635
218679
|
isAlmostEqual(other) {
|
|
218636
218680
|
return this.origin.isAlmostEqual(other.origin) && this.direction.isAlmostEqual(other.direction);
|
|
218637
218681
|
}
|
|
218638
|
-
/**
|
|
218682
|
+
/**
|
|
218683
|
+
* Return the dot product of the ray's direction vector with a vector from the ray origin
|
|
218684
|
+
* to the `spacePoint`.
|
|
218685
|
+
* * If the instance is the unit normal of a plane, then this method returns the (signed) altitude
|
|
218686
|
+
* of `spacePoint` with respect to the plane.
|
|
218687
|
+
* * Visualization can be found at https://www.itwinjs.org/sandbox/SaeedTorabi/ProjectVectorOnPlane
|
|
218688
|
+
*/
|
|
218639
218689
|
dotProductToPoint(spacePoint) {
|
|
218640
218690
|
return this.direction.dotProductStartEnd(this.origin, spacePoint);
|
|
218641
218691
|
}
|
|
@@ -287819,7 +287869,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
287819
287869
|
/***/ ((module) => {
|
|
287820
287870
|
|
|
287821
287871
|
"use strict";
|
|
287822
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.
|
|
287872
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.0.0-dev.96","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","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","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/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-eslintrc -c \\"./node_modules/@itwin/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -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"},"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.0.0-dev.96","@itwin/core-bentley":"workspace:^4.0.0-dev.96","@itwin/core-common":"workspace:^4.0.0-dev.96","@itwin/core-geometry":"workspace:^4.0.0-dev.96","@itwin/core-orbitgt":"workspace:^4.0.0-dev.96","@itwin/core-quantity":"workspace:^4.0.0-dev.96"},"//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.33","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"^18.11.5","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.36.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~5.0.2","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/object-storage-azure":"^1.5.0","@itwin/cloud-agnostic-core":"^1.5.0","@itwin/object-storage-core":"^1.5.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
|
|
287823
287873
|
|
|
287824
287874
|
/***/ })
|
|
287825
287875
|
|