@itwin/rpcinterface-full-stack-tests 4.8.0-dev.36 → 4.8.0-dev.38
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/_bea9.bundled-tests.js.map +1 -1
- package/lib/dist/bundled-tests.js +363 -90
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +13 -13
|
@@ -45936,6 +45936,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45936
45936
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
45937
45937
|
/* harmony export */ "RenderMaterial": () => (/* binding */ RenderMaterial)
|
|
45938
45938
|
/* harmony export */ });
|
|
45939
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
45939
45940
|
/*---------------------------------------------------------------------------------------------
|
|
45940
45941
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
45941
45942
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -45943,18 +45944,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
45943
45944
|
/** @packageDocumentation
|
|
45944
45945
|
* @module Rendering
|
|
45945
45946
|
*/
|
|
45947
|
+
|
|
45946
45948
|
/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.
|
|
45947
45949
|
* @public
|
|
45948
45950
|
*/
|
|
45949
45951
|
class RenderMaterial {
|
|
45950
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
45951
45952
|
constructor(params) {
|
|
45952
45953
|
this.key = params.key;
|
|
45953
45954
|
this.textureMapping = params.textureMapping;
|
|
45955
|
+
this._guid = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Guid.createValue();
|
|
45954
45956
|
}
|
|
45955
45957
|
get hasTexture() {
|
|
45956
45958
|
return undefined !== this.textureMapping?.texture;
|
|
45957
45959
|
}
|
|
45960
|
+
/** An [OrderedComparator]($bentley) that compares this material against `other`. */
|
|
45961
|
+
compare(other) {
|
|
45962
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(this._guid, other._guid);
|
|
45963
|
+
}
|
|
45958
45964
|
}
|
|
45959
45965
|
/** @public */
|
|
45960
45966
|
(function (RenderMaterial) {
|
|
@@ -47066,6 +47072,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47066
47072
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
47067
47073
|
/* harmony export */ "RenderTexture": () => (/* binding */ RenderTexture)
|
|
47068
47074
|
/* harmony export */ });
|
|
47075
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
47069
47076
|
/*---------------------------------------------------------------------------------------------
|
|
47070
47077
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
47071
47078
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -47073,6 +47080,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
47073
47080
|
/** @packageDocumentation
|
|
47074
47081
|
* @module Rendering
|
|
47075
47082
|
*/
|
|
47083
|
+
|
|
47076
47084
|
/** Represents a texture image applied to a surface during rendering.
|
|
47077
47085
|
* A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].
|
|
47078
47086
|
* @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.
|
|
@@ -47085,6 +47093,11 @@ class RenderTexture {
|
|
|
47085
47093
|
get isSkyBox() { return RenderTexture.Type.SkyBox === this.type; }
|
|
47086
47094
|
constructor(type) {
|
|
47087
47095
|
this.type = type;
|
|
47096
|
+
this._guid = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Guid.createValue();
|
|
47097
|
+
}
|
|
47098
|
+
/** An [OrderedComparator]($bentley) that compares this texture against `other`. */
|
|
47099
|
+
compare(other) {
|
|
47100
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(this._guid, other._guid);
|
|
47088
47101
|
}
|
|
47089
47102
|
}
|
|
47090
47103
|
/** @public */
|
|
@@ -47106,7 +47119,7 @@ class RenderTexture {
|
|
|
47106
47119
|
Type[Type["ThematicGradient"] = 5] = "ThematicGradient";
|
|
47107
47120
|
})(Type = RenderTexture.Type || (RenderTexture.Type = {}));
|
|
47108
47121
|
/** Parameters used to construct a [[RenderTexture]].
|
|
47109
|
-
* @deprecated in 3.x. use RenderSystem.createTexture and
|
|
47122
|
+
* @deprecated in 3.x. use RenderSystem.createTexture and CreateTextureArgs.
|
|
47110
47123
|
* @public
|
|
47111
47124
|
*/
|
|
47112
47125
|
class Params {
|
|
@@ -48742,6 +48755,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48742
48755
|
/* harmony export */ "TextureMapping": () => (/* binding */ TextureMapping)
|
|
48743
48756
|
/* harmony export */ });
|
|
48744
48757
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
48758
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
48745
48759
|
/*---------------------------------------------------------------------------------------------
|
|
48746
48760
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
48747
48761
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -48750,6 +48764,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
48750
48764
|
* @module Rendering
|
|
48751
48765
|
*/
|
|
48752
48766
|
|
|
48767
|
+
|
|
48768
|
+
function compareNormalMapParams(lhs, rhs) {
|
|
48769
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs.normalMap, rhs.normalMap)
|
|
48770
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleansOrUndefined)(lhs.greenUp, rhs.greenUp) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbersOrUndefined)(lhs.scale, rhs.scale)
|
|
48771
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleansOrUndefined)(lhs.useConstantLod, rhs.useConstantLod);
|
|
48772
|
+
}
|
|
48753
48773
|
/** Describes how to map a [[RenderTexture]]'s image onto a surface as part of a [[RenderMaterial]].
|
|
48754
48774
|
* @public
|
|
48755
48775
|
*/
|
|
@@ -48762,6 +48782,14 @@ class TextureMapping {
|
|
|
48762
48782
|
computeUVParams(visitor, transformToImodel) {
|
|
48763
48783
|
return this.params.computeUVParams(visitor, transformToImodel);
|
|
48764
48784
|
}
|
|
48785
|
+
/** An [OrderedComparator]($bentley) that compares this mapping against `other`. */
|
|
48786
|
+
compare(other) {
|
|
48787
|
+
if (this === other) {
|
|
48788
|
+
return 0;
|
|
48789
|
+
}
|
|
48790
|
+
return this.texture.compare(other.texture) || this.params.compare(other.params)
|
|
48791
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.comparePossiblyUndefined)((lh, rh) => compareNormalMapParams(lh, rh), this.normalMapParams, other.normalMapParams);
|
|
48792
|
+
}
|
|
48765
48793
|
}
|
|
48766
48794
|
/** @public */
|
|
48767
48795
|
(function (TextureMapping) {
|
|
@@ -48804,10 +48832,31 @@ class TextureMapping {
|
|
|
48804
48832
|
const matrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Matrix3d.createRowValues(m00, m01, 0, m10, m11, 0, 0, 0, 1);
|
|
48805
48833
|
this.transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createRefs(origin, matrix);
|
|
48806
48834
|
}
|
|
48835
|
+
/** An [OrderedComparator]($bentley) that compares this Trans2x3 against `other`. */
|
|
48836
|
+
compare(other) {
|
|
48837
|
+
if (this === other) {
|
|
48838
|
+
return 0;
|
|
48839
|
+
}
|
|
48840
|
+
const originDiff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.transform.origin.x, other.transform.origin.x) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.transform.origin.y, other.transform.origin.y);
|
|
48841
|
+
if (originDiff !== 0) {
|
|
48842
|
+
return originDiff;
|
|
48843
|
+
}
|
|
48844
|
+
for (const i of [0, 1, 3, 4]) {
|
|
48845
|
+
const matDiff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.transform.matrix.coffs[i], other.transform.matrix.coffs[i]);
|
|
48846
|
+
if (matDiff !== 0) {
|
|
48847
|
+
return matDiff;
|
|
48848
|
+
}
|
|
48849
|
+
}
|
|
48850
|
+
return 0;
|
|
48851
|
+
}
|
|
48807
48852
|
}
|
|
48808
48853
|
/** An immutable 2x3 identity matrix. */
|
|
48809
48854
|
Trans2x3.identity = new Trans2x3();
|
|
48810
48855
|
TextureMapping.Trans2x3 = Trans2x3;
|
|
48856
|
+
function compareConstantLodParams(lhs, rhs) {
|
|
48857
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(lhs.repetitions, rhs.repetitions) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(lhs.offset.x, rhs.offset.x) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(lhs.offset.y, rhs.offset.y)
|
|
48858
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(lhs.minDistClamp, rhs.minDistClamp) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(lhs.maxDistClamp, rhs.maxDistClamp);
|
|
48859
|
+
}
|
|
48811
48860
|
/** Parameters describing how a [[RenderTexture]]'s image is mapped to a surface. */
|
|
48812
48861
|
class Params {
|
|
48813
48862
|
constructor(props) {
|
|
@@ -48823,6 +48872,15 @@ class TextureMapping {
|
|
|
48823
48872
|
maxDistClamp: props?.constantLodProps?.maxDistClamp ?? 4096 * 1024 * 1024,
|
|
48824
48873
|
};
|
|
48825
48874
|
}
|
|
48875
|
+
/** An [OrderedComparator]($bentley) that compares these Params against `other`. */
|
|
48876
|
+
compare(other) {
|
|
48877
|
+
if (this === other) {
|
|
48878
|
+
return 0;
|
|
48879
|
+
}
|
|
48880
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.weight, other.weight) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.mode, other.mode) || (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleans)(this.worldMapping, other.worldMapping)
|
|
48881
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleans)(this.useConstantLod, other.useConstantLod) || this.textureMatrix.compare(other.textureMatrix)
|
|
48882
|
+
|| compareConstantLodParams(this.constantLodParams, other.constantLodParams);
|
|
48883
|
+
}
|
|
48826
48884
|
/**
|
|
48827
48885
|
* Generates UV parameters for textured surfaces. Returns undefined on failure.
|
|
48828
48886
|
* @internal
|
|
@@ -79774,7 +79832,7 @@ class AccuDrawHintBuilder {
|
|
|
79774
79832
|
/** Whether AccuDraw is enabled by the host application this session and can be used */
|
|
79775
79833
|
static get isEnabled() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isEnabled; }
|
|
79776
79834
|
/** Whether AccuDraw compass is currently displayed and points are being adjusted */
|
|
79777
|
-
static get isActive() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.
|
|
79835
|
+
static get isActive() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isActive; }
|
|
79778
79836
|
/**
|
|
79779
79837
|
* Provide hints to AccuDraw using the current builder state.
|
|
79780
79838
|
* @return true if hints were successfully sent.
|
|
@@ -102552,12 +102610,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102552
102610
|
/* harmony export */ "GraphicAssembler": () => (/* reexport safe */ _common_render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__.GraphicAssembler),
|
|
102553
102611
|
/* harmony export */ "GraphicDescription": () => (/* reexport safe */ _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__.GraphicDescription),
|
|
102554
102612
|
/* harmony export */ "GraphicDescriptionBuilder": () => (/* reexport safe */ _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__.GraphicDescriptionBuilder),
|
|
102555
|
-
/* harmony export */ "GraphicType": () => (/* reexport safe */
|
|
102556
|
-
/* harmony export */ "ViewRect": () => (/* reexport safe */
|
|
102557
|
-
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* reexport safe */
|
|
102613
|
+
/* harmony export */ "GraphicType": () => (/* reexport safe */ _common_render_GraphicType__WEBPACK_IMPORTED_MODULE_7__.GraphicType),
|
|
102614
|
+
/* harmony export */ "ViewRect": () => (/* reexport safe */ _common_ViewRect__WEBPACK_IMPORTED_MODULE_11__.ViewRect),
|
|
102615
|
+
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* reexport safe */ _common_render_GraphicDescriptionContext__WEBPACK_IMPORTED_MODULE_5__.WorkerGraphicDescriptionContext),
|
|
102558
102616
|
/* harmony export */ "canvasToImageBuffer": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.canvasToImageBuffer),
|
|
102559
102617
|
/* harmony export */ "canvasToResizedCanvasWithBars": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.canvasToResizedCanvasWithBars),
|
|
102560
|
-
/* harmony export */ "createWorkerProxy": () => (/* reexport safe */
|
|
102618
|
+
/* harmony export */ "createWorkerProxy": () => (/* reexport safe */ _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_12__.createWorkerProxy),
|
|
102561
102619
|
/* harmony export */ "extractImageSourceDimensions": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.extractImageSourceDimensions),
|
|
102562
102620
|
/* harmony export */ "getCenteredViewRect": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.getCenteredViewRect),
|
|
102563
102621
|
/* harmony export */ "getCompressedJpegFromCanvas": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.getCompressedJpegFromCanvas),
|
|
@@ -102577,13 +102635,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102577
102635
|
/* harmony import */ var _common_render_BatchOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/render/BatchOptions */ "../../core/frontend/lib/esm/common/render/BatchOptions.js");
|
|
102578
102636
|
/* harmony import */ var _common_render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/render/GraphicAssembler */ "../../core/frontend/lib/esm/common/render/GraphicAssembler.js");
|
|
102579
102637
|
/* harmony import */ var _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./common/render/GraphicDescriptionBuilder */ "../../core/frontend/lib/esm/common/render/GraphicDescriptionBuilder.js");
|
|
102580
|
-
/* harmony import */ var
|
|
102581
|
-
/* harmony import */ var
|
|
102582
|
-
/* harmony import */ var
|
|
102583
|
-
/* harmony import */ var
|
|
102584
|
-
/* harmony import */ var
|
|
102585
|
-
/* harmony import */ var
|
|
102586
|
-
/* harmony import */ var
|
|
102638
|
+
/* harmony import */ var _common_render_GraphicDescriptionContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./common/render/GraphicDescriptionContext */ "../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js");
|
|
102639
|
+
/* harmony import */ var _common_render_GraphicPrimitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./common/render/GraphicPrimitive */ "../../core/frontend/lib/esm/common/render/GraphicPrimitive.js");
|
|
102640
|
+
/* harmony import */ var _common_render_GraphicType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./common/render/GraphicType */ "../../core/frontend/lib/esm/common/render/GraphicType.js");
|
|
102641
|
+
/* harmony import */ var _common_render_InstancedGraphicParams__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/render/InstancedGraphicParams */ "../../core/frontend/lib/esm/common/render/InstancedGraphicParams.js");
|
|
102642
|
+
/* harmony import */ var _common_render_MaterialParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./common/render/MaterialParams */ "../../core/frontend/lib/esm/common/render/MaterialParams.js");
|
|
102643
|
+
/* harmony import */ var _common_render_TextureParams__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./common/render/TextureParams */ "../../core/frontend/lib/esm/common/render/TextureParams.js");
|
|
102644
|
+
/* harmony import */ var _common_ViewRect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common/ViewRect */ "../../core/frontend/lib/esm/common/ViewRect.js");
|
|
102645
|
+
/* harmony import */ var _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./common/WorkerProxy */ "../../core/frontend/lib/esm/common/WorkerProxy.js");
|
|
102587
102646
|
/*---------------------------------------------------------------------------------------------
|
|
102588
102647
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
102589
102648
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -102603,6 +102662,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
102603
102662
|
|
|
102604
102663
|
|
|
102605
102664
|
|
|
102665
|
+
|
|
102606
102666
|
/***/ }),
|
|
102607
102667
|
|
|
102608
102668
|
/***/ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js":
|
|
@@ -104741,7 +104801,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
104741
104801
|
/* harmony export */ "_accumulator": () => (/* binding */ _accumulator),
|
|
104742
104802
|
/* harmony export */ "_callIpcChannel": () => (/* binding */ _callIpcChannel),
|
|
104743
104803
|
/* harmony export */ "_implementationProhibited": () => (/* binding */ _implementationProhibited),
|
|
104744
|
-
/* harmony export */ "_requestSnap": () => (/* binding */ _requestSnap)
|
|
104804
|
+
/* harmony export */ "_requestSnap": () => (/* binding */ _requestSnap),
|
|
104805
|
+
/* harmony export */ "_textures": () => (/* binding */ _textures)
|
|
104745
104806
|
/* harmony export */ });
|
|
104746
104807
|
/*---------------------------------------------------------------------------------------------
|
|
104747
104808
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -104754,10 +104815,11 @@ const _implementationProhibited = Symbol.for("Implementations of this interface
|
|
|
104754
104815
|
function sym(name) {
|
|
104755
104816
|
return `${name}_core-frontend_INTERNAL_ONLY_DO_NOT_USE`;
|
|
104756
104817
|
}
|
|
104818
|
+
const _accumulator = Symbol.for(sym("accumulator"));
|
|
104757
104819
|
/** @internal */
|
|
104758
104820
|
const _callIpcChannel = Symbol.for(sym("callIpcChannel"));
|
|
104759
104821
|
const _requestSnap = Symbol.for(sym("requestSnap"));
|
|
104760
|
-
const
|
|
104822
|
+
const _textures = Symbol.for(sym("textures"));
|
|
104761
104823
|
|
|
104762
104824
|
|
|
104763
104825
|
/***/ }),
|
|
@@ -105161,13 +105223,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
105161
105223
|
|
|
105162
105224
|
|
|
105163
105225
|
function compareMaterials(lhs, rhs) {
|
|
105164
|
-
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((
|
|
105226
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs, rhs);
|
|
105165
105227
|
}
|
|
105166
|
-
function compareTextureMappings(
|
|
105167
|
-
|
|
105168
|
-
// For now this will only work if the GraphicBuilder uses a single material for all geometry.
|
|
105169
|
-
// return comparePossiblyUndefined((lhTex: TextureMapping, rhTex: TextureMapping) => lhTex === rhTex ? 0 : compareStringsOrUndefined(lhTex.texture.key, rhTex.texture.key), lhs, rhs);
|
|
105170
|
-
return 0;
|
|
105228
|
+
function compareTextureMappings(lhs, rhs) {
|
|
105229
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs, rhs);
|
|
105171
105230
|
}
|
|
105172
105231
|
/** This class is used to determine if things can be batched together for display.
|
|
105173
105232
|
* @internal
|
|
@@ -105996,7 +106055,6 @@ class SolidPrimitiveGeometry extends Geometry {
|
|
|
105996
106055
|
__webpack_require__.r(__webpack_exports__);
|
|
105997
106056
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
105998
106057
|
/* harmony export */ "GraphicDescriptionBuilderImpl": () => (/* binding */ GraphicDescriptionBuilderImpl),
|
|
105999
|
-
/* harmony export */ "WorkerGraphicDescriptionContextImpl": () => (/* binding */ WorkerGraphicDescriptionContextImpl),
|
|
106000
106058
|
/* harmony export */ "collectGraphicDescriptionTransferables": () => (/* binding */ collectGraphicDescriptionTransferables),
|
|
106001
106059
|
/* harmony export */ "isGraphicDescription": () => (/* binding */ isGraphicDescription)
|
|
106002
106060
|
/* harmony export */ });
|
|
@@ -106011,6 +106069,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
106011
106069
|
/* harmony import */ var _VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./VertexTableBuilder */ "../../core/frontend/lib/esm/common/internal/render/VertexTableBuilder.js");
|
|
106012
106070
|
/* harmony import */ var _imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../imdl/ParseImdlDocument */ "../../core/frontend/lib/esm/common/imdl/ParseImdlDocument.js");
|
|
106013
106071
|
/* harmony import */ var _Symbols__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
106072
|
+
/* harmony import */ var _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GraphicDescriptionContextImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js");
|
|
106014
106073
|
/*---------------------------------------------------------------------------------------------
|
|
106015
106074
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
106016
106075
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -106018,7 +106077,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
106018
106077
|
/** @packageDocumentation
|
|
106019
106078
|
* @module Rendering
|
|
106020
106079
|
*/
|
|
106021
|
-
var _a
|
|
106080
|
+
var _a;
|
|
106081
|
+
|
|
106022
106082
|
|
|
106023
106083
|
|
|
106024
106084
|
|
|
@@ -106030,25 +106090,6 @@ var _a, _b;
|
|
|
106030
106090
|
|
|
106031
106091
|
|
|
106032
106092
|
|
|
106033
|
-
class WorkerGraphicDescriptionContextImpl {
|
|
106034
|
-
constructor(props) {
|
|
106035
|
-
this[_a] = undefined;
|
|
106036
|
-
const propsImpl = props;
|
|
106037
|
-
if (typeof propsImpl.transientIds !== "object" || typeof propsImpl.constraints !== "object") {
|
|
106038
|
-
throw new Error("Invalid WorkerGraphicDescriptionContextProps");
|
|
106039
|
-
}
|
|
106040
|
-
this.constraints = propsImpl.constraints;
|
|
106041
|
-
this.transientIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.TransientIdSequence.fromJSON(propsImpl.transientIds);
|
|
106042
|
-
}
|
|
106043
|
-
toProps(_transferables) {
|
|
106044
|
-
// We don't yet have any transferable objects. In the future we expect to support transferring texture image data for textures created on the worker thread.
|
|
106045
|
-
return {
|
|
106046
|
-
[_Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited]: undefined,
|
|
106047
|
-
transientIds: this.transientIds.toJSON(),
|
|
106048
|
-
};
|
|
106049
|
-
}
|
|
106050
|
-
}
|
|
106051
|
-
_a = _Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited;
|
|
106052
106093
|
class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__.GraphicAssembler {
|
|
106053
106094
|
constructor(options) {
|
|
106054
106095
|
const type = options.type;
|
|
@@ -106065,10 +106106,13 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
106065
106106
|
wantNormals,
|
|
106066
106107
|
preserveOrder,
|
|
106067
106108
|
});
|
|
106068
|
-
this[
|
|
106109
|
+
this[_a] = undefined;
|
|
106069
106110
|
this._computeChordTolerance = options.computeChordTolerance;
|
|
106070
|
-
this._constraints = options.constraints;
|
|
106071
106111
|
this._viewIndependentOrigin = options.viewIndependentOrigin?.clone();
|
|
106112
|
+
this._context = options.context;
|
|
106113
|
+
if (!(this._context.transientIds instanceof _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.TransientIdSequence)) {
|
|
106114
|
+
throw new Error("Invalid WorkerGraphicDescriptionContext");
|
|
106115
|
+
}
|
|
106072
106116
|
}
|
|
106073
106117
|
finish() {
|
|
106074
106118
|
const description = {
|
|
@@ -106185,7 +106229,19 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
106185
106229
|
return polylineArgs.flags.isDisjoint ? this.createPointStringPrimitive(polylineArgs) : this.createPolylinePrimitive(polylineArgs);
|
|
106186
106230
|
}
|
|
106187
106231
|
createMeshPrimitive(args) {
|
|
106188
|
-
const params = (0,_VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__.createMeshParams)(args, this.
|
|
106232
|
+
const params = (0,_VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__.createMeshParams)(args, this._context.constraints.maxTextureSize, true);
|
|
106233
|
+
let material;
|
|
106234
|
+
const mat = params.surface.material;
|
|
106235
|
+
if (mat) {
|
|
106236
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.assert)(mat.isAtlas === false && mat.material instanceof _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__.WorkerMaterial);
|
|
106237
|
+
material = mat.material.toImdl();
|
|
106238
|
+
}
|
|
106239
|
+
let textureMapping;
|
|
106240
|
+
const tex = params.surface.textureMapping;
|
|
106241
|
+
if (tex) {
|
|
106242
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.assert)(tex.texture instanceof _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__.WorkerTexture);
|
|
106243
|
+
textureMapping = { alwaysDisplayed: false, texture: tex.texture.index.toString(10) };
|
|
106244
|
+
}
|
|
106189
106245
|
return {
|
|
106190
106246
|
type: "mesh",
|
|
106191
106247
|
params: {
|
|
@@ -106196,15 +106252,14 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
106196
106252
|
surface: {
|
|
106197
106253
|
...params.surface,
|
|
106198
106254
|
indices: params.surface.indices.data,
|
|
106199
|
-
|
|
106200
|
-
|
|
106201
|
-
textureMapping: undefined,
|
|
106255
|
+
material,
|
|
106256
|
+
textureMapping,
|
|
106202
106257
|
},
|
|
106203
106258
|
},
|
|
106204
106259
|
};
|
|
106205
106260
|
}
|
|
106206
106261
|
createPolylinePrimitive(args) {
|
|
106207
|
-
const params = (0,_PolylineParams__WEBPACK_IMPORTED_MODULE_7__.createPolylineParams)(args, this.
|
|
106262
|
+
const params = (0,_PolylineParams__WEBPACK_IMPORTED_MODULE_7__.createPolylineParams)(args, this._context.constraints.maxTextureSize);
|
|
106208
106263
|
if (!params) {
|
|
106209
106264
|
return undefined;
|
|
106210
106265
|
}
|
|
@@ -106222,7 +106277,7 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
106222
106277
|
};
|
|
106223
106278
|
}
|
|
106224
106279
|
createPointStringPrimitive(args) {
|
|
106225
|
-
const params = (0,_PointStringParams__WEBPACK_IMPORTED_MODULE_6__.createPointStringParams)(args, this.
|
|
106280
|
+
const params = (0,_PointStringParams__WEBPACK_IMPORTED_MODULE_6__.createPointStringParams)(args, this._context.constraints.maxTextureSize);
|
|
106226
106281
|
if (!params) {
|
|
106227
106282
|
return undefined;
|
|
106228
106283
|
}
|
|
@@ -106235,12 +106290,11 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
106235
106290
|
},
|
|
106236
106291
|
};
|
|
106237
106292
|
}
|
|
106238
|
-
resolveGradient() {
|
|
106239
|
-
|
|
106240
|
-
return undefined;
|
|
106293
|
+
resolveGradient(gradient) {
|
|
106294
|
+
return this._context.createGradientTexture(gradient);
|
|
106241
106295
|
}
|
|
106242
106296
|
}
|
|
106243
|
-
|
|
106297
|
+
_a = _Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited;
|
|
106244
106298
|
function convertVertexTable(src) {
|
|
106245
106299
|
return {
|
|
106246
106300
|
...src,
|
|
@@ -106251,19 +106305,7 @@ function convertVertexTable(src) {
|
|
|
106251
106305
|
}
|
|
106252
106306
|
function isGraphicDescription(description) {
|
|
106253
106307
|
const descr = description;
|
|
106254
|
-
|
|
106255
|
-
return false;
|
|
106256
|
-
}
|
|
106257
|
-
switch (descr.type) {
|
|
106258
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.ViewBackground:
|
|
106259
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.Scene:
|
|
106260
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.WorldDecoration:
|
|
106261
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.WorldOverlay:
|
|
106262
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.ViewOverlay:
|
|
106263
|
-
return true;
|
|
106264
|
-
default:
|
|
106265
|
-
return false;
|
|
106266
|
-
}
|
|
106308
|
+
return "object" === typeof descr && Array.isArray(descr.primitives) && "number" === typeof descr.type;
|
|
106267
106309
|
}
|
|
106268
106310
|
function collectGraphicDescriptionTransferables(xfers, description) {
|
|
106269
106311
|
if (!isGraphicDescription(description)) {
|
|
@@ -106275,6 +106317,165 @@ function collectGraphicDescriptionTransferables(xfers, description) {
|
|
|
106275
106317
|
}
|
|
106276
106318
|
|
|
106277
106319
|
|
|
106320
|
+
/***/ }),
|
|
106321
|
+
|
|
106322
|
+
/***/ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js":
|
|
106323
|
+
/*!*******************************************************************************************!*\
|
|
106324
|
+
!*** ../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js ***!
|
|
106325
|
+
\*******************************************************************************************/
|
|
106326
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
106327
|
+
|
|
106328
|
+
"use strict";
|
|
106329
|
+
__webpack_require__.r(__webpack_exports__);
|
|
106330
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
106331
|
+
/* harmony export */ "WorkerGraphicDescriptionContextImpl": () => (/* binding */ WorkerGraphicDescriptionContextImpl),
|
|
106332
|
+
/* harmony export */ "WorkerMaterial": () => (/* binding */ WorkerMaterial),
|
|
106333
|
+
/* harmony export */ "WorkerTexture": () => (/* binding */ WorkerTexture)
|
|
106334
|
+
/* harmony export */ });
|
|
106335
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
106336
|
+
/* harmony import */ var _Symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
106337
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
106338
|
+
/*---------------------------------------------------------------------------------------------
|
|
106339
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
106340
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
106341
|
+
*--------------------------------------------------------------------------------------------*/
|
|
106342
|
+
/** @packageDocumentation
|
|
106343
|
+
* @module Rendering
|
|
106344
|
+
*/
|
|
106345
|
+
var _a;
|
|
106346
|
+
|
|
106347
|
+
|
|
106348
|
+
|
|
106349
|
+
class WorkerTexture extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture {
|
|
106350
|
+
constructor(index, params) {
|
|
106351
|
+
let type = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.Normal;
|
|
106352
|
+
if (!(params instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Gradient.Symb) && undefined !== params.type) {
|
|
106353
|
+
type = params.type;
|
|
106354
|
+
}
|
|
106355
|
+
super(type);
|
|
106356
|
+
this.index = index;
|
|
106357
|
+
if (params instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Gradient.Symb) {
|
|
106358
|
+
this.source = { gradient: params };
|
|
106359
|
+
}
|
|
106360
|
+
else {
|
|
106361
|
+
const transparency = params.transparency;
|
|
106362
|
+
if (params.source instanceof URL) {
|
|
106363
|
+
this.source = { transparency, url: params.source.toString() };
|
|
106364
|
+
}
|
|
106365
|
+
else if (params.source instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageSource) {
|
|
106366
|
+
this.source = { transparency, imageSource: params.source.data, format: params.source.format };
|
|
106367
|
+
}
|
|
106368
|
+
else {
|
|
106369
|
+
this.source = { transparency, imageBuffer: params.source.data, format: params.source.format, width: params.source.width };
|
|
106370
|
+
}
|
|
106371
|
+
}
|
|
106372
|
+
}
|
|
106373
|
+
dispose() { }
|
|
106374
|
+
get bytesUsed() { return 0; } // doesn't matter, nobody's calling this.
|
|
106375
|
+
toProps(xfer) {
|
|
106376
|
+
const source = this.source.gradient ? { ...this.source, gradient: this.source.gradient.toJSON() } : this.source;
|
|
106377
|
+
const buffer = source.imageBuffer ?? source.imageSource;
|
|
106378
|
+
if (buffer instanceof Uint8Array) {
|
|
106379
|
+
xfer.add(buffer.buffer);
|
|
106380
|
+
}
|
|
106381
|
+
return {
|
|
106382
|
+
type: this.type,
|
|
106383
|
+
source,
|
|
106384
|
+
};
|
|
106385
|
+
}
|
|
106386
|
+
}
|
|
106387
|
+
function materialColorToImdl(color) {
|
|
106388
|
+
if (!(color instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef)) {
|
|
106389
|
+
color = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RgbColor.fromJSON(color).toColorDef();
|
|
106390
|
+
}
|
|
106391
|
+
return color?.toJSON();
|
|
106392
|
+
}
|
|
106393
|
+
class WorkerMaterial extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMaterial {
|
|
106394
|
+
constructor(params) {
|
|
106395
|
+
let textureMapping;
|
|
106396
|
+
if (params.textureMapping) {
|
|
106397
|
+
textureMapping = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(params.textureMapping.texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params({
|
|
106398
|
+
textureMat2x3: params.textureMapping.transform,
|
|
106399
|
+
mapMode: params.textureMapping.mode,
|
|
106400
|
+
textureWeight: params.textureMapping.weight,
|
|
106401
|
+
worldMapping: params.textureMapping.worldMapping,
|
|
106402
|
+
useConstantLod: params.textureMapping.useConstantLod,
|
|
106403
|
+
constantLodProps: params.textureMapping.constantLodProps,
|
|
106404
|
+
}));
|
|
106405
|
+
textureMapping.normalMapParams = params.textureMapping.normalMapParams;
|
|
106406
|
+
}
|
|
106407
|
+
super({ textureMapping });
|
|
106408
|
+
this.params = params;
|
|
106409
|
+
}
|
|
106410
|
+
toImdl() {
|
|
106411
|
+
let diffuse;
|
|
106412
|
+
if (this.params.diffuse) {
|
|
106413
|
+
diffuse = {
|
|
106414
|
+
weight: this.params.diffuse.weight,
|
|
106415
|
+
color: materialColorToImdl(this.params.diffuse.color),
|
|
106416
|
+
};
|
|
106417
|
+
}
|
|
106418
|
+
let specular;
|
|
106419
|
+
if (this.params.specular) {
|
|
106420
|
+
specular = {
|
|
106421
|
+
weight: this.params.specular.weight,
|
|
106422
|
+
exponent: this.params.specular.exponent,
|
|
106423
|
+
color: materialColorToImdl(this.params.specular.color),
|
|
106424
|
+
};
|
|
106425
|
+
}
|
|
106426
|
+
return {
|
|
106427
|
+
isAtlas: false,
|
|
106428
|
+
material: {
|
|
106429
|
+
alpha: this.params.alpha,
|
|
106430
|
+
diffuse,
|
|
106431
|
+
specular,
|
|
106432
|
+
},
|
|
106433
|
+
};
|
|
106434
|
+
}
|
|
106435
|
+
}
|
|
106436
|
+
class WorkerGraphicDescriptionContextImpl {
|
|
106437
|
+
constructor(props) {
|
|
106438
|
+
this[_a] = undefined;
|
|
106439
|
+
this.textures = [];
|
|
106440
|
+
this.materials = [];
|
|
106441
|
+
const propsImpl = props;
|
|
106442
|
+
if (typeof propsImpl.transientIds !== "object" || typeof propsImpl.constraints !== "object") {
|
|
106443
|
+
throw new Error("Invalid WorkerGraphicDescriptionContextProps");
|
|
106444
|
+
}
|
|
106445
|
+
this.constraints = propsImpl.constraints;
|
|
106446
|
+
this.transientIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.TransientIdSequence.fromJSON(propsImpl.transientIds);
|
|
106447
|
+
}
|
|
106448
|
+
createMaterial(params) {
|
|
106449
|
+
const material = new WorkerMaterial(params);
|
|
106450
|
+
this.materials.push(material);
|
|
106451
|
+
return material;
|
|
106452
|
+
}
|
|
106453
|
+
createTexture(params) {
|
|
106454
|
+
const texture = new WorkerTexture(this.textures.length, params);
|
|
106455
|
+
this.textures.push(texture);
|
|
106456
|
+
return texture;
|
|
106457
|
+
}
|
|
106458
|
+
createGradientTexture(gradient) {
|
|
106459
|
+
const existing = this.textures.find((tx) => tx.source.gradient && tx.source.gradient.equals(gradient));
|
|
106460
|
+
if (existing) {
|
|
106461
|
+
return existing;
|
|
106462
|
+
}
|
|
106463
|
+
const texture = new WorkerTexture(this.textures.length, gradient);
|
|
106464
|
+
this.textures.push(texture);
|
|
106465
|
+
return texture;
|
|
106466
|
+
}
|
|
106467
|
+
toProps(transferables) {
|
|
106468
|
+
// We don't yet have any transferable objects. In the future we expect to support transferring texture image data for textures created on the worker thread.
|
|
106469
|
+
return {
|
|
106470
|
+
[_Symbols__WEBPACK_IMPORTED_MODULE_1__._implementationProhibited]: undefined,
|
|
106471
|
+
transientIds: this.transientIds.toJSON(),
|
|
106472
|
+
textures: this.textures.map((tx) => tx.toProps(transferables)),
|
|
106473
|
+
};
|
|
106474
|
+
}
|
|
106475
|
+
}
|
|
106476
|
+
_a = _Symbols__WEBPACK_IMPORTED_MODULE_1__._implementationProhibited;
|
|
106477
|
+
|
|
106478
|
+
|
|
106278
106479
|
/***/ }),
|
|
106279
106480
|
|
|
106280
106481
|
/***/ "../../core/frontend/lib/esm/common/internal/render/MeshBuilder.js":
|
|
@@ -109507,8 +109708,7 @@ function copy2dTo3d(pts2d, depth) {
|
|
|
109507
109708
|
__webpack_require__.r(__webpack_exports__);
|
|
109508
109709
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
109509
109710
|
/* harmony export */ "GraphicDescription": () => (/* binding */ GraphicDescription),
|
|
109510
|
-
/* harmony export */ "GraphicDescriptionBuilder": () => (/* binding */ GraphicDescriptionBuilder)
|
|
109511
|
-
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* binding */ WorkerGraphicDescriptionContext)
|
|
109711
|
+
/* harmony export */ "GraphicDescriptionBuilder": () => (/* binding */ GraphicDescriptionBuilder)
|
|
109512
109712
|
/* harmony export */ });
|
|
109513
109713
|
/* harmony import */ var _internal_render_GraphicDescriptionBuilderImpl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/render/GraphicDescriptionBuilderImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js");
|
|
109514
109714
|
/* harmony import */ var _internal_Symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
@@ -109534,15 +109734,6 @@ var GraphicDescription;
|
|
|
109534
109734
|
GraphicDescription.collectTransferables = collectTransferables;
|
|
109535
109735
|
})(GraphicDescription || (GraphicDescription = {}));
|
|
109536
109736
|
/** @beta */
|
|
109537
|
-
var WorkerGraphicDescriptionContext;
|
|
109538
|
-
(function (WorkerGraphicDescriptionContext) {
|
|
109539
|
-
/** Instantiate a context from its opaque representation. */
|
|
109540
|
-
function fromProps(props) {
|
|
109541
|
-
return new _internal_render_GraphicDescriptionBuilderImpl__WEBPACK_IMPORTED_MODULE_0__.WorkerGraphicDescriptionContextImpl(props);
|
|
109542
|
-
}
|
|
109543
|
-
WorkerGraphicDescriptionContext.fromProps = fromProps;
|
|
109544
|
-
})(WorkerGraphicDescriptionContext || (WorkerGraphicDescriptionContext = {}));
|
|
109545
|
-
/** @beta */
|
|
109546
109737
|
var GraphicDescriptionBuilder;
|
|
109547
109738
|
(function (GraphicDescriptionBuilder) {
|
|
109548
109739
|
/** Create a [[GraphicDescriptionBuilder]] using the specified `options`. */
|
|
@@ -109553,6 +109744,41 @@ var GraphicDescriptionBuilder;
|
|
|
109553
109744
|
})(GraphicDescriptionBuilder || (GraphicDescriptionBuilder = {}));
|
|
109554
109745
|
|
|
109555
109746
|
|
|
109747
|
+
/***/ }),
|
|
109748
|
+
|
|
109749
|
+
/***/ "../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js":
|
|
109750
|
+
/*!******************************************************************************!*\
|
|
109751
|
+
!*** ../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js ***!
|
|
109752
|
+
\******************************************************************************/
|
|
109753
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
109754
|
+
|
|
109755
|
+
"use strict";
|
|
109756
|
+
__webpack_require__.r(__webpack_exports__);
|
|
109757
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
109758
|
+
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* binding */ WorkerGraphicDescriptionContext)
|
|
109759
|
+
/* harmony export */ });
|
|
109760
|
+
/* harmony import */ var _internal_Symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
109761
|
+
/* harmony import */ var _internal_render_GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/render/GraphicDescriptionContextImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js");
|
|
109762
|
+
/*---------------------------------------------------------------------------------------------
|
|
109763
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
109764
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
109765
|
+
*--------------------------------------------------------------------------------------------*/
|
|
109766
|
+
/** @packageDocumentation
|
|
109767
|
+
* @module Rendering
|
|
109768
|
+
*/
|
|
109769
|
+
|
|
109770
|
+
|
|
109771
|
+
/** @beta */
|
|
109772
|
+
var WorkerGraphicDescriptionContext;
|
|
109773
|
+
(function (WorkerGraphicDescriptionContext) {
|
|
109774
|
+
/** Instantiate a context from its opaque representation. */
|
|
109775
|
+
function fromProps(props) {
|
|
109776
|
+
return new _internal_render_GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_1__.WorkerGraphicDescriptionContextImpl(props);
|
|
109777
|
+
}
|
|
109778
|
+
WorkerGraphicDescriptionContext.fromProps = fromProps;
|
|
109779
|
+
})(WorkerGraphicDescriptionContext || (WorkerGraphicDescriptionContext = {}));
|
|
109780
|
+
|
|
109781
|
+
|
|
109556
109782
|
/***/ }),
|
|
109557
109783
|
|
|
109558
109784
|
/***/ "../../core/frontend/lib/esm/common/render/GraphicPrimitive.js":
|
|
@@ -115598,17 +115824,56 @@ class RenderSystem {
|
|
|
115598
115824
|
*/
|
|
115599
115825
|
async resolveGraphicDescriptionContext(props, iModel) {
|
|
115600
115826
|
const impl = props;
|
|
115601
|
-
if (typeof impl.transientIds !== "object") {
|
|
115827
|
+
if (typeof impl.transientIds !== "object" || !Array.isArray(impl.textures)) {
|
|
115602
115828
|
throw new Error("Invalid GraphicDescriptionContextProps");
|
|
115603
115829
|
}
|
|
115604
115830
|
if (impl.resolved) {
|
|
115605
115831
|
throw new Error("resolveGraphicDescriptionContext can only be called once for a given GraphicDescriptionContextProps");
|
|
115606
115832
|
}
|
|
115833
|
+
const textures = new Map();
|
|
115834
|
+
await Promise.allSettled(impl.textures.map(async (tex, i) => {
|
|
115835
|
+
let texture;
|
|
115836
|
+
if (tex.source.gradient) {
|
|
115837
|
+
texture = this.getGradientTexture(_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Gradient.Symb.fromJSON(tex.source.gradient));
|
|
115838
|
+
}
|
|
115839
|
+
else if (tex.source.imageSource) {
|
|
115840
|
+
texture = await this.createTextureFromSource({
|
|
115841
|
+
source: new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSource(tex.source.imageSource, tex.source.format),
|
|
115842
|
+
type: tex.type,
|
|
115843
|
+
transparency: tex.transparency,
|
|
115844
|
+
});
|
|
115845
|
+
}
|
|
115846
|
+
else if (tex.source.imageBuffer) {
|
|
115847
|
+
texture = this.createTexture({
|
|
115848
|
+
type: tex.type,
|
|
115849
|
+
image: {
|
|
115850
|
+
source: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageBuffer.create(tex.source.imageBuffer, tex.source.format, tex.source.width),
|
|
115851
|
+
transparency: tex.transparency,
|
|
115852
|
+
},
|
|
115853
|
+
});
|
|
115854
|
+
}
|
|
115855
|
+
else if (tex.source.url) {
|
|
115856
|
+
const image = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_6__.tryImageElementFromUrl)(tex.source.url);
|
|
115857
|
+
if (image) {
|
|
115858
|
+
texture = this.createTexture({
|
|
115859
|
+
type: tex.type,
|
|
115860
|
+
image: {
|
|
115861
|
+
source: image,
|
|
115862
|
+
transparency: tex.transparency,
|
|
115863
|
+
},
|
|
115864
|
+
});
|
|
115865
|
+
}
|
|
115866
|
+
}
|
|
115867
|
+
if (texture) {
|
|
115868
|
+
textures.set(i.toString(10), texture);
|
|
115869
|
+
}
|
|
115870
|
+
}));
|
|
115607
115871
|
const remap = iModel.transientIds.merge(impl.transientIds);
|
|
115608
115872
|
impl.resolved = true;
|
|
115609
115873
|
return {
|
|
115610
115874
|
[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_12__._implementationProhibited]: undefined,
|
|
115611
115875
|
remapTransientLocalId: (source) => remap(source),
|
|
115876
|
+
[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_12__._textures]: textures,
|
|
115612
115877
|
};
|
|
115613
115878
|
}
|
|
115614
115879
|
}
|
|
@@ -122937,6 +123202,9 @@ class Material extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMat
|
|
|
122937
123202
|
this.isAtlas = false;
|
|
122938
123203
|
this.fragUniforms = new Float32Array(4);
|
|
122939
123204
|
this.rgba = new Float32Array(4);
|
|
123205
|
+
if (Material.preserveParams) {
|
|
123206
|
+
this.params = params;
|
|
123207
|
+
}
|
|
122940
123208
|
if (undefined !== params.diffuseColor) {
|
|
122941
123209
|
const rgb = _FloatRGBA__WEBPACK_IMPORTED_MODULE_1__.FloatRgb.fromColorDef(params.diffuseColor);
|
|
122942
123210
|
this.rgba[0] = rgb.red;
|
|
@@ -122966,6 +123234,8 @@ class Material extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMat
|
|
|
122966
123234
|
}
|
|
122967
123235
|
// eslint-disable-next-line deprecation/deprecation
|
|
122968
123236
|
Material.default = new Material(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMaterial.Params.defaults);
|
|
123237
|
+
/** Strictly for testing. */
|
|
123238
|
+
Material.preserveParams = false;
|
|
122969
123239
|
Object.freeze(Material.default);
|
|
122970
123240
|
/** @internal */
|
|
122971
123241
|
function createMaterialInfo(source) {
|
|
@@ -145749,6 +146019,7 @@ class GraphicsTile extends _internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
|
|
|
145749
146019
|
type: tree.batchType,
|
|
145750
146020
|
loadEdges: false !== tree.edgeOptions,
|
|
145751
146021
|
options: { tileId: this.contentId },
|
|
146022
|
+
timeline: tree.timeline,
|
|
145752
146023
|
});
|
|
145753
146024
|
let content = { isLeaf: true };
|
|
145754
146025
|
if (reader) {
|
|
@@ -148776,6 +149047,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
148776
149047
|
/* harmony import */ var _common_internal_render_VertexIndices__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../common/internal/render/VertexIndices */ "../../core/frontend/lib/esm/common/internal/render/VertexIndices.js");
|
|
148777
149048
|
/* harmony import */ var _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../render/GraphicBranch */ "../../core/frontend/lib/esm/render/GraphicBranch.js");
|
|
148778
149049
|
/* harmony import */ var _common_internal_render_GraphicDescriptionBuilderImpl__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../common/internal/render/GraphicDescriptionBuilderImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js");
|
|
149050
|
+
/* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
148779
149051
|
/*---------------------------------------------------------------------------------------------
|
|
148780
149052
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
148781
149053
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -148792,6 +149064,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
148792
149064
|
|
|
148793
149065
|
|
|
148794
149066
|
|
|
149067
|
+
|
|
148795
149068
|
async function loadNamedTexture(name, namedTex, options) {
|
|
148796
149069
|
// Reasons a texture could be embedded in the tile content instead of requested separately from the backend:
|
|
148797
149070
|
// - external textures are disabled
|
|
@@ -149167,7 +149440,7 @@ async function createGraphicFromDescription(descr, context, system) {
|
|
|
149167
149440
|
const graphics = [];
|
|
149168
149441
|
const graphicsOptions = {
|
|
149169
149442
|
system,
|
|
149170
|
-
textures:
|
|
149443
|
+
textures: context[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_9__._textures],
|
|
149171
149444
|
patterns: new Map(),
|
|
149172
149445
|
};
|
|
149173
149446
|
for (const primitive of descr.primitives) {
|
|
@@ -291700,7 +291973,7 @@ class TestContext {
|
|
|
291700
291973
|
this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
|
|
291701
291974
|
const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${process.env.IMJS_URL_PREFIX ?? ""}api.bentley.com/imodels` } });
|
|
291702
291975
|
await core_frontend_1.NoRenderApp.startup({
|
|
291703
|
-
applicationVersion: "4.8.0-dev.
|
|
291976
|
+
applicationVersion: "4.8.0-dev.38",
|
|
291704
291977
|
applicationId: this.settings.gprid,
|
|
291705
291978
|
authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
|
|
291706
291979
|
hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
|
|
@@ -299940,13 +300213,13 @@ class FavoritePropertiesManager {
|
|
|
299940
300213
|
if (missingClasses.size === 0) {
|
|
299941
300214
|
return baseClasses;
|
|
299942
300215
|
}
|
|
299943
|
-
const query = `
|
|
299944
|
-
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
299945
|
-
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
299946
|
-
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
299947
|
-
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
299948
|
-
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
299949
|
-
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
300216
|
+
const query = `
|
|
300217
|
+
SELECT (derivedSchema.Name || ':' || derivedClass.Name) AS "ClassFullName", (baseSchema.Name || ':' || baseClass.Name) AS "BaseClassFullName"
|
|
300218
|
+
FROM ECDbMeta.ClassHasAllBaseClasses baseClassRels
|
|
300219
|
+
INNER JOIN ECDbMeta.ECClassDef derivedClass ON derivedClass.ECInstanceId = baseClassRels.SourceECInstanceId
|
|
300220
|
+
INNER JOIN ECDbMeta.ECSchemaDef derivedSchema ON derivedSchema.ECInstanceId = derivedClass.Schema.Id
|
|
300221
|
+
INNER JOIN ECDbMeta.ECClassDef baseClass ON baseClass.ECInstanceId = baseClassRels.TargetECInstanceId
|
|
300222
|
+
INNER JOIN ECDbMeta.ECSchemaDef baseSchema ON baseSchema.ECInstanceId = baseClass.Schema.Id
|
|
299950
300223
|
WHERE (derivedSchema.Name || ':' || derivedClass.Name) IN (${[...missingClasses].map((className) => `'${className}'`).join(",")})`;
|
|
299951
300224
|
const reader = imodel.createQueryReader(query, undefined, { rowFormat: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.QueryRowFormat.UseJsPropertyNames });
|
|
299952
300225
|
while (await reader.step()) {
|
|
@@ -315700,7 +315973,7 @@ function __disposeResources(env) {
|
|
|
315700
315973
|
/***/ ((module) => {
|
|
315701
315974
|
|
|
315702
315975
|
"use strict";
|
|
315703
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.
|
|
315976
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.38","description":"iTwin.js frontend components","main":"lib/cjs/core-frontend.js","module":"lib/esm/core-frontend.js","typings":"lib/cjs/core-frontend","license":"MIT","scripts":{"build":"npm run -s copy:public && npm run -s build:cjs && npm run -s build:esm && npm run -s webpackWorkers && npm run -s copy:workers","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","copy:workers":"cpx \\"./lib/workers/webpack/parse-imdl-worker.js\\" ./lib/public/scripts","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-inline-config -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","lint-fix":"eslint --fix -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && npm run -s webpackTestWorker","webpackTestWorker":"webpack --config ./src/test/worker/webpack.config.js 1>&2 && cpx \\"./lib/test/test-worker.js\\" ./lib/test","webpackWorkers":"webpack --config ./src/workers/ImdlParser/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core.git","directory":"core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^4.8.0-dev.38","@itwin/core-bentley":"workspace:^4.8.0-dev.38","@itwin/core-common":"workspace:^4.8.0-dev.38","@itwin/core-geometry":"workspace:^4.8.0-dev.38","@itwin/core-orbitgt":"workspace:^4.8.0-dev.38","@itwin/core-quantity":"workspace:^4.8.0-dev.38"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"^4.0.2","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^10.0.6","@types/sinon":"^17.0.2","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7.1.1","cpx2":"^3.0.0","eslint":"^8.56.0","glob":"^10.3.12","mocha":"^10.2.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^17.0.1","source-map-loader":"^4.0.0","typescript":"~5.3.3","typemoq":"^2.1.0","webpack":"^5.76.0"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/cloud-agnostic-core":"^2.1.0","@itwin/object-storage-core":"^2.2.2","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","meshoptimizer":"~0.20.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
315704
315977
|
|
|
315705
315978
|
/***/ }),
|
|
315706
315979
|
|