@itwin/ecschema-rpcinterface-tests 5.9.0-dev.3 → 5.9.0-dev.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +243 -154
- package/lib/dist/bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -35654,6 +35654,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
35654
35654
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
35655
35655
|
/* harmony export */ ChannelControlError: () => (/* binding */ ChannelControlError),
|
|
35656
35656
|
/* harmony export */ CloudSqliteError: () => (/* binding */ CloudSqliteError),
|
|
35657
|
+
/* harmony export */ EditTxnError: () => (/* binding */ EditTxnError),
|
|
35657
35658
|
/* harmony export */ ITwinSettingsError: () => (/* binding */ ITwinSettingsError),
|
|
35658
35659
|
/* harmony export */ SqliteError: () => (/* binding */ SqliteError),
|
|
35659
35660
|
/* harmony export */ ViewStoreError: () => (/* binding */ ViewStoreError),
|
|
@@ -35761,6 +35762,22 @@ var ChannelControlError;
|
|
|
35761
35762
|
}
|
|
35762
35763
|
ChannelControlError.isError = isError;
|
|
35763
35764
|
})(ChannelControlError || (ChannelControlError = {}));
|
|
35765
|
+
/** @beta */
|
|
35766
|
+
var EditTxnError;
|
|
35767
|
+
(function (EditTxnError) {
|
|
35768
|
+
/** the ITwinError scope for `EditTxnError`s. */
|
|
35769
|
+
EditTxnError.scope = "itwin-EditTxn";
|
|
35770
|
+
/** Instantiate and throw an EditTxnError */
|
|
35771
|
+
function throwError(key, message, iModelKey, description) {
|
|
35772
|
+
_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.throwError({ iTwinErrorId: { scope: EditTxnError.scope, key }, message, iModelKey, description });
|
|
35773
|
+
}
|
|
35774
|
+
EditTxnError.throwError = throwError;
|
|
35775
|
+
/** Determine whether an error object is an EditTxnError */
|
|
35776
|
+
function isError(error, key) {
|
|
35777
|
+
return _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.ITwinError.isError(error, EditTxnError.scope, key);
|
|
35778
|
+
}
|
|
35779
|
+
EditTxnError.isError = isError;
|
|
35780
|
+
})(EditTxnError || (EditTxnError = {}));
|
|
35764
35781
|
|
|
35765
35782
|
|
|
35766
35783
|
/***/ }),
|
|
@@ -43409,6 +43426,13 @@ var TxnAction;
|
|
|
43409
43426
|
|
|
43410
43427
|
"use strict";
|
|
43411
43428
|
__webpack_require__.r(__webpack_exports__);
|
|
43429
|
+
/*---------------------------------------------------------------------------------------------
|
|
43430
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
43431
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
43432
|
+
*--------------------------------------------------------------------------------------------*/
|
|
43433
|
+
/** @packageDocumentation
|
|
43434
|
+
* @module iModels
|
|
43435
|
+
*/
|
|
43412
43436
|
|
|
43413
43437
|
|
|
43414
43438
|
|
|
@@ -45427,6 +45451,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45427
45451
|
/* harmony export */ Easing: () => (/* reexport safe */ _Tween__WEBPACK_IMPORTED_MODULE_121__.Easing),
|
|
45428
45452
|
/* harmony export */ EcefLocation: () => (/* reexport safe */ _IModel__WEBPACK_IMPORTED_MODULE_70__.EcefLocation),
|
|
45429
45453
|
/* harmony export */ EdgeArgs: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_164__.EdgeArgs),
|
|
45454
|
+
/* harmony export */ EditTxnError: () => (/* reexport safe */ _ITwinCoreErrors__WEBPACK_IMPORTED_MODULE_73__.EditTxnError),
|
|
45430
45455
|
/* harmony export */ ElementGeometry: () => (/* reexport safe */ _geometry_ElementGeometry__WEBPACK_IMPORTED_MODULE_49__.ElementGeometry),
|
|
45431
45456
|
/* harmony export */ ElementGeometryChange: () => (/* reexport safe */ _ModelGeometryChanges__WEBPACK_IMPORTED_MODULE_94__.ElementGeometryChange),
|
|
45432
45457
|
/* harmony export */ ElementGeometryOpcode: () => (/* reexport safe */ _geometry_ElementGeometry__WEBPACK_IMPORTED_MODULE_49__.ElementGeometryOpcode),
|
|
@@ -82661,13 +82686,16 @@ class BriefcaseConnection extends _IModelConnection__WEBPACK_IMPORTED_MODULE_5__
|
|
|
82661
82686
|
}
|
|
82662
82687
|
/** Commit pending changes to this briefcase.
|
|
82663
82688
|
* @param description Optional description of the changes.
|
|
82689
|
+
* @deprecated Use methods on EditCommand instead.
|
|
82664
82690
|
*/
|
|
82665
82691
|
async saveChanges(description) {
|
|
82666
|
-
await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.saveChanges(this.key, description);
|
|
82692
|
+
await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.saveChanges(this.key, description); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
82667
82693
|
}
|
|
82668
|
-
/** Abandon pending changes to this briefcase.
|
|
82694
|
+
/** Abandon pending changes to this briefcase.
|
|
82695
|
+
* @deprecated Use methods on EditCommand instead.
|
|
82696
|
+
*/
|
|
82669
82697
|
async abandonChanges() {
|
|
82670
|
-
await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.abandonChanges(this.key);
|
|
82698
|
+
await _IpcApp__WEBPACK_IMPORTED_MODULE_6__.IpcApp.appFunctionIpc.abandonChanges(this.key); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
82671
82699
|
}
|
|
82672
82700
|
/** Pull (and potentially merge if there are local changes) up to a specified changeset from iModelHub into this briefcase
|
|
82673
82701
|
* @param toIndex The changeset index to pull changes to. If `undefined`, pull all changes.
|
|
@@ -83721,6 +83749,10 @@ class ContextRealityModelState extends _itwin_core_common__WEBPACK_IMPORTED_MODU
|
|
|
83721
83749
|
}
|
|
83722
83750
|
/** The tile tree reference responsible for drawing the reality model into a [[Viewport]]. */
|
|
83723
83751
|
get treeRef() { return this._treeRef; }
|
|
83752
|
+
/** @internal */
|
|
83753
|
+
detachLayerListeners() {
|
|
83754
|
+
this._treeRef.detachLayerListeners();
|
|
83755
|
+
}
|
|
83724
83756
|
/** The set of available [[ActiveSpatialClassifier]]s that can be used to classify the reality model. */
|
|
83725
83757
|
get classifiers() {
|
|
83726
83758
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(super.classifiers instanceof _SpatialClassifiersState__WEBPACK_IMPORTED_MODULE_4__.SpatialClassifiersState);
|
|
@@ -94600,9 +94632,10 @@ class SheetViewState extends _ViewState__WEBPACK_IMPORTED_MODULE_6__.ViewState2d
|
|
|
94600
94632
|
}
|
|
94601
94633
|
}
|
|
94602
94634
|
if (reload) {
|
|
94603
|
-
await this._viewAttachments.reload(this.baseModelId, iModel)
|
|
94604
|
-
|
|
94605
|
-
|
|
94635
|
+
if (await this._viewAttachments.reload(this.baseModelId, iModel)) {
|
|
94636
|
+
this._onViewAttachmentsReloaded();
|
|
94637
|
+
this.onViewAttachmentsReloaded.raiseEvent();
|
|
94638
|
+
}
|
|
94606
94639
|
}
|
|
94607
94640
|
});
|
|
94608
94641
|
}
|
|
@@ -100486,36 +100519,37 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100486
100519
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
100487
100520
|
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
100488
100521
|
/* harmony import */ var _ChangeFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./ChangeFlags */ "../../core/frontend/lib/esm/ChangeFlags.js");
|
|
100489
|
-
/* harmony import */ var
|
|
100490
|
-
/* harmony import */ var
|
|
100491
|
-
/* harmony import */ var
|
|
100492
|
-
/* harmony import */ var
|
|
100493
|
-
/* harmony import */ var
|
|
100494
|
-
/* harmony import */ var
|
|
100495
|
-
/* harmony import */ var
|
|
100496
|
-
/* harmony import */ var
|
|
100497
|
-
/* harmony import */ var
|
|
100498
|
-
/* harmony import */ var
|
|
100499
|
-
/* harmony import */ var
|
|
100500
|
-
/* harmony import */ var
|
|
100501
|
-
/* harmony import */ var
|
|
100502
|
-
/* harmony import */ var
|
|
100503
|
-
/* harmony import */ var
|
|
100504
|
-
/* harmony import */ var
|
|
100505
|
-
/* harmony import */ var
|
|
100506
|
-
/* harmony import */ var
|
|
100507
|
-
/* harmony import */ var
|
|
100508
|
-
/* harmony import */ var
|
|
100509
|
-
/* harmony import */ var
|
|
100510
|
-
/* harmony import */ var
|
|
100511
|
-
/* harmony import */ var
|
|
100512
|
-
/* harmony import */ var
|
|
100513
|
-
/* harmony import */ var
|
|
100514
|
-
/* harmony import */ var
|
|
100515
|
-
/* harmony import */ var
|
|
100516
|
-
/* harmony import */ var
|
|
100517
|
-
/* harmony import */ var
|
|
100518
|
-
/* harmony import */ var
|
|
100522
|
+
/* harmony import */ var _ContextRealityModelState__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ContextRealityModelState */ "../../core/frontend/lib/esm/ContextRealityModelState.js");
|
|
100523
|
+
/* harmony import */ var _CoordSystem__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./CoordSystem */ "../../core/frontend/lib/esm/CoordSystem.js");
|
|
100524
|
+
/* harmony import */ var _DecorationsCache__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./DecorationsCache */ "../../core/frontend/lib/esm/DecorationsCache.js");
|
|
100525
|
+
/* harmony import */ var _ElementLocateManager__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./ElementLocateManager */ "../../core/frontend/lib/esm/ElementLocateManager.js");
|
|
100526
|
+
/* harmony import */ var _FrustumAnimator__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./FrustumAnimator */ "../../core/frontend/lib/esm/FrustumAnimator.js");
|
|
100527
|
+
/* harmony import */ var _GlobeAnimator__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./GlobeAnimator */ "../../core/frontend/lib/esm/GlobeAnimator.js");
|
|
100528
|
+
/* harmony import */ var _HitDetail__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./HitDetail */ "../../core/frontend/lib/esm/HitDetail.js");
|
|
100529
|
+
/* harmony import */ var _IModelApp__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./IModelApp */ "../../core/frontend/lib/esm/IModelApp.js");
|
|
100530
|
+
/* harmony import */ var _LinePlaneIntersect__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./LinePlaneIntersect */ "../../core/frontend/lib/esm/LinePlaneIntersect.js");
|
|
100531
|
+
/* harmony import */ var _PerModelCategoryVisibility__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./PerModelCategoryVisibility */ "../../core/frontend/lib/esm/PerModelCategoryVisibility.js");
|
|
100532
|
+
/* harmony import */ var _render_Decorations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./render/Decorations */ "../../core/frontend/lib/esm/render/Decorations.js");
|
|
100533
|
+
/* harmony import */ var _render_FeatureSymbology__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./render/FeatureSymbology */ "../../core/frontend/lib/esm/render/FeatureSymbology.js");
|
|
100534
|
+
/* harmony import */ var _internal_render_FrameStatsCollector__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./internal/render/FrameStatsCollector */ "../../core/frontend/lib/esm/internal/render/FrameStatsCollector.js");
|
|
100535
|
+
/* harmony import */ var _internal_render_AnimationBranchState__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./internal/render/AnimationBranchState */ "../../core/frontend/lib/esm/internal/render/AnimationBranchState.js");
|
|
100536
|
+
/* harmony import */ var _render_Pixel__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./render/Pixel */ "../../core/frontend/lib/esm/render/Pixel.js");
|
|
100537
|
+
/* harmony import */ var _internal_render_RenderPlan__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./internal/render/RenderPlan */ "../../core/frontend/lib/esm/internal/render/RenderPlan.js");
|
|
100538
|
+
/* harmony import */ var _StandardView__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./StandardView */ "../../core/frontend/lib/esm/StandardView.js");
|
|
100539
|
+
/* harmony import */ var _SubCategoriesCache__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./SubCategoriesCache */ "../../core/frontend/lib/esm/SubCategoriesCache.js");
|
|
100540
|
+
/* harmony import */ var _tile_internal__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./tile/internal */ "../../core/frontend/lib/esm/tile/internal.js");
|
|
100541
|
+
/* harmony import */ var _tools_EventController__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./tools/EventController */ "../../core/frontend/lib/esm/tools/EventController.js");
|
|
100542
|
+
/* harmony import */ var _tools_ToolSettings__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./tools/ToolSettings */ "../../core/frontend/lib/esm/tools/ToolSettings.js");
|
|
100543
|
+
/* harmony import */ var _ViewContext__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./ViewContext */ "../../core/frontend/lib/esm/ViewContext.js");
|
|
100544
|
+
/* harmony import */ var _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ViewGlobalLocation */ "../../core/frontend/lib/esm/ViewGlobalLocation.js");
|
|
100545
|
+
/* harmony import */ var _ViewingSpace__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ViewingSpace */ "../../core/frontend/lib/esm/ViewingSpace.js");
|
|
100546
|
+
/* harmony import */ var _common_ViewRect__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./common/ViewRect */ "../../core/frontend/lib/esm/common/ViewRect.js");
|
|
100547
|
+
/* harmony import */ var _ViewStatus__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./ViewStatus */ "../../core/frontend/lib/esm/ViewStatus.js");
|
|
100548
|
+
/* harmony import */ var _internal_render_QueryVisibileFeatures__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./internal/render/QueryVisibileFeatures */ "../../core/frontend/lib/esm/internal/render/QueryVisibileFeatures.js");
|
|
100549
|
+
/* harmony import */ var _FlashSettings__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./FlashSettings */ "../../core/frontend/lib/esm/FlashSettings.js");
|
|
100550
|
+
/* harmony import */ var _ModelState__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./ModelState */ "../../core/frontend/lib/esm/ModelState.js");
|
|
100551
|
+
/* harmony import */ var _common_render_GraphicType__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./common/render/GraphicType */ "../../core/frontend/lib/esm/common/render/GraphicType.js");
|
|
100552
|
+
/* harmony import */ var _internal_render_webgl_MapLayerParams__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./internal/render/webgl/MapLayerParams */ "../../core/frontend/lib/esm/internal/render/webgl/MapLayerParams.js");
|
|
100519
100553
|
/*---------------------------------------------------------------------------------------------
|
|
100520
100554
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
100521
100555
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -100555,6 +100589,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
100555
100589
|
|
|
100556
100590
|
|
|
100557
100591
|
|
|
100592
|
+
|
|
100558
100593
|
|
|
100559
100594
|
|
|
100560
100595
|
/** Source of depth point returned by [[Viewport.pickDepthPoint]].
|
|
@@ -100723,7 +100758,7 @@ class Viewport {
|
|
|
100723
100758
|
*/
|
|
100724
100759
|
invalidateDecorations() {
|
|
100725
100760
|
this._decorationsValid = false;
|
|
100726
|
-
|
|
100761
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
100727
100762
|
}
|
|
100728
100763
|
/** Mark the viewport's scene as having changed, so that the next call to [[renderFrame]] will recreate it.
|
|
100729
100764
|
* This method is not typically invoked directly - the scene is automatically invalidated in response to events such as moving the viewing frustum,
|
|
@@ -100761,7 +100796,7 @@ class Viewport {
|
|
|
100761
100796
|
*/
|
|
100762
100797
|
requestRedraw() {
|
|
100763
100798
|
this._redrawPending = true;
|
|
100764
|
-
|
|
100799
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
100765
100800
|
}
|
|
100766
100801
|
_animator;
|
|
100767
100802
|
/** @internal */
|
|
@@ -100770,7 +100805,7 @@ class Viewport {
|
|
|
100770
100805
|
_perModelCategoryVisibility;
|
|
100771
100806
|
_tileSizeModifier;
|
|
100772
100807
|
/** @internal */
|
|
100773
|
-
subcategories = new
|
|
100808
|
+
subcategories = new _SubCategoriesCache__WEBPACK_IMPORTED_MODULE_21__.SubCategoriesCache.Queue();
|
|
100774
100809
|
/** Time the current flash started. */
|
|
100775
100810
|
_flashUpdateTime;
|
|
100776
100811
|
/** Current flash intensity from [0..this.flashSettings.maxIntensity] */
|
|
@@ -100818,7 +100853,7 @@ class Viewport {
|
|
|
100818
100853
|
}
|
|
100819
100854
|
/** Don't allow entries in the view undo buffer unless they're separated by more than this amount of time. */
|
|
100820
100855
|
static undoDelay = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.fromSeconds(.5);
|
|
100821
|
-
_debugBoundingBoxes =
|
|
100856
|
+
_debugBoundingBoxes = _tile_internal__WEBPACK_IMPORTED_MODULE_22__.TileBoundingBoxes.None;
|
|
100822
100857
|
_freezeScene = false;
|
|
100823
100858
|
_viewingSpace;
|
|
100824
100859
|
_target;
|
|
@@ -100831,7 +100866,7 @@ class Viewport {
|
|
|
100831
100866
|
_mapTiledGraphicsProvider;
|
|
100832
100867
|
_hilite = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Settings();
|
|
100833
100868
|
_emphasis = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Settings(_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.black, 0, 0, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Hilite.Silhouette.Thick);
|
|
100834
|
-
_flash = new
|
|
100869
|
+
_flash = new _FlashSettings__WEBPACK_IMPORTED_MODULE_31__.FlashSettings();
|
|
100835
100870
|
/** See [DisplayStyle3dSettings.lights]($common) */
|
|
100836
100871
|
get lightSettings() {
|
|
100837
100872
|
return this.displayStyle.is3d() ? this.displayStyle.settings.lights : undefined;
|
|
@@ -100875,7 +100910,7 @@ class Viewport {
|
|
|
100875
100910
|
this.displayStyle.settings.timePoint = time;
|
|
100876
100911
|
}
|
|
100877
100912
|
/** @internal */
|
|
100878
|
-
_viewRange = new
|
|
100913
|
+
_viewRange = new _common_ViewRect__WEBPACK_IMPORTED_MODULE_28__.ViewRect();
|
|
100879
100914
|
/** @internal */
|
|
100880
100915
|
get isAspectRatioLocked() { return false; }
|
|
100881
100916
|
/** @internal */
|
|
@@ -101121,7 +101156,7 @@ class Viewport {
|
|
|
101121
101156
|
if (treeRef) {
|
|
101122
101157
|
return treeRef.getMapLayerScaleRangeVisibility(mapLayerIndex.index);
|
|
101123
101158
|
}
|
|
101124
|
-
return
|
|
101159
|
+
return _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapTileTreeScaleRangeVisibility.Unknown;
|
|
101125
101160
|
}
|
|
101126
101161
|
/** Return a list of map-layers indexes matching a given MapTile tree Id and a layer imagery tree id.
|
|
101127
101162
|
* Note: A imagery tree can be shared for multiple map-layers.
|
|
@@ -101144,18 +101179,18 @@ class Viewport {
|
|
|
101144
101179
|
if (!ecefTransform)
|
|
101145
101180
|
return undefined;
|
|
101146
101181
|
const model = this.iModel.models.getLoaded(mapLayerSettings.modelId);
|
|
101147
|
-
if (!model || !(model instanceof
|
|
101182
|
+
if (!model || !(model instanceof _ModelState__WEBPACK_IMPORTED_MODULE_32__.GeometricModelState))
|
|
101148
101183
|
return undefined;
|
|
101149
101184
|
const modelRange = await model.queryModelRange();
|
|
101150
101185
|
const cartoRange = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.CartographicRange(modelRange, ecefTransform).getLongitudeLatitudeBoundingBox();
|
|
101151
|
-
return
|
|
101186
|
+
return _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapCartoRectangle.fromRadians(cartoRange.low.x, cartoRange.low.y, cartoRange.high.x, cartoRange.high.y);
|
|
101152
101187
|
}
|
|
101153
101188
|
const imageryProvider = this.getMapLayerImageryProvider(mapLayerIndex);
|
|
101154
101189
|
if (undefined === imageryProvider)
|
|
101155
101190
|
return undefined;
|
|
101156
101191
|
const tileTreeRef = mapLayerIndex.isOverlay ? this.overlayMap : this.backgroundMap;
|
|
101157
101192
|
const imageryTreeRef = tileTreeRef?.getLayerImageryTreeRef(mapLayerIndex.index);
|
|
101158
|
-
if (imageryTreeRef?.treeOwner.loadStatus ===
|
|
101193
|
+
if (imageryTreeRef?.treeOwner.loadStatus === _tile_internal__WEBPACK_IMPORTED_MODULE_22__.TileTreeLoadStatus.Loaded) {
|
|
101159
101194
|
return imageryProvider.cartoRange;
|
|
101160
101195
|
}
|
|
101161
101196
|
else {
|
|
@@ -101171,9 +101206,9 @@ class Viewport {
|
|
|
101171
101206
|
if (!range)
|
|
101172
101207
|
return false;
|
|
101173
101208
|
if (range.xLength() > 1.5 * _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Angle.piRadians)
|
|
101174
|
-
(0,
|
|
101209
|
+
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.viewGlobalLocation)(vp, true, _ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.ViewGlobalLocationConstants.satelliteHeightAboveEarthInMeters, undefined, undefined);
|
|
101175
101210
|
else
|
|
101176
|
-
(0,
|
|
101211
|
+
(0,_ViewGlobalLocation__WEBPACK_IMPORTED_MODULE_26__.viewGlobalLocation)(vp, true, undefined, undefined, range.globalLocation);
|
|
101177
101212
|
return true;
|
|
101178
101213
|
}
|
|
101179
101214
|
/** Fully reset a map-layer tile tree; by calling this, the map-layer will to go through initialize process again, and all previously fetched tile will be lost.
|
|
@@ -101289,9 +101324,9 @@ class Viewport {
|
|
|
101289
101324
|
/** @internal */
|
|
101290
101325
|
get isPointAdjustmentRequired() { return this.view.is3d(); }
|
|
101291
101326
|
/** @internal */
|
|
101292
|
-
get isSnapAdjustmentRequired() { return
|
|
101327
|
+
get isSnapAdjustmentRequired() { return _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.toolAdmin.acsPlaneSnapLock && this.view.is3d(); }
|
|
101293
101328
|
/** @internal */
|
|
101294
|
-
get isContextRotationRequired() { return
|
|
101329
|
+
get isContextRotationRequired() { return _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.toolAdmin.acsContextLock; }
|
|
101295
101330
|
/** Enables or disables "fade-out" mode. When this mode is enabled, transparent graphics are rendered with a flat alpha weight,
|
|
101296
101331
|
* causing them to appear de-emphasized. This is typically used in contexts in which a handful of elements are to be emphasized in the view,
|
|
101297
101332
|
* while the rest of the graphics are drawn transparently.
|
|
@@ -101352,7 +101387,7 @@ class Viewport {
|
|
|
101352
101387
|
* @alpha
|
|
101353
101388
|
*/
|
|
101354
101389
|
onFrameStats = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
101355
|
-
_frameStatsCollector = new
|
|
101390
|
+
_frameStatsCollector = new _internal_render_FrameStatsCollector__WEBPACK_IMPORTED_MODULE_16__.FrameStatsCollector(this.onFrameStats);
|
|
101356
101391
|
/** A function invoked once, after the constructor, to initialize the viewport's state.
|
|
101357
101392
|
* Subclasses can use this perform additional initialization, as the viewport's constructor is not directly invokable.
|
|
101358
101393
|
*/
|
|
@@ -101362,16 +101397,16 @@ class Viewport {
|
|
|
101362
101397
|
constructor(target) {
|
|
101363
101398
|
this._target = target;
|
|
101364
101399
|
target.assignFrameStatsCollector(this._frameStatsCollector);
|
|
101365
|
-
this._viewportId =
|
|
101366
|
-
this._perModelCategoryVisibility =
|
|
101367
|
-
|
|
101400
|
+
this._viewportId = _tile_internal__WEBPACK_IMPORTED_MODULE_22__.TileUser.generateId();
|
|
101401
|
+
this._perModelCategoryVisibility = _PerModelCategoryVisibility__WEBPACK_IMPORTED_MODULE_13__.PerModelCategoryVisibility.createOverrides(this);
|
|
101402
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.registerUser(this);
|
|
101368
101403
|
}
|
|
101369
101404
|
[Symbol.dispose]() {
|
|
101370
101405
|
if (this.isDisposed)
|
|
101371
101406
|
return;
|
|
101372
101407
|
this._target = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.dispose)(this._target);
|
|
101373
101408
|
this.subcategories[Symbol.dispose]();
|
|
101374
|
-
|
|
101409
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.forgetUser(this);
|
|
101375
101410
|
this.onDisposed.raiseEvent(this);
|
|
101376
101411
|
this.detachFromView();
|
|
101377
101412
|
}
|
|
@@ -101397,7 +101432,7 @@ class Viewport {
|
|
|
101397
101432
|
this.registerDisplayStyleListeners(this.view.displayStyle);
|
|
101398
101433
|
this.registerViewListeners();
|
|
101399
101434
|
this.view.attachToViewport(this);
|
|
101400
|
-
this._mapTiledGraphicsProvider = new
|
|
101435
|
+
this._mapTiledGraphicsProvider = new _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapTiledGraphicsProvider(this.viewportId, this.displayStyle);
|
|
101401
101436
|
// ViewState.load loads all the subcategories for the categories in its category selector.
|
|
101402
101437
|
// But the set of categories may have changed since loading the view.
|
|
101403
101438
|
// Ensure we fill the cache for the current set of categories.
|
|
@@ -101420,7 +101455,7 @@ class Viewport {
|
|
|
101420
101455
|
this.setFeatureOverrideProviderChanged();
|
|
101421
101456
|
this.invalidateRenderPlan();
|
|
101422
101457
|
this.detachFromDisplayStyle();
|
|
101423
|
-
this._mapTiledGraphicsProvider = new
|
|
101458
|
+
this._mapTiledGraphicsProvider = new _tile_internal__WEBPACK_IMPORTED_MODULE_22__.MapTiledGraphicsProvider(this.viewportId, newStyle);
|
|
101424
101459
|
this.registerDisplayStyleListeners(newStyle);
|
|
101425
101460
|
}));
|
|
101426
101461
|
if (view.isSpatialView()) {
|
|
@@ -101467,7 +101502,12 @@ class Viewport {
|
|
|
101467
101502
|
removals.push(settings.contextRealityModels.onDisplaySettingsChanged.addListener(displayStyleChanged));
|
|
101468
101503
|
removals.push(settings.contextRealityModels.onInvisibleChanged.addListener(invalidateControllerAndDisplayStyleChanged));
|
|
101469
101504
|
removals.push(settings.onRealityModelDisplaySettingsChanged.addListener(displayStyleChanged));
|
|
101470
|
-
removals.push(settings.contextRealityModels.onChanged.addListener(
|
|
101505
|
+
removals.push(settings.contextRealityModels.onChanged.addListener((previousModel, _newModel) => {
|
|
101506
|
+
displayStyleChanged();
|
|
101507
|
+
// When a reality model is removed or replaced, detach its layer listeners to prevent leaks.
|
|
101508
|
+
if (previousModel instanceof _ContextRealityModelState__WEBPACK_IMPORTED_MODULE_4__.ContextRealityModelState)
|
|
101509
|
+
previousModel.detachLayerListeners();
|
|
101510
|
+
}));
|
|
101471
101511
|
removals.push(style.onOSMBuildingDisplayChanged.addListener(() => {
|
|
101472
101512
|
displayStyleChanged();
|
|
101473
101513
|
this.synchWithView({ noSaveInUndo: true }); // May change frustum depth.
|
|
@@ -101475,7 +101515,7 @@ class Viewport {
|
|
|
101475
101515
|
const analysisChanged = () => {
|
|
101476
101516
|
this._changeFlags.setDisplayStyle();
|
|
101477
101517
|
this._analysisFractionValid = false;
|
|
101478
|
-
|
|
101518
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
101479
101519
|
};
|
|
101480
101520
|
const analysisStyleChanged = () => {
|
|
101481
101521
|
this.invalidateRenderPlan();
|
|
@@ -101487,7 +101527,7 @@ class Viewport {
|
|
|
101487
101527
|
this._timePointValid = false;
|
|
101488
101528
|
this._changeFlags.setDisplayStyle();
|
|
101489
101529
|
this.setFeatureOverrideProviderChanged();
|
|
101490
|
-
|
|
101530
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
101491
101531
|
};
|
|
101492
101532
|
const scriptChanged = () => {
|
|
101493
101533
|
scheduleChanged();
|
|
@@ -101558,6 +101598,13 @@ class Viewport {
|
|
|
101558
101598
|
detachFromDisplayStyle() {
|
|
101559
101599
|
this._detachFromDisplayStyle.forEach((f) => f());
|
|
101560
101600
|
this._detachFromDisplayStyle.length = 0;
|
|
101601
|
+
// Detach layer listeners from reality model tree refs to prevent leaks.
|
|
101602
|
+
if (this._view) {
|
|
101603
|
+
for (const model of this.displayStyle.settings.contextRealityModels.models) {
|
|
101604
|
+
if (model instanceof _ContextRealityModelState__WEBPACK_IMPORTED_MODULE_4__.ContextRealityModelState)
|
|
101605
|
+
model.detachLayerListeners();
|
|
101606
|
+
}
|
|
101607
|
+
}
|
|
101561
101608
|
if (this._mapTiledGraphicsProvider) {
|
|
101562
101609
|
this._mapTiledGraphicsProvider.detachFromDisplayStyle();
|
|
101563
101610
|
this._mapTiledGraphicsProvider = undefined;
|
|
@@ -101578,7 +101625,7 @@ class Viewport {
|
|
|
101578
101625
|
if (contRend !== this._doContinuousRendering) {
|
|
101579
101626
|
this._doContinuousRendering = contRend;
|
|
101580
101627
|
if (contRend)
|
|
101581
|
-
|
|
101628
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
101582
101629
|
}
|
|
101583
101630
|
}
|
|
101584
101631
|
/** A unique integer Id assigned to this Viewport upon construction.
|
|
@@ -101751,7 +101798,7 @@ class Viewport {
|
|
|
101751
101798
|
/** @internal */
|
|
101752
101799
|
*tiledGraphicsProviderRefs() {
|
|
101753
101800
|
for (const provider of this.tiledGraphicsProviders) {
|
|
101754
|
-
yield*
|
|
101801
|
+
yield* _tile_internal__WEBPACK_IMPORTED_MODULE_22__.TiledGraphicsProvider.getTileTreeRefs(provider, this);
|
|
101755
101802
|
}
|
|
101756
101803
|
}
|
|
101757
101804
|
/** Apply a function to every tile tree reference associated with the map layers displayed by this viewport.
|
|
@@ -101786,10 +101833,10 @@ class Viewport {
|
|
|
101786
101833
|
get areAllTileTreesLoaded() {
|
|
101787
101834
|
if (!this.view.areAllTileTreesLoaded)
|
|
101788
101835
|
return false;
|
|
101789
|
-
if (this._mapTiledGraphicsProvider && !
|
|
101836
|
+
if (this._mapTiledGraphicsProvider && !_tile_internal__WEBPACK_IMPORTED_MODULE_22__.TiledGraphicsProvider.isLoadingComplete(this._mapTiledGraphicsProvider, this))
|
|
101790
101837
|
return false;
|
|
101791
101838
|
for (const provider of this._tiledGraphicsProviders)
|
|
101792
|
-
if (!
|
|
101839
|
+
if (!_tile_internal__WEBPACK_IMPORTED_MODULE_22__.TiledGraphicsProvider.isLoadingComplete(provider, this))
|
|
101793
101840
|
return false;
|
|
101794
101841
|
return true;
|
|
101795
101842
|
}
|
|
@@ -101897,7 +101944,7 @@ class Viewport {
|
|
|
101897
101944
|
/** The number of outstanding requests for tiles to be displayed in this viewport.
|
|
101898
101945
|
* @see Viewport.numSelectedTiles
|
|
101899
101946
|
*/
|
|
101900
|
-
get numRequestedTiles() { return
|
|
101947
|
+
get numRequestedTiles() { return _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.getNumRequestsForUser(this); }
|
|
101901
101948
|
/** The number of tiles selected for display in the view as of the most recently-drawn frame.
|
|
101902
101949
|
* The tiles selected may not meet the desired level-of-detail for the view, instead being temporarily drawn while
|
|
101903
101950
|
* tiles of more appropriate level-of-detail are loaded asynchronously.
|
|
@@ -101905,7 +101952,7 @@ class Viewport {
|
|
|
101905
101952
|
* @see Viewport.numReadyTiles
|
|
101906
101953
|
*/
|
|
101907
101954
|
get numSelectedTiles() {
|
|
101908
|
-
const tiles =
|
|
101955
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.getTilesForUser(this);
|
|
101909
101956
|
return undefined !== tiles ? tiles.selected.size + tiles.external.selected : 0;
|
|
101910
101957
|
}
|
|
101911
101958
|
/** The number of tiles which were ready and met the desired level-of-detail for display in the view as of the most recently-drawn frame.
|
|
@@ -101916,7 +101963,7 @@ class Viewport {
|
|
|
101916
101963
|
* @see Viewport.numRequestedTiles
|
|
101917
101964
|
*/
|
|
101918
101965
|
get numReadyTiles() {
|
|
101919
|
-
const tiles =
|
|
101966
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.getTilesForUser(this);
|
|
101920
101967
|
return undefined !== tiles ? tiles.ready.size + tiles.external.ready : 0;
|
|
101921
101968
|
}
|
|
101922
101969
|
/** @internal */
|
|
@@ -101932,7 +101979,7 @@ class Viewport {
|
|
|
101932
101979
|
this.updateChangeFlags(view);
|
|
101933
101980
|
this.doSetupFromView(view);
|
|
101934
101981
|
this.invalidateController();
|
|
101935
|
-
const isMapLayerChanged = undefined !== prevView && (0,
|
|
101982
|
+
const isMapLayerChanged = undefined !== prevView && (0,_internal_render_webgl_MapLayerParams__WEBPACK_IMPORTED_MODULE_34__.compareMapLayer)(prevView, view);
|
|
101936
101983
|
this.target.reset(isMapLayerChanged); // Handle Reality Map Tile Map Layer changes & update logic
|
|
101937
101984
|
if (undefined !== prevView && prevView !== view) {
|
|
101938
101985
|
this.onChangeView.raiseEvent(this, prevView);
|
|
@@ -101944,17 +101991,17 @@ class Viewport {
|
|
|
101944
101991
|
* @param coordSys the coordinate system of the specified point
|
|
101945
101992
|
* @param borderPaddingFactor optional border for testing with inset view rectangle.
|
|
101946
101993
|
*/
|
|
101947
|
-
isPointVisibleXY(point, coordSys =
|
|
101994
|
+
isPointVisibleXY(point, coordSys = _CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.World, borderPaddingFactor = 0.0) {
|
|
101948
101995
|
let testPtView = point;
|
|
101949
101996
|
switch (coordSys) {
|
|
101950
|
-
case
|
|
101997
|
+
case _CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.Npc:
|
|
101951
101998
|
testPtView = this.npcToView(point);
|
|
101952
101999
|
break;
|
|
101953
|
-
case
|
|
102000
|
+
case _CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.World:
|
|
101954
102001
|
testPtView = this.worldToView(point);
|
|
101955
102002
|
break;
|
|
101956
102003
|
}
|
|
101957
|
-
const frustum = this.getFrustum(
|
|
102004
|
+
const frustum = this.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.View);
|
|
101958
102005
|
const screenRangeX = frustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Npc._000].distance(frustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Npc._100]);
|
|
101959
102006
|
const screenRangeY = frustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Npc._000].distance(frustum.points[_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Npc._010]);
|
|
101960
102007
|
const xBorder = screenRangeX * borderPaddingFactor;
|
|
@@ -101978,7 +102025,7 @@ class Viewport {
|
|
|
101978
102025
|
if (undefined === readRect)
|
|
101979
102026
|
return undefined;
|
|
101980
102027
|
let retVal;
|
|
101981
|
-
this.readPixels(readRect,
|
|
102028
|
+
this.readPixels(readRect, _render_Pixel__WEBPACK_IMPORTED_MODULE_18__.Pixel.Selector.GeometryAndDistance, (pixels) => {
|
|
101982
102029
|
if (!pixels)
|
|
101983
102030
|
return;
|
|
101984
102031
|
readRect.left = this.cssPixelsToDevicePixels(readRect.left);
|
|
@@ -102029,7 +102076,7 @@ class Viewport {
|
|
|
102029
102076
|
turnCameraOn(lensAngle) {
|
|
102030
102077
|
const view = this.view;
|
|
102031
102078
|
if (!view.is3d() || !view.supportsCamera())
|
|
102032
|
-
return
|
|
102079
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
102033
102080
|
if (!lensAngle)
|
|
102034
102081
|
lensAngle = view.camera.lens;
|
|
102035
102082
|
_itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Camera.validateLensAngle(lensAngle);
|
|
@@ -102057,7 +102104,7 @@ class Viewport {
|
|
|
102057
102104
|
const frontDistance = view.minimumFrontDistance();
|
|
102058
102105
|
status = view.lookAt({ eyePoint, targetPoint, upVector: view.getYVector(), lensAngle, frontDistance, backDistance });
|
|
102059
102106
|
}
|
|
102060
|
-
if (
|
|
102107
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === status)
|
|
102061
102108
|
this.setupFromView();
|
|
102062
102109
|
return status;
|
|
102063
102110
|
}
|
|
@@ -102068,20 +102115,20 @@ class Viewport {
|
|
|
102068
102115
|
}
|
|
102069
102116
|
doSetupFromView(view) {
|
|
102070
102117
|
if (this._inViewChangedEvent)
|
|
102071
|
-
return
|
|
102118
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success; // ignore echos
|
|
102072
102119
|
if (!this.isAspectRatioLocked)
|
|
102073
102120
|
view.fixAspectRatio(this.viewRect.aspect);
|
|
102074
102121
|
this.setView(view);
|
|
102075
|
-
const viewSpace =
|
|
102122
|
+
const viewSpace = _ViewingSpace__WEBPACK_IMPORTED_MODULE_27__.ViewingSpace.createFromViewport(this);
|
|
102076
102123
|
if (undefined === viewSpace)
|
|
102077
|
-
return
|
|
102124
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
102078
102125
|
this._viewingSpace = viewSpace;
|
|
102079
102126
|
this.invalidateRenderPlan();
|
|
102080
102127
|
this._controllerValid = true;
|
|
102081
102128
|
this._inViewChangedEvent = true;
|
|
102082
102129
|
this.onViewChanged.raiseEvent(this);
|
|
102083
102130
|
this._inViewChangedEvent = false;
|
|
102084
|
-
return
|
|
102131
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success;
|
|
102085
102132
|
}
|
|
102086
102133
|
/** Establish the parameters of this Viewport from the current information in its ViewState */
|
|
102087
102134
|
setupFromView(pose) {
|
|
@@ -102167,9 +102214,9 @@ class Viewport {
|
|
|
102167
102214
|
* @return the view frustum
|
|
102168
102215
|
* @note The "adjusted" box may be either larger or smaller than the "unadjusted" box.
|
|
102169
102216
|
*/
|
|
102170
|
-
getFrustum(sys =
|
|
102217
|
+
getFrustum(sys = _CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.World, adjustedBox = true, box) { return this._viewingSpace.getFrustum(sys, adjustedBox, box); }
|
|
102171
102218
|
/** Get a copy of the current (unadjusted) frustum of this viewport, in world coordinates. */
|
|
102172
|
-
getWorldFrustum(box) { return this.getFrustum(
|
|
102219
|
+
getWorldFrustum(box) { return this.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.World, false, box); }
|
|
102173
102220
|
/** Scroll the view by a given number of pixels.
|
|
102174
102221
|
* @param screenDist distance to scroll, in pixels
|
|
102175
102222
|
*/
|
|
@@ -102179,7 +102226,7 @@ class Viewport {
|
|
|
102179
102226
|
return;
|
|
102180
102227
|
const distXYZ = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Point3d(screenDist.x, screenDist.y, 0);
|
|
102181
102228
|
if (view.is3d() && view.isCameraOn) {
|
|
102182
|
-
const frust = this.getFrustum(
|
|
102229
|
+
const frust = this.getFrustum(_CoordSystem__WEBPACK_IMPORTED_MODULE_5__.CoordSystem.View, false);
|
|
102183
102230
|
frust.translate(distXYZ);
|
|
102184
102231
|
this.viewToWorldArray(frust.points);
|
|
102185
102232
|
view.setupFromFrustum(frust);
|
|
@@ -102201,7 +102248,7 @@ class Viewport {
|
|
|
102201
102248
|
zoom(newCenter, factor, options) {
|
|
102202
102249
|
const view = this.view;
|
|
102203
102250
|
if (undefined === view)
|
|
102204
|
-
return
|
|
102251
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.InvalidViewport;
|
|
102205
102252
|
if (view.is3d() && view.isCameraOn) {
|
|
102206
102253
|
const eyePoint = view.getEyePoint().clone();
|
|
102207
102254
|
const targetPoint = view.getTargetPoint();
|
|
@@ -102215,7 +102262,7 @@ class Viewport {
|
|
|
102215
102262
|
transform.multiplyPoint3d(eyePoint, eyePoint);
|
|
102216
102263
|
targetPoint.setFrom(eyePoint.plusScaled(zDir, zDir.dotProduct(eyePoint.vectorTo(targetPoint))));
|
|
102217
102264
|
const status = view.lookAt({ eyePoint, targetPoint, upVector: view.getYVector(), lensAngle: view.camera.lens });
|
|
102218
|
-
if (
|
|
102265
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success !== status)
|
|
102219
102266
|
return status;
|
|
102220
102267
|
}
|
|
102221
102268
|
else {
|
|
@@ -102226,7 +102273,7 @@ class Viewport {
|
|
|
102226
102273
|
const center = rot.multiplyVector(newCenter ? newCenter : view.getCenter());
|
|
102227
102274
|
// fix for min/max delta
|
|
102228
102275
|
const stat = view.adjustViewDelta(delta, center, rot, this.viewRect.aspect, options);
|
|
102229
|
-
if (
|
|
102276
|
+
if (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success !== stat)
|
|
102230
102277
|
return stat;
|
|
102231
102278
|
if (!view.allow3dManipulations())
|
|
102232
102279
|
center.z = 0.0;
|
|
@@ -102234,7 +102281,7 @@ class Viewport {
|
|
|
102234
102281
|
view.setExtents(delta);
|
|
102235
102282
|
}
|
|
102236
102283
|
this.synchWithView(options);
|
|
102237
|
-
return
|
|
102284
|
+
return _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success;
|
|
102238
102285
|
}
|
|
102239
102286
|
/** See [[zoomToPlacements]]. */
|
|
102240
102287
|
zoomToPlacementProps(placementProps, options) {
|
|
@@ -102258,7 +102305,7 @@ class Viewport {
|
|
|
102258
102305
|
view.setStandardRotation(options.standardViewId);
|
|
102259
102306
|
}
|
|
102260
102307
|
else if (undefined !== options.placementRelativeId) {
|
|
102261
|
-
const viewRotation =
|
|
102308
|
+
const viewRotation = _StandardView__WEBPACK_IMPORTED_MODULE_20__.StandardView.getStandardRotation(options.placementRelativeId).clone();
|
|
102262
102309
|
viewRotation.multiplyMatrixMatrixTranspose(placements[0].transform.matrix, viewRotation);
|
|
102263
102310
|
view.setRotation(viewRotation);
|
|
102264
102311
|
}
|
|
@@ -102273,7 +102320,7 @@ class Viewport {
|
|
|
102273
102320
|
viewRange.extendArray(placement.getWorldCorners(frust).points, viewTransform);
|
|
102274
102321
|
const ignoreError = {
|
|
102275
102322
|
...options,
|
|
102276
|
-
onExtentsError: () =>
|
|
102323
|
+
onExtentsError: () => _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success,
|
|
102277
102324
|
};
|
|
102278
102325
|
view.lookAtViewAlignedVolume(viewRange, this.viewRect.aspect, ignoreError);
|
|
102279
102326
|
this.synchWithView(options);
|
|
@@ -102323,7 +102370,7 @@ class Viewport {
|
|
|
102323
102370
|
setupViewFromFrustum(inFrustum) {
|
|
102324
102371
|
const validSize = this.view.setupFromFrustum(inFrustum);
|
|
102325
102372
|
// note: always call setupFromView, even if setupFromFrustum failed
|
|
102326
|
-
return (
|
|
102373
|
+
return (_ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === this.setupFromView() && _ViewStatus__WEBPACK_IMPORTED_MODULE_29__.ViewStatus.Success === validSize);
|
|
102327
102374
|
}
|
|
102328
102375
|
/** Compute the range of all geometry to be displayed in this viewport. */
|
|
102329
102376
|
computeViewRange() {
|
|
@@ -102424,7 +102471,7 @@ class Viewport {
|
|
|
102424
102471
|
else
|
|
102425
102472
|
eyeVec = this._viewingSpace.rotation.getRow(2);
|
|
102426
102473
|
eyeVec.normalizeInPlace();
|
|
102427
|
-
(0,
|
|
102474
|
+
(0,_LinePlaneIntersect__WEBPACK_IMPORTED_MODULE_12__.linePlaneIntersect)(point, point, eyeVec, origin, planeNormal, false);
|
|
102428
102475
|
// // get origin and point in view coordinate system
|
|
102429
102476
|
const pointView = point.clone();
|
|
102430
102477
|
const originView = origin.clone();
|
|
@@ -102503,7 +102550,7 @@ class Viewport {
|
|
|
102503
102550
|
}
|
|
102504
102551
|
/** Create a context appropriate for producing the scene to be rendered by this viewport, e.g., by [[createScene]]. */
|
|
102505
102552
|
createSceneContext() {
|
|
102506
|
-
return new
|
|
102553
|
+
return new _ViewContext__WEBPACK_IMPORTED_MODULE_25__.SceneContext(this);
|
|
102507
102554
|
}
|
|
102508
102555
|
/** Populate the context with the scene to be rendered by this viewport.
|
|
102509
102556
|
* @note This method is not typically invoked directly - [[renderFrame]] invokes it as needed to recreate the scene.
|
|
@@ -102511,9 +102558,9 @@ class Viewport {
|
|
|
102511
102558
|
createScene(context) {
|
|
102512
102559
|
this.view.createScene(context);
|
|
102513
102560
|
if (this._mapTiledGraphicsProvider)
|
|
102514
|
-
|
|
102561
|
+
_tile_internal__WEBPACK_IMPORTED_MODULE_22__.TiledGraphicsProvider.addToScene(this._mapTiledGraphicsProvider, context);
|
|
102515
102562
|
for (const provider of this._tiledGraphicsProviders)
|
|
102516
|
-
|
|
102563
|
+
_tile_internal__WEBPACK_IMPORTED_MODULE_22__.TiledGraphicsProvider.addToScene(provider, context);
|
|
102517
102564
|
}
|
|
102518
102565
|
/** Called when the visible contents of the viewport are redrawn.
|
|
102519
102566
|
* @note Due to the frequency of this event, avoid performing expensive work inside event listeners.
|
|
@@ -102521,7 +102568,7 @@ class Viewport {
|
|
|
102521
102568
|
onRender = new _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
|
|
102522
102569
|
/** @internal */
|
|
102523
102570
|
validateRenderPlan() {
|
|
102524
|
-
this.target.changeRenderPlan((0,
|
|
102571
|
+
this.target.changeRenderPlan((0,_internal_render_RenderPlan__WEBPACK_IMPORTED_MODULE_19__.createRenderPlanFromViewport)(this));
|
|
102525
102572
|
this._renderPlanValid = true;
|
|
102526
102573
|
}
|
|
102527
102574
|
animate() {
|
|
@@ -102569,7 +102616,7 @@ class Viewport {
|
|
|
102569
102616
|
isRedrawNeeded = true;
|
|
102570
102617
|
const scheduleScript = view.displayStyle.scheduleScript;
|
|
102571
102618
|
if (scheduleScript) {
|
|
102572
|
-
target.animationBranches =
|
|
102619
|
+
target.animationBranches = _internal_render_AnimationBranchState__WEBPACK_IMPORTED_MODULE_17__.AnimationBranchStates.fromScript(scheduleScript, this.timePoint ?? scheduleScript.duration.low);
|
|
102573
102620
|
if (scheduleScript.containsFeatureOverrides)
|
|
102574
102621
|
overridesNeeded = true;
|
|
102575
102622
|
if (scheduleScript.containsTransform && !this._freezeScene)
|
|
@@ -102578,15 +102625,15 @@ class Viewport {
|
|
|
102578
102625
|
this._timePointValid = true;
|
|
102579
102626
|
}
|
|
102580
102627
|
if (overridesNeeded) {
|
|
102581
|
-
const ovr = new
|
|
102628
|
+
const ovr = new _render_FeatureSymbology__WEBPACK_IMPORTED_MODULE_15__.FeatureSymbology.Overrides(this);
|
|
102582
102629
|
target.overrideFeatureSymbology(ovr);
|
|
102583
102630
|
isRedrawNeeded = true;
|
|
102584
102631
|
}
|
|
102585
102632
|
if (!this._sceneValid) {
|
|
102586
102633
|
if (!this._freezeScene) {
|
|
102587
102634
|
this._frameStatsCollector.beginTime("createChangeSceneTime");
|
|
102588
|
-
|
|
102589
|
-
|
|
102635
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.clearTilesForUser(this);
|
|
102636
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.clearUsageForUser(this);
|
|
102590
102637
|
const context = this.createSceneContext();
|
|
102591
102638
|
this.createScene(context);
|
|
102592
102639
|
context.requestMissingTiles();
|
|
@@ -102605,7 +102652,7 @@ class Viewport {
|
|
|
102605
102652
|
}
|
|
102606
102653
|
if (!this._decorationsValid) {
|
|
102607
102654
|
this._frameStatsCollector.beginTime("decorationsTime");
|
|
102608
|
-
const decorations = new
|
|
102655
|
+
const decorations = new _render_Decorations__WEBPACK_IMPORTED_MODULE_14__.Decorations();
|
|
102609
102656
|
this.addDecorations(decorations);
|
|
102610
102657
|
target.changeDecorations(decorations);
|
|
102611
102658
|
this._decorationsValid = true;
|
|
@@ -102654,7 +102701,7 @@ class Viewport {
|
|
|
102654
102701
|
}
|
|
102655
102702
|
}
|
|
102656
102703
|
if (requestNextAnimation || undefined !== this._animator || this.continuousRendering)
|
|
102657
|
-
|
|
102704
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.requestNextAnimation();
|
|
102658
102705
|
}
|
|
102659
102706
|
/** Populate a set of decoration graphics to be displayed in this viewport.
|
|
102660
102707
|
* This base implementation produces no graphics.
|
|
@@ -102662,13 +102709,13 @@ class Viewport {
|
|
|
102662
102709
|
addDecorations(_decorations) { }
|
|
102663
102710
|
/** @internal */
|
|
102664
102711
|
readPixels(arg0, selector, receiver, excludeNonLocatable) {
|
|
102665
|
-
if (arg0 instanceof
|
|
102712
|
+
if (arg0 instanceof _common_ViewRect__WEBPACK_IMPORTED_MODULE_28__.ViewRect) {
|
|
102666
102713
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== selector && undefined !== receiver);
|
|
102667
102714
|
return this._readPixels(arg0, selector, receiver, excludeNonLocatable);
|
|
102668
102715
|
}
|
|
102669
102716
|
// { rect, receiver, selector, excludeNonLocatable, excludedElements } = arg0;
|
|
102670
102717
|
// this._readPixels(rect ?? this.viewRect, receiver, selector ?? Pixel.Selector.All, excludeNonLocatable, excludedElements);
|
|
102671
|
-
this._readPixels(arg0.rect ?? this.viewRect, arg0.selector ??
|
|
102718
|
+
this._readPixels(arg0.rect ?? this.viewRect, arg0.selector ?? _render_Pixel__WEBPACK_IMPORTED_MODULE_18__.Pixel.Selector.All, arg0.receiver, arg0.excludeNonLocatable, arg0.excludedElements);
|
|
102672
102719
|
}
|
|
102673
102720
|
_readPixels(rect, selector, receiver, excludeNonLocatable, excludedElements) {
|
|
102674
102721
|
if (this.isDisposed || rect.isNull || !rect.isContained(this.viewRect)) {
|
|
@@ -102705,7 +102752,7 @@ class Viewport {
|
|
|
102705
102752
|
* @internal
|
|
102706
102753
|
*/
|
|
102707
102754
|
hasAdditionalTiles() {
|
|
102708
|
-
const tilesThisVp =
|
|
102755
|
+
const tilesThisVp = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.getTilesForUser(this);
|
|
102709
102756
|
const ext = tilesThisVp?.external;
|
|
102710
102757
|
if ((ext?.requested ?? 0) > 0)
|
|
102711
102758
|
return true;
|
|
@@ -102714,7 +102761,7 @@ class Viewport {
|
|
|
102714
102761
|
if (vp.numRequestedTiles > 0) {
|
|
102715
102762
|
return true;
|
|
102716
102763
|
}
|
|
102717
|
-
const tiles =
|
|
102764
|
+
const tiles = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.getTilesForUser(vp);
|
|
102718
102765
|
if (tiles && tiles.external.requested > 0) {
|
|
102719
102766
|
return true;
|
|
102720
102767
|
}
|
|
@@ -102744,7 +102791,7 @@ class Viewport {
|
|
|
102744
102791
|
haveNewTiles = this.hasAdditionalTiles();
|
|
102745
102792
|
// Since the viewport is not being managed by the ViewManager, we must manually pump the TileAdmin to initiate further tile requests each tick of the tile-wait loop.
|
|
102746
102793
|
if (haveNewTiles)
|
|
102747
|
-
|
|
102794
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.process();
|
|
102748
102795
|
await _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.BeDuration.wait(100);
|
|
102749
102796
|
}
|
|
102750
102797
|
}
|
|
@@ -102802,11 +102849,11 @@ class Viewport {
|
|
|
102802
102849
|
* @note This function may be slow, especially if the features are being queried from screen pixels. Avoid calling it repeatedly in rapid succession.
|
|
102803
102850
|
*/
|
|
102804
102851
|
queryVisibleFeatures(options, callback) {
|
|
102805
|
-
return (0,
|
|
102852
|
+
return (0,_internal_render_QueryVisibileFeatures__WEBPACK_IMPORTED_MODULE_30__.queryVisibleFeatures)(this, options, callback);
|
|
102806
102853
|
}
|
|
102807
102854
|
/** Record graphics memory consumed by this viewport. */
|
|
102808
102855
|
collectStatistics(stats) {
|
|
102809
|
-
const trees = new
|
|
102856
|
+
const trees = new _tile_internal__WEBPACK_IMPORTED_MODULE_22__.DisclosedTileTreeSet();
|
|
102810
102857
|
this.discloseTileTrees(trees);
|
|
102811
102858
|
for (const tree of trees)
|
|
102812
102859
|
tree.collectStatistics(stats);
|
|
@@ -102826,7 +102873,7 @@ class Viewport {
|
|
|
102826
102873
|
* @alpha
|
|
102827
102874
|
*/
|
|
102828
102875
|
get tileSizeModifier() {
|
|
102829
|
-
return undefined !== this._tileSizeModifier ? this._tileSizeModifier :
|
|
102876
|
+
return undefined !== this._tileSizeModifier ? this._tileSizeModifier : _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.tileAdmin.defaultTileSizeModifier;
|
|
102830
102877
|
}
|
|
102831
102878
|
/** Controls this Viewport's [[tileSizeModifier]].
|
|
102832
102879
|
* @param modifier If defined, overrides [[TileAdmin.defaultTileSizeModifier]]; otherwise, resets it to that default. Must be greater than zero.
|
|
@@ -103008,7 +103055,7 @@ class ScreenViewport extends Viewport {
|
|
|
103008
103055
|
_lastPose; // the pose the last time this view was rendered
|
|
103009
103056
|
_webglCanvas;
|
|
103010
103057
|
_logo;
|
|
103011
|
-
_decorationCache = new
|
|
103058
|
+
_decorationCache = new _DecorationsCache__WEBPACK_IMPORTED_MODULE_6__.DecorationsCache();
|
|
103012
103059
|
/** The parent HTMLDivElement of the canvas. */
|
|
103013
103060
|
parentDiv;
|
|
103014
103061
|
/** The div created to hold all viewport elements. */
|
|
@@ -103033,7 +103080,7 @@ class ScreenViewport extends Viewport {
|
|
|
103033
103080
|
if (0 === parentDiv.clientWidth || 0 === parentDiv.clientHeight)
|
|
103034
103081
|
throw new Error("viewport cannot be created from a div with zero width or height");
|
|
103035
103082
|
const canvas = document.createElement("canvas");
|
|
103036
|
-
const vp = new this(canvas, parentDiv,
|
|
103083
|
+
const vp = new this(canvas, parentDiv, _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.renderSystem.createTarget(canvas));
|
|
103037
103084
|
vp.initialize();
|
|
103038
103085
|
vp.changeView(view);
|
|
103039
103086
|
return vp;
|
|
@@ -103109,23 +103156,23 @@ class ScreenViewport extends Viewport {
|
|
|
103109
103156
|
get logo() { return this._logo; }
|
|
103110
103157
|
/** @internal */
|
|
103111
103158
|
addLogo() {
|
|
103112
|
-
const logo = this._logo =
|
|
103113
|
-
logo.src = `${
|
|
103159
|
+
const logo = this._logo = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.makeHTMLElement("img", { parent: this.vpDiv, className: "imodeljs-icon" });
|
|
103160
|
+
logo.src = `${_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.publicPath}images/imodeljs-icon.svg`;
|
|
103114
103161
|
logo.alt = "";
|
|
103115
103162
|
const showLogos = async (ev) => {
|
|
103116
|
-
const aboutBox =
|
|
103163
|
+
const aboutBox = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.makeModalDiv({ autoClose: true, width: 460, closeBox: true, rootDiv: this.vpDiv.ownerDocument.body }).modal;
|
|
103117
103164
|
aboutBox.className += " imodeljs-about"; // only added so the CSS knows this is the about dialog
|
|
103118
|
-
const logos =
|
|
103119
|
-
if (undefined !==
|
|
103120
|
-
logos.appendChild(
|
|
103165
|
+
const logos = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.makeHTMLElement("table", { parent: aboutBox, className: "logo-cards" });
|
|
103166
|
+
if (undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.applicationLogoCard) {
|
|
103167
|
+
logos.appendChild(_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.applicationLogoCard());
|
|
103121
103168
|
}
|
|
103122
|
-
logos.appendChild(
|
|
103169
|
+
logos.appendChild(_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.makeIModelJsLogoCard());
|
|
103123
103170
|
const promises = new Array();
|
|
103124
103171
|
for (const ref of this.getTileTreeRefs()) {
|
|
103125
103172
|
promises.push(ref.addAttributions(logos, this));
|
|
103126
103173
|
}
|
|
103127
|
-
if (undefined !==
|
|
103128
|
-
logos.appendChild(
|
|
103174
|
+
if (undefined !== _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.applicationLogoCardFooter) {
|
|
103175
|
+
logos.appendChild(_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.applicationLogoCardFooter());
|
|
103129
103176
|
}
|
|
103130
103177
|
await Promise.all(promises);
|
|
103131
103178
|
ev.stopPropagation();
|
|
@@ -103140,7 +103187,7 @@ class ScreenViewport extends Viewport {
|
|
|
103140
103187
|
this.parentDiv = parentDiv;
|
|
103141
103188
|
// first remove all children of the parent Div
|
|
103142
103189
|
ScreenViewport.removeAllChildren(parentDiv);
|
|
103143
|
-
const div = this.vpDiv =
|
|
103190
|
+
const div = this.vpDiv = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.makeHTMLElement("div", { className: "imodeljs-vp" });
|
|
103144
103191
|
this.addChildDiv(this.parentDiv, div, 0);
|
|
103145
103192
|
this.addChildDiv(this.vpDiv, canvas, 10);
|
|
103146
103193
|
this.target.updateViewRect();
|
|
@@ -103157,7 +103204,7 @@ class ScreenViewport extends Viewport {
|
|
|
103157
103204
|
* @note There is only one ToolTip window, so calling this method more than once will move the toolTip and show the second message.
|
|
103158
103205
|
*/
|
|
103159
103206
|
openToolTip(message, location, options) {
|
|
103160
|
-
|
|
103207
|
+
_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.notifications.openToolTip(this.toolTipDiv, message, location, options);
|
|
103161
103208
|
}
|
|
103162
103209
|
/** @internal */
|
|
103163
103210
|
mousePosFromEvent(ev) {
|
|
@@ -103173,7 +103220,7 @@ class ScreenViewport extends Viewport {
|
|
|
103173
103220
|
*/
|
|
103174
103221
|
onViewManagerAdd() {
|
|
103175
103222
|
this.onViewManagerDrop();
|
|
103176
|
-
this._evController = new
|
|
103223
|
+
this._evController = new _tools_EventController__WEBPACK_IMPORTED_MODULE_23__.EventController(this);
|
|
103177
103224
|
this._resizeObserver = new ResizeObserver(() => {
|
|
103178
103225
|
this.requestRedraw();
|
|
103179
103226
|
});
|
|
@@ -103218,7 +103265,7 @@ class ScreenViewport extends Viewport {
|
|
|
103218
103265
|
return result;
|
|
103219
103266
|
}
|
|
103220
103267
|
/** @internal */
|
|
103221
|
-
picker = new
|
|
103268
|
+
picker = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_7__.ElementPicker(); // Picker used in pickDepthPoint below so it hangs around and can be queried later.
|
|
103222
103269
|
/** Find a point on geometry visible in this Viewport, within a radius of supplied pick point.
|
|
103223
103270
|
* If no geometry is selected, return the point projected to the most appropriate reference plane.
|
|
103224
103271
|
* @param pickPoint Point to search about, in world coordinates
|
|
@@ -103231,9 +103278,9 @@ class ScreenViewport extends Viewport {
|
|
|
103231
103278
|
if (!this.view.is3d())
|
|
103232
103279
|
return { plane: _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Plane3dByOriginAndUnitNormal.createXYPlane(pickPoint), source: DepthPointSource.ACS };
|
|
103233
103280
|
if (undefined === radius)
|
|
103234
|
-
radius = this.pixelsFromInches(
|
|
103281
|
+
radius = this.pixelsFromInches(_tools_ToolSettings__WEBPACK_IMPORTED_MODULE_24__.ToolSettings.viewToolPickRadiusInches);
|
|
103235
103282
|
this.picker.empty();
|
|
103236
|
-
const locateOpts = new
|
|
103283
|
+
const locateOpts = new _ElementLocateManager__WEBPACK_IMPORTED_MODULE_7__.LocateOptions();
|
|
103237
103284
|
locateOpts.allowNonLocatable = (undefined === options || !options.excludeNonLocatable);
|
|
103238
103285
|
locateOpts.allowDecorations = (undefined === options || !options.excludeDecorations);
|
|
103239
103286
|
locateOpts.allowExternalIModels = (undefined === options || !options.excludeExternalIModels);
|
|
@@ -103297,7 +103344,7 @@ class ScreenViewport extends Viewport {
|
|
|
103297
103344
|
*/
|
|
103298
103345
|
animateFrustumChange(options) {
|
|
103299
103346
|
if (this._lastPose && this._currentBaseline)
|
|
103300
|
-
this.setAnimator(new
|
|
103347
|
+
this.setAnimator(new _FrustumAnimator__WEBPACK_IMPORTED_MODULE_8__.FrustumAnimator(options ? options : {}, this, this._lastPose, this.view.savePose()));
|
|
103301
103348
|
}
|
|
103302
103349
|
/** Animate the view frustum from a starting frustum to the current view frustum. In other words,
|
|
103303
103350
|
* save a starting frustum (presumably what the user is currently looking at), then adjust the view to
|
|
@@ -103311,7 +103358,7 @@ class ScreenViewport extends Viewport {
|
|
|
103311
103358
|
}
|
|
103312
103359
|
/** Animate the view frustum to a destination location the earth from the current frustum. */
|
|
103313
103360
|
async animateFlyoverToGlobalLocation(destination) {
|
|
103314
|
-
const animator = await
|
|
103361
|
+
const animator = await _GlobeAnimator__WEBPACK_IMPORTED_MODULE_9__.GlobeAnimator.create(this, destination);
|
|
103315
103362
|
this.setAnimator(animator);
|
|
103316
103363
|
}
|
|
103317
103364
|
/** @internal */
|
|
@@ -103329,7 +103376,7 @@ class ScreenViewport extends Viewport {
|
|
|
103329
103376
|
addDecorations(decorations) {
|
|
103330
103377
|
// SEE: decorationDiv doc comment
|
|
103331
103378
|
ScreenViewport.markAllChildrenForRemoval(this.decorationDiv);
|
|
103332
|
-
const context = new
|
|
103379
|
+
const context = new _ViewContext__WEBPACK_IMPORTED_MODULE_25__.DecorateContext(this, decorations, this._decorationCache);
|
|
103333
103380
|
try {
|
|
103334
103381
|
// It is an error to try to remove cached decorations while we are decorating.
|
|
103335
103382
|
// Some naughty decorators unwittingly do so by e.g. invalidating the scene in their decorate method.
|
|
@@ -103338,7 +103385,7 @@ class ScreenViewport extends Viewport {
|
|
|
103338
103385
|
for (const ref of this.getTileTreeRefs()) {
|
|
103339
103386
|
context.addFromDecorator(ref);
|
|
103340
103387
|
}
|
|
103341
|
-
for (const decorator of
|
|
103388
|
+
for (const decorator of _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.viewManager.decorators)
|
|
103342
103389
|
context.addFromDecorator(decorator);
|
|
103343
103390
|
ScreenViewport.removeMarkedChildren(this.decorationDiv);
|
|
103344
103391
|
}
|
|
@@ -103464,9 +103511,9 @@ class ScreenViewport extends Viewport {
|
|
|
103464
103511
|
static drawLocateHitDetail(context, aperture, hit) {
|
|
103465
103512
|
if (!context.viewport.view.is3d())
|
|
103466
103513
|
return; // Not valuable feedback in 2d...
|
|
103467
|
-
if (!(hit instanceof
|
|
103514
|
+
if (!(hit instanceof _HitDetail__WEBPACK_IMPORTED_MODULE_10__.SnapDetail) || !hit.normal || hit.isPointAdjusted)
|
|
103468
103515
|
return; // AccuSnap will flash edge/segment geometry if not a surface hit or snap location has been adjusted...
|
|
103469
|
-
const builder = context.createGraphicBuilder(
|
|
103516
|
+
const builder = context.createGraphicBuilder(_common_render_GraphicType__WEBPACK_IMPORTED_MODULE_33__.GraphicType.WorldOverlay);
|
|
103470
103517
|
const color = context.viewport.hilite.color.inverse().withTransparency(100); // Invert hilite color for good contrast
|
|
103471
103518
|
const colorFill = color.withTransparency(200);
|
|
103472
103519
|
builder.setSymbology(color, colorFill, 1);
|
|
@@ -103555,14 +103602,14 @@ class ScreenViewport extends Viewport {
|
|
|
103555
103602
|
}
|
|
103556
103603
|
/** Overrides [[Viewport.waitForSceneCompletion]] to allow the render loop to load graphics until the scene is complete. */
|
|
103557
103604
|
async waitForSceneCompletion() {
|
|
103558
|
-
if (!
|
|
103605
|
+
if (!_IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.viewManager.hasViewport(this))
|
|
103559
103606
|
return super.waitForSceneCompletion();
|
|
103560
103607
|
const system = this.target.renderSystem;
|
|
103561
103608
|
// Let the ViewManager/TileAdmin initiate all further requests for tiles until no more requests are pending.
|
|
103562
103609
|
// We will latch onto the onRender event in order to know when tile requests are finished and the promise is fulfilled.
|
|
103563
103610
|
const promise = new Promise((resolve, _reject) => {
|
|
103564
103611
|
const removeOnRender = this.onRender.addListener(() => {
|
|
103565
|
-
const removeOnViewClose =
|
|
103612
|
+
const removeOnViewClose = _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.viewManager.onViewClose.addListener((vp) => {
|
|
103566
103613
|
if (vp === this) {
|
|
103567
103614
|
removeOnViewClose();
|
|
103568
103615
|
removeOnRender();
|
|
@@ -103634,7 +103681,7 @@ class OffScreenViewport extends Viewport {
|
|
|
103634
103681
|
this.attachToView();
|
|
103635
103682
|
}
|
|
103636
103683
|
static create(options) {
|
|
103637
|
-
return this.createViewport(options.view,
|
|
103684
|
+
return this.createViewport(options.view, _IModelApp__WEBPACK_IMPORTED_MODULE_11__.IModelApp.renderSystem.createOffscreenTarget(options.viewRect), options.lockAspectRatio);
|
|
103638
103685
|
}
|
|
103639
103686
|
/** @internal because RenderTarget is internal */
|
|
103640
103687
|
static createViewport(view, target, lockAspectRatio = false) {
|
|
@@ -114029,7 +114076,9 @@ class SheetViewAttachments {
|
|
|
114029
114076
|
// We are attached to a Viewport - reload the renderers.
|
|
114030
114077
|
this.loadRenderers();
|
|
114031
114078
|
}
|
|
114079
|
+
return true;
|
|
114032
114080
|
}
|
|
114081
|
+
return false;
|
|
114033
114082
|
}
|
|
114034
114083
|
attachToViewport(args) {
|
|
114035
114084
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.assert)(undefined === this._renderers);
|
|
@@ -149857,31 +149906,35 @@ class LayerTileTreeReferenceHandler {
|
|
|
149857
149906
|
this._layerTrees.push(tree);
|
|
149858
149907
|
}
|
|
149859
149908
|
}
|
|
149909
|
+
detachFromDisplayStyle() {
|
|
149910
|
+
this._detachFromDisplayStyle.forEach((f) => f());
|
|
149911
|
+
this._detachFromDisplayStyle.length = 0;
|
|
149912
|
+
}
|
|
149860
149913
|
initializeLayers(context) {
|
|
149861
149914
|
// Map tiles handle refresh logic differently
|
|
149862
149915
|
if (!this._mapTile) {
|
|
149863
149916
|
const removals = this._detachFromDisplayStyle;
|
|
149864
|
-
const mapImagery = context.viewport.displayStyle.settings.mapImagery;
|
|
149865
149917
|
if (0 === removals.length) {
|
|
149866
149918
|
removals.push(context.viewport.displayStyle.settings.onMapImageryChanged.addListener((imagery) => {
|
|
149867
149919
|
this.setBaseLayerSettings(imagery.backgroundBase);
|
|
149868
149920
|
this.setLayerSettings(imagery.backgroundLayers);
|
|
149869
149921
|
}));
|
|
149922
|
+
removals.push(context.viewport.onChangeView.addListener((vp, previousViewState) => {
|
|
149923
|
+
if ((0,_tile_internal__WEBPACK_IMPORTED_MODULE_2__.compareMapLayer)(previousViewState, vp.view)) {
|
|
149924
|
+
const currentImagery = vp.displayStyle.settings.mapImagery;
|
|
149925
|
+
this.setBaseLayerSettings(currentImagery.backgroundBase);
|
|
149926
|
+
this.setLayerSettings(currentImagery.backgroundLayers);
|
|
149927
|
+
}
|
|
149928
|
+
}));
|
|
149929
|
+
removals.push(context.viewport.onViewedModelsChanged.addListener((viewport) => {
|
|
149930
|
+
const currentImagery = viewport.displayStyle.settings.mapImagery;
|
|
149931
|
+
if (currentImagery.backgroundLayers.length > 0) {
|
|
149932
|
+
this.setBaseLayerSettings(currentImagery.backgroundBase);
|
|
149933
|
+
this.setLayerSettings(currentImagery.backgroundLayers);
|
|
149934
|
+
viewport.invalidateScene();
|
|
149935
|
+
}
|
|
149936
|
+
}));
|
|
149870
149937
|
}
|
|
149871
|
-
removals.push(context.viewport.onChangeView.addListener((vp, previousViewState) => {
|
|
149872
|
-
if ((0,_tile_internal__WEBPACK_IMPORTED_MODULE_2__.compareMapLayer)(previousViewState, vp.view)) {
|
|
149873
|
-
this.setBaseLayerSettings(mapImagery.backgroundBase);
|
|
149874
|
-
this.setLayerSettings(mapImagery.backgroundLayers);
|
|
149875
|
-
}
|
|
149876
|
-
}));
|
|
149877
|
-
removals.push(context.viewport.onViewedModelsChanged.addListener((viewport) => {
|
|
149878
|
-
const layers = viewport.displayStyle.settings.mapImagery.backgroundLayers;
|
|
149879
|
-
if (layers.length > 0) {
|
|
149880
|
-
this.setBaseLayerSettings(mapImagery.backgroundBase);
|
|
149881
|
-
this.setLayerSettings(mapImagery.backgroundLayers);
|
|
149882
|
-
viewport.invalidateScene();
|
|
149883
|
-
}
|
|
149884
|
-
}));
|
|
149885
149938
|
}
|
|
149886
149939
|
let hasLoadedTileTree = false;
|
|
149887
149940
|
const layerHandler = this._ref.treeOwner.load()?.layerHandler;
|
|
@@ -151115,6 +151168,9 @@ class PrimaryTreeReference extends _tile_internal__WEBPACK_IMPORTED_MODULE_6__.T
|
|
|
151115
151168
|
get isPlanProjection() {
|
|
151116
151169
|
return false;
|
|
151117
151170
|
}
|
|
151171
|
+
detachLayerListeners() {
|
|
151172
|
+
this._layerRefHandler.detachFromDisplayStyle();
|
|
151173
|
+
}
|
|
151118
151174
|
discloseTileTrees(trees) {
|
|
151119
151175
|
super.discloseTileTrees(trees);
|
|
151120
151176
|
this._layerRefHandler.discloseTileTrees(trees);
|
|
@@ -151473,6 +151529,16 @@ class SpatialModelRefs {
|
|
|
151473
151529
|
for (const ref of this._animatedRefs)
|
|
151474
151530
|
ref.deactivated = deactivated ?? !ref.deactivated;
|
|
151475
151531
|
}
|
|
151532
|
+
detachLayerListeners() {
|
|
151533
|
+
if (this._primaryRef)
|
|
151534
|
+
this._primaryRef.detachLayerListeners();
|
|
151535
|
+
else if (this._modelRef instanceof _tile_internal__WEBPACK_IMPORTED_MODULE_6__.RealityModelTileTree.Reference)
|
|
151536
|
+
this._modelRef.detachLayerListeners();
|
|
151537
|
+
for (const ref of this._animatedRefs)
|
|
151538
|
+
ref.detachLayerListeners();
|
|
151539
|
+
if (this._sectionCutRef)
|
|
151540
|
+
this._sectionCutRef.detachLayerListeners();
|
|
151541
|
+
}
|
|
151476
151542
|
get _primaryRef() {
|
|
151477
151543
|
if (!this._isPrimaryRef)
|
|
151478
151544
|
return undefined;
|
|
@@ -151502,7 +151568,16 @@ class SpatialRefs {
|
|
|
151502
151568
|
this._allLoaded = false;
|
|
151503
151569
|
}
|
|
151504
151570
|
attachToViewport() { }
|
|
151505
|
-
detachFromViewport() {
|
|
151571
|
+
detachFromViewport() {
|
|
151572
|
+
for (const refs of this._refs.values())
|
|
151573
|
+
refs.detachLayerListeners();
|
|
151574
|
+
for (const refs of this._swapRefs.values())
|
|
151575
|
+
refs.detachLayerListeners();
|
|
151576
|
+
for (const refs of this._sectionCutOnlyRefs.values())
|
|
151577
|
+
refs.detachLayerListeners();
|
|
151578
|
+
for (const refs of this._swapSectionCutOnlyRefs.values())
|
|
151579
|
+
refs.detachLayerListeners();
|
|
151580
|
+
}
|
|
151506
151581
|
*[Symbol.iterator]() {
|
|
151507
151582
|
this.load();
|
|
151508
151583
|
for (const modelRef of this._refs.values())
|
|
@@ -151588,7 +151663,10 @@ class SpatialRefs {
|
|
|
151588
151663
|
prev = this._swapRefs;
|
|
151589
151664
|
}
|
|
151590
151665
|
let modelRefs = prev.get(modelId);
|
|
151591
|
-
if (
|
|
151666
|
+
if (modelRefs) {
|
|
151667
|
+
prev.delete(modelId);
|
|
151668
|
+
}
|
|
151669
|
+
else {
|
|
151592
151670
|
const model = this._view.iModel.models.getLoaded(modelId)?.asGeometricModel3d;
|
|
151593
151671
|
if (model) {
|
|
151594
151672
|
modelRefs = new SpatialModelRefs(model, this._view, excluded);
|
|
@@ -151599,6 +151677,11 @@ class SpatialRefs {
|
|
|
151599
151677
|
if (modelRefs)
|
|
151600
151678
|
cur.set(modelId, modelRefs);
|
|
151601
151679
|
}
|
|
151680
|
+
// Detach event listeners from model refs that are no longer in the selector.
|
|
151681
|
+
for (const dropped of this._swapRefs.values())
|
|
151682
|
+
dropped.detachLayerListeners();
|
|
151683
|
+
for (const dropped of this._swapSectionCutOnlyRefs.values())
|
|
151684
|
+
dropped.detachLayerListeners();
|
|
151602
151685
|
}
|
|
151603
151686
|
}
|
|
151604
151687
|
|
|
@@ -152116,6 +152199,9 @@ class RealityModelTileTree extends _tile_internal__WEBPACK_IMPORTED_MODULE_8__.R
|
|
|
152116
152199
|
_getDisplaySettings;
|
|
152117
152200
|
_layerRefHandler;
|
|
152118
152201
|
iModel;
|
|
152202
|
+
detachLayerListeners() {
|
|
152203
|
+
this._layerRefHandler.detachFromDisplayStyle();
|
|
152204
|
+
}
|
|
152119
152205
|
get planarClipMask() { return this._planarClipMask; }
|
|
152120
152206
|
set planarClipMask(planarClipMask) { this._planarClipMask = planarClipMask; }
|
|
152121
152207
|
get planarClipMaskPriority() {
|
|
@@ -181035,10 +181121,13 @@ class PrimitiveTool extends _Tool__WEBPACK_IMPORTED_MODULE_4__.InteractiveTool {
|
|
|
181035
181121
|
_IModelApp__WEBPACK_IMPORTED_MODULE_1__.IModelApp.toolAdmin.updateDynamics(undefined, undefined, true); // Don't wait for motion to update dynamics...
|
|
181036
181122
|
return true;
|
|
181037
181123
|
}
|
|
181038
|
-
/**
|
|
181124
|
+
/**
|
|
181125
|
+
* If this tool is editing a briefcase, commits any elements that the tool has changed, supplying the tool flyover for the undo description.
|
|
181126
|
+
* @deprecated Use methods on [[EditCommand]] IPC instead.
|
|
181127
|
+
*/
|
|
181039
181128
|
async saveChanges() {
|
|
181040
181129
|
if (this.iModel.isBriefcaseConnection())
|
|
181041
|
-
return this.iModel.saveChanges(this.flyover);
|
|
181130
|
+
return this.iModel.saveChanges(this.flyover); // eslint-disable-line @typescript-eslint/no-deprecated
|
|
181042
181131
|
}
|
|
181043
181132
|
}
|
|
181044
181133
|
|
|
@@ -325281,7 +325370,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
325281
325370
|
/***/ ((module) => {
|
|
325282
325371
|
|
|
325283
325372
|
"use strict";
|
|
325284
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.
|
|
325373
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@itwin/core-frontend","version":"5.9.0-dev.5","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers && npm run -s copy:draco","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 ES2022 --outDir lib/esm","clean":"rimraf -g 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","copy:draco":"cpx \\"./node_modules/@loaders.gl/draco/dist/libs/*\\" ./lib/public/scripts","docs":"betools docs --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts && npm run -s extract","extract":"betools extract --fileExt=ts --extractFrom=./src/test/example-code --recursive --out=../../generated-docs/extract","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 \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-deprecation":"eslint --fix -f visualstudio --no-inline-config -c ../../common/config/eslint/eslint.config.deprecation-policy.js \\"./src/**/*.ts\\"","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run webpackTestWorker && vitest --run","cover":"npm run webpackTestWorker && vitest --run","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:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*"},"//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":{"@bentley/aec-units-schema":"^1.0.3","@bentley/formats-schema":"^1.0.0","@bentley/units-schema":"^1.0.9","@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/ecschema-metadata":"workspace:*","@itwin/ecschema-rpcinterface-common":"workspace:*","@itwin/object-storage-core":"^3.0.4","@itwin/eslint-plugin":"^6.0.0","@types/chai-as-promised":"^7","@types/draco3d":"^1.4.10","@types/sinon":"^17.0.2","@vitest/browser":"^3.0.6","@vitest/coverage-v8":"^3.0.6","cpx2":"^8.0.0","eslint":"^9.31.0","glob":"^10.5.0","playwright":"~1.56.1","rimraf":"^6.0.1","sinon":"^17.0.2","source-map-loader":"^5.0.0","typescript":"~5.6.2","vitest":"^3.0.6","vite-multiple-assets":"^1.3.1","vite-plugin-static-copy":"2.2.0","webpack":"^5.97.1"},"//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/core-i18n":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"~4.3.4","@loaders.gl/draco":"~4.3.4","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"}}');
|
|
325285
325374
|
|
|
325286
325375
|
/***/ })
|
|
325287
325376
|
|