@itwin/ecschema-rpcinterface-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 +355 -82
- package/lib/dist/bundled-tests.js.map +1 -1
- package/lib/dist/core_frontend_lib_esm_ApproximateTerrainHeightsProps_js.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_loaders_gl_draco_3_1_6_node_modules_loaders_gl_draco_di-0642a6.bundled-tests.js.map +1 -1
- package/lib/dist/vendors-common_temp_node_modules_pnpm_meshoptimizer_0_20_0_node_modules_meshoptimizer_index_m-a5ae61.bundled-tests.js.map +1 -1
- package/package.json +15 -15
|
@@ -39680,6 +39680,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39680
39680
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
39681
39681
|
/* harmony export */ "RenderMaterial": () => (/* binding */ RenderMaterial)
|
|
39682
39682
|
/* harmony export */ });
|
|
39683
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
39683
39684
|
/*---------------------------------------------------------------------------------------------
|
|
39684
39685
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
39685
39686
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -39687,18 +39688,23 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
39687
39688
|
/** @packageDocumentation
|
|
39688
39689
|
* @module Rendering
|
|
39689
39690
|
*/
|
|
39691
|
+
|
|
39690
39692
|
/** Represents a material which can be applied to a surface to control aspects of its appearance such as color, reflectivity, texture, and so on.
|
|
39691
39693
|
* @public
|
|
39692
39694
|
*/
|
|
39693
39695
|
class RenderMaterial {
|
|
39694
|
-
// eslint-disable-next-line deprecation/deprecation
|
|
39695
39696
|
constructor(params) {
|
|
39696
39697
|
this.key = params.key;
|
|
39697
39698
|
this.textureMapping = params.textureMapping;
|
|
39699
|
+
this._guid = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Guid.createValue();
|
|
39698
39700
|
}
|
|
39699
39701
|
get hasTexture() {
|
|
39700
39702
|
return undefined !== this.textureMapping?.texture;
|
|
39701
39703
|
}
|
|
39704
|
+
/** An [OrderedComparator]($bentley) that compares this material against `other`. */
|
|
39705
|
+
compare(other) {
|
|
39706
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(this._guid, other._guid);
|
|
39707
|
+
}
|
|
39702
39708
|
}
|
|
39703
39709
|
/** @public */
|
|
39704
39710
|
(function (RenderMaterial) {
|
|
@@ -40810,6 +40816,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40810
40816
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
40811
40817
|
/* harmony export */ "RenderTexture": () => (/* binding */ RenderTexture)
|
|
40812
40818
|
/* harmony export */ });
|
|
40819
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
40813
40820
|
/*---------------------------------------------------------------------------------------------
|
|
40814
40821
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
40815
40822
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -40817,6 +40824,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
40817
40824
|
/** @packageDocumentation
|
|
40818
40825
|
* @module Rendering
|
|
40819
40826
|
*/
|
|
40827
|
+
|
|
40820
40828
|
/** Represents a texture image applied to a surface during rendering.
|
|
40821
40829
|
* A RenderTexture is typically - but not always - associated with a [[RenderMaterial]].
|
|
40822
40830
|
* @see [RenderSystem.createTextureFromImage]($frontend) to obtain a texture from an HTML image.
|
|
@@ -40829,6 +40837,11 @@ class RenderTexture {
|
|
|
40829
40837
|
get isSkyBox() { return RenderTexture.Type.SkyBox === this.type; }
|
|
40830
40838
|
constructor(type) {
|
|
40831
40839
|
this.type = type;
|
|
40840
|
+
this._guid = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.Guid.createValue();
|
|
40841
|
+
}
|
|
40842
|
+
/** An [OrderedComparator]($bentley) that compares this texture against `other`. */
|
|
40843
|
+
compare(other) {
|
|
40844
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.compareStrings)(this._guid, other._guid);
|
|
40832
40845
|
}
|
|
40833
40846
|
}
|
|
40834
40847
|
/** @public */
|
|
@@ -40850,7 +40863,7 @@ class RenderTexture {
|
|
|
40850
40863
|
Type[Type["ThematicGradient"] = 5] = "ThematicGradient";
|
|
40851
40864
|
})(Type = RenderTexture.Type || (RenderTexture.Type = {}));
|
|
40852
40865
|
/** Parameters used to construct a [[RenderTexture]].
|
|
40853
|
-
* @deprecated in 3.x. use RenderSystem.createTexture and
|
|
40866
|
+
* @deprecated in 3.x. use RenderSystem.createTexture and CreateTextureArgs.
|
|
40854
40867
|
* @public
|
|
40855
40868
|
*/
|
|
40856
40869
|
class Params {
|
|
@@ -42486,6 +42499,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42486
42499
|
/* harmony export */ "TextureMapping": () => (/* binding */ TextureMapping)
|
|
42487
42500
|
/* harmony export */ });
|
|
42488
42501
|
/* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
|
|
42502
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
42489
42503
|
/*---------------------------------------------------------------------------------------------
|
|
42490
42504
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
42491
42505
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -42494,6 +42508,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
42494
42508
|
* @module Rendering
|
|
42495
42509
|
*/
|
|
42496
42510
|
|
|
42511
|
+
|
|
42512
|
+
function compareNormalMapParams(lhs, rhs) {
|
|
42513
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs.normalMap, rhs.normalMap)
|
|
42514
|
+
|| (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)
|
|
42515
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleansOrUndefined)(lhs.useConstantLod, rhs.useConstantLod);
|
|
42516
|
+
}
|
|
42497
42517
|
/** Describes how to map a [[RenderTexture]]'s image onto a surface as part of a [[RenderMaterial]].
|
|
42498
42518
|
* @public
|
|
42499
42519
|
*/
|
|
@@ -42506,6 +42526,14 @@ class TextureMapping {
|
|
|
42506
42526
|
computeUVParams(visitor, transformToImodel) {
|
|
42507
42527
|
return this.params.computeUVParams(visitor, transformToImodel);
|
|
42508
42528
|
}
|
|
42529
|
+
/** An [OrderedComparator]($bentley) that compares this mapping against `other`. */
|
|
42530
|
+
compare(other) {
|
|
42531
|
+
if (this === other) {
|
|
42532
|
+
return 0;
|
|
42533
|
+
}
|
|
42534
|
+
return this.texture.compare(other.texture) || this.params.compare(other.params)
|
|
42535
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.comparePossiblyUndefined)((lh, rh) => compareNormalMapParams(lh, rh), this.normalMapParams, other.normalMapParams);
|
|
42536
|
+
}
|
|
42509
42537
|
}
|
|
42510
42538
|
/** @public */
|
|
42511
42539
|
(function (TextureMapping) {
|
|
@@ -42548,10 +42576,31 @@ class TextureMapping {
|
|
|
42548
42576
|
const matrix = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Matrix3d.createRowValues(m00, m01, 0, m10, m11, 0, 0, 0, 1);
|
|
42549
42577
|
this.transform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Transform.createRefs(origin, matrix);
|
|
42550
42578
|
}
|
|
42579
|
+
/** An [OrderedComparator]($bentley) that compares this Trans2x3 against `other`. */
|
|
42580
|
+
compare(other) {
|
|
42581
|
+
if (this === other) {
|
|
42582
|
+
return 0;
|
|
42583
|
+
}
|
|
42584
|
+
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);
|
|
42585
|
+
if (originDiff !== 0) {
|
|
42586
|
+
return originDiff;
|
|
42587
|
+
}
|
|
42588
|
+
for (const i of [0, 1, 3, 4]) {
|
|
42589
|
+
const matDiff = (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareNumbers)(this.transform.matrix.coffs[i], other.transform.matrix.coffs[i]);
|
|
42590
|
+
if (matDiff !== 0) {
|
|
42591
|
+
return matDiff;
|
|
42592
|
+
}
|
|
42593
|
+
}
|
|
42594
|
+
return 0;
|
|
42595
|
+
}
|
|
42551
42596
|
}
|
|
42552
42597
|
/** An immutable 2x3 identity matrix. */
|
|
42553
42598
|
Trans2x3.identity = new Trans2x3();
|
|
42554
42599
|
TextureMapping.Trans2x3 = Trans2x3;
|
|
42600
|
+
function compareConstantLodParams(lhs, rhs) {
|
|
42601
|
+
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)
|
|
42602
|
+
|| (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);
|
|
42603
|
+
}
|
|
42555
42604
|
/** Parameters describing how a [[RenderTexture]]'s image is mapped to a surface. */
|
|
42556
42605
|
class Params {
|
|
42557
42606
|
constructor(props) {
|
|
@@ -42567,6 +42616,15 @@ class TextureMapping {
|
|
|
42567
42616
|
maxDistClamp: props?.constantLodProps?.maxDistClamp ?? 4096 * 1024 * 1024,
|
|
42568
42617
|
};
|
|
42569
42618
|
}
|
|
42619
|
+
/** An [OrderedComparator]($bentley) that compares these Params against `other`. */
|
|
42620
|
+
compare(other) {
|
|
42621
|
+
if (this === other) {
|
|
42622
|
+
return 0;
|
|
42623
|
+
}
|
|
42624
|
+
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)
|
|
42625
|
+
|| (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_1__.compareBooleans)(this.useConstantLod, other.useConstantLod) || this.textureMatrix.compare(other.textureMatrix)
|
|
42626
|
+
|| compareConstantLodParams(this.constantLodParams, other.constantLodParams);
|
|
42627
|
+
}
|
|
42570
42628
|
/**
|
|
42571
42629
|
* Generates UV parameters for textured surfaces. Returns undefined on failure.
|
|
42572
42630
|
* @internal
|
|
@@ -73690,7 +73748,7 @@ class AccuDrawHintBuilder {
|
|
|
73690
73748
|
/** Whether AccuDraw is enabled by the host application this session and can be used */
|
|
73691
73749
|
static get isEnabled() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isEnabled; }
|
|
73692
73750
|
/** Whether AccuDraw compass is currently displayed and points are being adjusted */
|
|
73693
|
-
static get isActive() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.
|
|
73751
|
+
static get isActive() { return _IModelApp__WEBPACK_IMPORTED_MODULE_6__.IModelApp.accuDraw.isActive; }
|
|
73694
73752
|
/**
|
|
73695
73753
|
* Provide hints to AccuDraw using the current builder state.
|
|
73696
73754
|
* @return true if hints were successfully sent.
|
|
@@ -96468,12 +96526,12 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96468
96526
|
/* harmony export */ "GraphicAssembler": () => (/* reexport safe */ _common_render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__.GraphicAssembler),
|
|
96469
96527
|
/* harmony export */ "GraphicDescription": () => (/* reexport safe */ _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__.GraphicDescription),
|
|
96470
96528
|
/* harmony export */ "GraphicDescriptionBuilder": () => (/* reexport safe */ _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__.GraphicDescriptionBuilder),
|
|
96471
|
-
/* harmony export */ "GraphicType": () => (/* reexport safe */
|
|
96472
|
-
/* harmony export */ "ViewRect": () => (/* reexport safe */
|
|
96473
|
-
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* reexport safe */
|
|
96529
|
+
/* harmony export */ "GraphicType": () => (/* reexport safe */ _common_render_GraphicType__WEBPACK_IMPORTED_MODULE_7__.GraphicType),
|
|
96530
|
+
/* harmony export */ "ViewRect": () => (/* reexport safe */ _common_ViewRect__WEBPACK_IMPORTED_MODULE_11__.ViewRect),
|
|
96531
|
+
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* reexport safe */ _common_render_GraphicDescriptionContext__WEBPACK_IMPORTED_MODULE_5__.WorkerGraphicDescriptionContext),
|
|
96474
96532
|
/* harmony export */ "canvasToImageBuffer": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.canvasToImageBuffer),
|
|
96475
96533
|
/* harmony export */ "canvasToResizedCanvasWithBars": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.canvasToResizedCanvasWithBars),
|
|
96476
|
-
/* harmony export */ "createWorkerProxy": () => (/* reexport safe */
|
|
96534
|
+
/* harmony export */ "createWorkerProxy": () => (/* reexport safe */ _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_12__.createWorkerProxy),
|
|
96477
96535
|
/* harmony export */ "extractImageSourceDimensions": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.extractImageSourceDimensions),
|
|
96478
96536
|
/* harmony export */ "getCenteredViewRect": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.getCenteredViewRect),
|
|
96479
96537
|
/* harmony export */ "getCompressedJpegFromCanvas": () => (/* reexport safe */ _common_ImageUtil__WEBPACK_IMPORTED_MODULE_1__.getCompressedJpegFromCanvas),
|
|
@@ -96493,13 +96551,14 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96493
96551
|
/* harmony import */ var _common_render_BatchOptions__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./common/render/BatchOptions */ "../../core/frontend/lib/esm/common/render/BatchOptions.js");
|
|
96494
96552
|
/* harmony import */ var _common_render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./common/render/GraphicAssembler */ "../../core/frontend/lib/esm/common/render/GraphicAssembler.js");
|
|
96495
96553
|
/* harmony import */ var _common_render_GraphicDescriptionBuilder__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./common/render/GraphicDescriptionBuilder */ "../../core/frontend/lib/esm/common/render/GraphicDescriptionBuilder.js");
|
|
96496
|
-
/* harmony import */ var
|
|
96497
|
-
/* harmony import */ var
|
|
96498
|
-
/* harmony import */ var
|
|
96499
|
-
/* harmony import */ var
|
|
96500
|
-
/* harmony import */ var
|
|
96501
|
-
/* harmony import */ var
|
|
96502
|
-
/* harmony import */ var
|
|
96554
|
+
/* harmony import */ var _common_render_GraphicDescriptionContext__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./common/render/GraphicDescriptionContext */ "../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js");
|
|
96555
|
+
/* harmony import */ var _common_render_GraphicPrimitive__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./common/render/GraphicPrimitive */ "../../core/frontend/lib/esm/common/render/GraphicPrimitive.js");
|
|
96556
|
+
/* harmony import */ var _common_render_GraphicType__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./common/render/GraphicType */ "../../core/frontend/lib/esm/common/render/GraphicType.js");
|
|
96557
|
+
/* harmony import */ var _common_render_InstancedGraphicParams__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./common/render/InstancedGraphicParams */ "../../core/frontend/lib/esm/common/render/InstancedGraphicParams.js");
|
|
96558
|
+
/* harmony import */ var _common_render_MaterialParams__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./common/render/MaterialParams */ "../../core/frontend/lib/esm/common/render/MaterialParams.js");
|
|
96559
|
+
/* harmony import */ var _common_render_TextureParams__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./common/render/TextureParams */ "../../core/frontend/lib/esm/common/render/TextureParams.js");
|
|
96560
|
+
/* harmony import */ var _common_ViewRect__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./common/ViewRect */ "../../core/frontend/lib/esm/common/ViewRect.js");
|
|
96561
|
+
/* harmony import */ var _common_WorkerProxy__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./common/WorkerProxy */ "../../core/frontend/lib/esm/common/WorkerProxy.js");
|
|
96503
96562
|
/*---------------------------------------------------------------------------------------------
|
|
96504
96563
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
96505
96564
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -96519,6 +96578,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
96519
96578
|
|
|
96520
96579
|
|
|
96521
96580
|
|
|
96581
|
+
|
|
96522
96582
|
/***/ }),
|
|
96523
96583
|
|
|
96524
96584
|
/***/ "../../core/frontend/lib/esm/common/FrontendLoggerCategory.js":
|
|
@@ -98657,7 +98717,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
98657
98717
|
/* harmony export */ "_accumulator": () => (/* binding */ _accumulator),
|
|
98658
98718
|
/* harmony export */ "_callIpcChannel": () => (/* binding */ _callIpcChannel),
|
|
98659
98719
|
/* harmony export */ "_implementationProhibited": () => (/* binding */ _implementationProhibited),
|
|
98660
|
-
/* harmony export */ "_requestSnap": () => (/* binding */ _requestSnap)
|
|
98720
|
+
/* harmony export */ "_requestSnap": () => (/* binding */ _requestSnap),
|
|
98721
|
+
/* harmony export */ "_textures": () => (/* binding */ _textures)
|
|
98661
98722
|
/* harmony export */ });
|
|
98662
98723
|
/*---------------------------------------------------------------------------------------------
|
|
98663
98724
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
@@ -98670,10 +98731,11 @@ const _implementationProhibited = Symbol.for("Implementations of this interface
|
|
|
98670
98731
|
function sym(name) {
|
|
98671
98732
|
return `${name}_core-frontend_INTERNAL_ONLY_DO_NOT_USE`;
|
|
98672
98733
|
}
|
|
98734
|
+
const _accumulator = Symbol.for(sym("accumulator"));
|
|
98673
98735
|
/** @internal */
|
|
98674
98736
|
const _callIpcChannel = Symbol.for(sym("callIpcChannel"));
|
|
98675
98737
|
const _requestSnap = Symbol.for(sym("requestSnap"));
|
|
98676
|
-
const
|
|
98738
|
+
const _textures = Symbol.for(sym("textures"));
|
|
98677
98739
|
|
|
98678
98740
|
|
|
98679
98741
|
/***/ }),
|
|
@@ -99077,13 +99139,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
99077
99139
|
|
|
99078
99140
|
|
|
99079
99141
|
function compareMaterials(lhs, rhs) {
|
|
99080
|
-
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((
|
|
99142
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs, rhs);
|
|
99081
99143
|
}
|
|
99082
|
-
function compareTextureMappings(
|
|
99083
|
-
|
|
99084
|
-
// For now this will only work if the GraphicBuilder uses a single material for all geometry.
|
|
99085
|
-
// return comparePossiblyUndefined((lhTex: TextureMapping, rhTex: TextureMapping) => lhTex === rhTex ? 0 : compareStringsOrUndefined(lhTex.texture.key, rhTex.texture.key), lhs, rhs);
|
|
99086
|
-
return 0;
|
|
99144
|
+
function compareTextureMappings(lhs, rhs) {
|
|
99145
|
+
return (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.comparePossiblyUndefined)((lh, rh) => lh.compare(rh), lhs, rhs);
|
|
99087
99146
|
}
|
|
99088
99147
|
/** This class is used to determine if things can be batched together for display.
|
|
99089
99148
|
* @internal
|
|
@@ -99912,7 +99971,6 @@ class SolidPrimitiveGeometry extends Geometry {
|
|
|
99912
99971
|
__webpack_require__.r(__webpack_exports__);
|
|
99913
99972
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
99914
99973
|
/* harmony export */ "GraphicDescriptionBuilderImpl": () => (/* binding */ GraphicDescriptionBuilderImpl),
|
|
99915
|
-
/* harmony export */ "WorkerGraphicDescriptionContextImpl": () => (/* binding */ WorkerGraphicDescriptionContextImpl),
|
|
99916
99974
|
/* harmony export */ "collectGraphicDescriptionTransferables": () => (/* binding */ collectGraphicDescriptionTransferables),
|
|
99917
99975
|
/* harmony export */ "isGraphicDescription": () => (/* binding */ isGraphicDescription)
|
|
99918
99976
|
/* harmony export */ });
|
|
@@ -99927,6 +99985,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
99927
99985
|
/* harmony import */ var _VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./VertexTableBuilder */ "../../core/frontend/lib/esm/common/internal/render/VertexTableBuilder.js");
|
|
99928
99986
|
/* harmony import */ var _imdl_ParseImdlDocument__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../imdl/ParseImdlDocument */ "../../core/frontend/lib/esm/common/imdl/ParseImdlDocument.js");
|
|
99929
99987
|
/* harmony import */ var _Symbols__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
99988
|
+
/* harmony import */ var _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./GraphicDescriptionContextImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js");
|
|
99930
99989
|
/*---------------------------------------------------------------------------------------------
|
|
99931
99990
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
99932
99991
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -99934,7 +99993,8 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
99934
99993
|
/** @packageDocumentation
|
|
99935
99994
|
* @module Rendering
|
|
99936
99995
|
*/
|
|
99937
|
-
var _a
|
|
99996
|
+
var _a;
|
|
99997
|
+
|
|
99938
99998
|
|
|
99939
99999
|
|
|
99940
100000
|
|
|
@@ -99946,25 +100006,6 @@ var _a, _b;
|
|
|
99946
100006
|
|
|
99947
100007
|
|
|
99948
100008
|
|
|
99949
|
-
class WorkerGraphicDescriptionContextImpl {
|
|
99950
|
-
constructor(props) {
|
|
99951
|
-
this[_a] = undefined;
|
|
99952
|
-
const propsImpl = props;
|
|
99953
|
-
if (typeof propsImpl.transientIds !== "object" || typeof propsImpl.constraints !== "object") {
|
|
99954
|
-
throw new Error("Invalid WorkerGraphicDescriptionContextProps");
|
|
99955
|
-
}
|
|
99956
|
-
this.constraints = propsImpl.constraints;
|
|
99957
|
-
this.transientIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.TransientIdSequence.fromJSON(propsImpl.transientIds);
|
|
99958
|
-
}
|
|
99959
|
-
toProps(_transferables) {
|
|
99960
|
-
// 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.
|
|
99961
|
-
return {
|
|
99962
|
-
[_Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited]: undefined,
|
|
99963
|
-
transientIds: this.transientIds.toJSON(),
|
|
99964
|
-
};
|
|
99965
|
-
}
|
|
99966
|
-
}
|
|
99967
|
-
_a = _Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited;
|
|
99968
100009
|
class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IMPORTED_MODULE_3__.GraphicAssembler {
|
|
99969
100010
|
constructor(options) {
|
|
99970
100011
|
const type = options.type;
|
|
@@ -99981,10 +100022,13 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
99981
100022
|
wantNormals,
|
|
99982
100023
|
preserveOrder,
|
|
99983
100024
|
});
|
|
99984
|
-
this[
|
|
100025
|
+
this[_a] = undefined;
|
|
99985
100026
|
this._computeChordTolerance = options.computeChordTolerance;
|
|
99986
|
-
this._constraints = options.constraints;
|
|
99987
100027
|
this._viewIndependentOrigin = options.viewIndependentOrigin?.clone();
|
|
100028
|
+
this._context = options.context;
|
|
100029
|
+
if (!(this._context.transientIds instanceof _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.TransientIdSequence)) {
|
|
100030
|
+
throw new Error("Invalid WorkerGraphicDescriptionContext");
|
|
100031
|
+
}
|
|
99988
100032
|
}
|
|
99989
100033
|
finish() {
|
|
99990
100034
|
const description = {
|
|
@@ -100101,7 +100145,19 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
100101
100145
|
return polylineArgs.flags.isDisjoint ? this.createPointStringPrimitive(polylineArgs) : this.createPolylinePrimitive(polylineArgs);
|
|
100102
100146
|
}
|
|
100103
100147
|
createMeshPrimitive(args) {
|
|
100104
|
-
const params = (0,_VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__.createMeshParams)(args, this.
|
|
100148
|
+
const params = (0,_VertexTableBuilder__WEBPACK_IMPORTED_MODULE_8__.createMeshParams)(args, this._context.constraints.maxTextureSize, true);
|
|
100149
|
+
let material;
|
|
100150
|
+
const mat = params.surface.material;
|
|
100151
|
+
if (mat) {
|
|
100152
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.assert)(mat.isAtlas === false && mat.material instanceof _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__.WorkerMaterial);
|
|
100153
|
+
material = mat.material.toImdl();
|
|
100154
|
+
}
|
|
100155
|
+
let textureMapping;
|
|
100156
|
+
const tex = params.surface.textureMapping;
|
|
100157
|
+
if (tex) {
|
|
100158
|
+
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_5__.assert)(tex.texture instanceof _GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_11__.WorkerTexture);
|
|
100159
|
+
textureMapping = { alwaysDisplayed: false, texture: tex.texture.index.toString(10) };
|
|
100160
|
+
}
|
|
100105
100161
|
return {
|
|
100106
100162
|
type: "mesh",
|
|
100107
100163
|
params: {
|
|
@@ -100112,15 +100168,14 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
100112
100168
|
surface: {
|
|
100113
100169
|
...params.surface,
|
|
100114
100170
|
indices: params.surface.indices.data,
|
|
100115
|
-
|
|
100116
|
-
|
|
100117
|
-
textureMapping: undefined,
|
|
100171
|
+
material,
|
|
100172
|
+
textureMapping,
|
|
100118
100173
|
},
|
|
100119
100174
|
},
|
|
100120
100175
|
};
|
|
100121
100176
|
}
|
|
100122
100177
|
createPolylinePrimitive(args) {
|
|
100123
|
-
const params = (0,_PolylineParams__WEBPACK_IMPORTED_MODULE_7__.createPolylineParams)(args, this.
|
|
100178
|
+
const params = (0,_PolylineParams__WEBPACK_IMPORTED_MODULE_7__.createPolylineParams)(args, this._context.constraints.maxTextureSize);
|
|
100124
100179
|
if (!params) {
|
|
100125
100180
|
return undefined;
|
|
100126
100181
|
}
|
|
@@ -100138,7 +100193,7 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
100138
100193
|
};
|
|
100139
100194
|
}
|
|
100140
100195
|
createPointStringPrimitive(args) {
|
|
100141
|
-
const params = (0,_PointStringParams__WEBPACK_IMPORTED_MODULE_6__.createPointStringParams)(args, this.
|
|
100196
|
+
const params = (0,_PointStringParams__WEBPACK_IMPORTED_MODULE_6__.createPointStringParams)(args, this._context.constraints.maxTextureSize);
|
|
100142
100197
|
if (!params) {
|
|
100143
100198
|
return undefined;
|
|
100144
100199
|
}
|
|
@@ -100151,12 +100206,11 @@ class GraphicDescriptionBuilderImpl extends _render_GraphicAssembler__WEBPACK_IM
|
|
|
100151
100206
|
},
|
|
100152
100207
|
};
|
|
100153
100208
|
}
|
|
100154
|
-
resolveGradient() {
|
|
100155
|
-
|
|
100156
|
-
return undefined;
|
|
100209
|
+
resolveGradient(gradient) {
|
|
100210
|
+
return this._context.createGradientTexture(gradient);
|
|
100157
100211
|
}
|
|
100158
100212
|
}
|
|
100159
|
-
|
|
100213
|
+
_a = _Symbols__WEBPACK_IMPORTED_MODULE_10__._implementationProhibited;
|
|
100160
100214
|
function convertVertexTable(src) {
|
|
100161
100215
|
return {
|
|
100162
100216
|
...src,
|
|
@@ -100167,19 +100221,7 @@ function convertVertexTable(src) {
|
|
|
100167
100221
|
}
|
|
100168
100222
|
function isGraphicDescription(description) {
|
|
100169
100223
|
const descr = description;
|
|
100170
|
-
|
|
100171
|
-
return false;
|
|
100172
|
-
}
|
|
100173
|
-
switch (descr.type) {
|
|
100174
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.ViewBackground:
|
|
100175
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.Scene:
|
|
100176
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.WorldDecoration:
|
|
100177
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.WorldOverlay:
|
|
100178
|
-
case _render_GraphicType__WEBPACK_IMPORTED_MODULE_2__.GraphicType.ViewOverlay:
|
|
100179
|
-
return true;
|
|
100180
|
-
default:
|
|
100181
|
-
return false;
|
|
100182
|
-
}
|
|
100224
|
+
return "object" === typeof descr && Array.isArray(descr.primitives) && "number" === typeof descr.type;
|
|
100183
100225
|
}
|
|
100184
100226
|
function collectGraphicDescriptionTransferables(xfers, description) {
|
|
100185
100227
|
if (!isGraphicDescription(description)) {
|
|
@@ -100191,6 +100233,165 @@ function collectGraphicDescriptionTransferables(xfers, description) {
|
|
|
100191
100233
|
}
|
|
100192
100234
|
|
|
100193
100235
|
|
|
100236
|
+
/***/ }),
|
|
100237
|
+
|
|
100238
|
+
/***/ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js":
|
|
100239
|
+
/*!*******************************************************************************************!*\
|
|
100240
|
+
!*** ../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js ***!
|
|
100241
|
+
\*******************************************************************************************/
|
|
100242
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
100243
|
+
|
|
100244
|
+
"use strict";
|
|
100245
|
+
__webpack_require__.r(__webpack_exports__);
|
|
100246
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
100247
|
+
/* harmony export */ "WorkerGraphicDescriptionContextImpl": () => (/* binding */ WorkerGraphicDescriptionContextImpl),
|
|
100248
|
+
/* harmony export */ "WorkerMaterial": () => (/* binding */ WorkerMaterial),
|
|
100249
|
+
/* harmony export */ "WorkerTexture": () => (/* binding */ WorkerTexture)
|
|
100250
|
+
/* harmony export */ });
|
|
100251
|
+
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
100252
|
+
/* harmony import */ var _Symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
100253
|
+
/* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
|
|
100254
|
+
/*---------------------------------------------------------------------------------------------
|
|
100255
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
100256
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
100257
|
+
*--------------------------------------------------------------------------------------------*/
|
|
100258
|
+
/** @packageDocumentation
|
|
100259
|
+
* @module Rendering
|
|
100260
|
+
*/
|
|
100261
|
+
var _a;
|
|
100262
|
+
|
|
100263
|
+
|
|
100264
|
+
|
|
100265
|
+
class WorkerTexture extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture {
|
|
100266
|
+
constructor(index, params) {
|
|
100267
|
+
let type = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderTexture.Type.Normal;
|
|
100268
|
+
if (!(params instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Gradient.Symb) && undefined !== params.type) {
|
|
100269
|
+
type = params.type;
|
|
100270
|
+
}
|
|
100271
|
+
super(type);
|
|
100272
|
+
this.index = index;
|
|
100273
|
+
if (params instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.Gradient.Symb) {
|
|
100274
|
+
this.source = { gradient: params };
|
|
100275
|
+
}
|
|
100276
|
+
else {
|
|
100277
|
+
const transparency = params.transparency;
|
|
100278
|
+
if (params.source instanceof URL) {
|
|
100279
|
+
this.source = { transparency, url: params.source.toString() };
|
|
100280
|
+
}
|
|
100281
|
+
else if (params.source instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ImageSource) {
|
|
100282
|
+
this.source = { transparency, imageSource: params.source.data, format: params.source.format };
|
|
100283
|
+
}
|
|
100284
|
+
else {
|
|
100285
|
+
this.source = { transparency, imageBuffer: params.source.data, format: params.source.format, width: params.source.width };
|
|
100286
|
+
}
|
|
100287
|
+
}
|
|
100288
|
+
}
|
|
100289
|
+
dispose() { }
|
|
100290
|
+
get bytesUsed() { return 0; } // doesn't matter, nobody's calling this.
|
|
100291
|
+
toProps(xfer) {
|
|
100292
|
+
const source = this.source.gradient ? { ...this.source, gradient: this.source.gradient.toJSON() } : this.source;
|
|
100293
|
+
const buffer = source.imageBuffer ?? source.imageSource;
|
|
100294
|
+
if (buffer instanceof Uint8Array) {
|
|
100295
|
+
xfer.add(buffer.buffer);
|
|
100296
|
+
}
|
|
100297
|
+
return {
|
|
100298
|
+
type: this.type,
|
|
100299
|
+
source,
|
|
100300
|
+
};
|
|
100301
|
+
}
|
|
100302
|
+
}
|
|
100303
|
+
function materialColorToImdl(color) {
|
|
100304
|
+
if (!(color instanceof _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef)) {
|
|
100305
|
+
color = _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RgbColor.fromJSON(color).toColorDef();
|
|
100306
|
+
}
|
|
100307
|
+
return color?.toJSON();
|
|
100308
|
+
}
|
|
100309
|
+
class WorkerMaterial extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.RenderMaterial {
|
|
100310
|
+
constructor(params) {
|
|
100311
|
+
let textureMapping;
|
|
100312
|
+
if (params.textureMapping) {
|
|
100313
|
+
textureMapping = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(params.textureMapping.texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params({
|
|
100314
|
+
textureMat2x3: params.textureMapping.transform,
|
|
100315
|
+
mapMode: params.textureMapping.mode,
|
|
100316
|
+
textureWeight: params.textureMapping.weight,
|
|
100317
|
+
worldMapping: params.textureMapping.worldMapping,
|
|
100318
|
+
useConstantLod: params.textureMapping.useConstantLod,
|
|
100319
|
+
constantLodProps: params.textureMapping.constantLodProps,
|
|
100320
|
+
}));
|
|
100321
|
+
textureMapping.normalMapParams = params.textureMapping.normalMapParams;
|
|
100322
|
+
}
|
|
100323
|
+
super({ textureMapping });
|
|
100324
|
+
this.params = params;
|
|
100325
|
+
}
|
|
100326
|
+
toImdl() {
|
|
100327
|
+
let diffuse;
|
|
100328
|
+
if (this.params.diffuse) {
|
|
100329
|
+
diffuse = {
|
|
100330
|
+
weight: this.params.diffuse.weight,
|
|
100331
|
+
color: materialColorToImdl(this.params.diffuse.color),
|
|
100332
|
+
};
|
|
100333
|
+
}
|
|
100334
|
+
let specular;
|
|
100335
|
+
if (this.params.specular) {
|
|
100336
|
+
specular = {
|
|
100337
|
+
weight: this.params.specular.weight,
|
|
100338
|
+
exponent: this.params.specular.exponent,
|
|
100339
|
+
color: materialColorToImdl(this.params.specular.color),
|
|
100340
|
+
};
|
|
100341
|
+
}
|
|
100342
|
+
return {
|
|
100343
|
+
isAtlas: false,
|
|
100344
|
+
material: {
|
|
100345
|
+
alpha: this.params.alpha,
|
|
100346
|
+
diffuse,
|
|
100347
|
+
specular,
|
|
100348
|
+
},
|
|
100349
|
+
};
|
|
100350
|
+
}
|
|
100351
|
+
}
|
|
100352
|
+
class WorkerGraphicDescriptionContextImpl {
|
|
100353
|
+
constructor(props) {
|
|
100354
|
+
this[_a] = undefined;
|
|
100355
|
+
this.textures = [];
|
|
100356
|
+
this.materials = [];
|
|
100357
|
+
const propsImpl = props;
|
|
100358
|
+
if (typeof propsImpl.transientIds !== "object" || typeof propsImpl.constraints !== "object") {
|
|
100359
|
+
throw new Error("Invalid WorkerGraphicDescriptionContextProps");
|
|
100360
|
+
}
|
|
100361
|
+
this.constraints = propsImpl.constraints;
|
|
100362
|
+
this.transientIds = _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.TransientIdSequence.fromJSON(propsImpl.transientIds);
|
|
100363
|
+
}
|
|
100364
|
+
createMaterial(params) {
|
|
100365
|
+
const material = new WorkerMaterial(params);
|
|
100366
|
+
this.materials.push(material);
|
|
100367
|
+
return material;
|
|
100368
|
+
}
|
|
100369
|
+
createTexture(params) {
|
|
100370
|
+
const texture = new WorkerTexture(this.textures.length, params);
|
|
100371
|
+
this.textures.push(texture);
|
|
100372
|
+
return texture;
|
|
100373
|
+
}
|
|
100374
|
+
createGradientTexture(gradient) {
|
|
100375
|
+
const existing = this.textures.find((tx) => tx.source.gradient && tx.source.gradient.equals(gradient));
|
|
100376
|
+
if (existing) {
|
|
100377
|
+
return existing;
|
|
100378
|
+
}
|
|
100379
|
+
const texture = new WorkerTexture(this.textures.length, gradient);
|
|
100380
|
+
this.textures.push(texture);
|
|
100381
|
+
return texture;
|
|
100382
|
+
}
|
|
100383
|
+
toProps(transferables) {
|
|
100384
|
+
// 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.
|
|
100385
|
+
return {
|
|
100386
|
+
[_Symbols__WEBPACK_IMPORTED_MODULE_1__._implementationProhibited]: undefined,
|
|
100387
|
+
transientIds: this.transientIds.toJSON(),
|
|
100388
|
+
textures: this.textures.map((tx) => tx.toProps(transferables)),
|
|
100389
|
+
};
|
|
100390
|
+
}
|
|
100391
|
+
}
|
|
100392
|
+
_a = _Symbols__WEBPACK_IMPORTED_MODULE_1__._implementationProhibited;
|
|
100393
|
+
|
|
100394
|
+
|
|
100194
100395
|
/***/ }),
|
|
100195
100396
|
|
|
100196
100397
|
/***/ "../../core/frontend/lib/esm/common/internal/render/MeshBuilder.js":
|
|
@@ -103423,8 +103624,7 @@ function copy2dTo3d(pts2d, depth) {
|
|
|
103423
103624
|
__webpack_require__.r(__webpack_exports__);
|
|
103424
103625
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
103425
103626
|
/* harmony export */ "GraphicDescription": () => (/* binding */ GraphicDescription),
|
|
103426
|
-
/* harmony export */ "GraphicDescriptionBuilder": () => (/* binding */ GraphicDescriptionBuilder)
|
|
103427
|
-
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* binding */ WorkerGraphicDescriptionContext)
|
|
103627
|
+
/* harmony export */ "GraphicDescriptionBuilder": () => (/* binding */ GraphicDescriptionBuilder)
|
|
103428
103628
|
/* harmony export */ });
|
|
103429
103629
|
/* harmony import */ var _internal_render_GraphicDescriptionBuilderImpl__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/render/GraphicDescriptionBuilderImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionBuilderImpl.js");
|
|
103430
103630
|
/* harmony import */ var _internal_Symbols__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
@@ -103450,15 +103650,6 @@ var GraphicDescription;
|
|
|
103450
103650
|
GraphicDescription.collectTransferables = collectTransferables;
|
|
103451
103651
|
})(GraphicDescription || (GraphicDescription = {}));
|
|
103452
103652
|
/** @beta */
|
|
103453
|
-
var WorkerGraphicDescriptionContext;
|
|
103454
|
-
(function (WorkerGraphicDescriptionContext) {
|
|
103455
|
-
/** Instantiate a context from its opaque representation. */
|
|
103456
|
-
function fromProps(props) {
|
|
103457
|
-
return new _internal_render_GraphicDescriptionBuilderImpl__WEBPACK_IMPORTED_MODULE_0__.WorkerGraphicDescriptionContextImpl(props);
|
|
103458
|
-
}
|
|
103459
|
-
WorkerGraphicDescriptionContext.fromProps = fromProps;
|
|
103460
|
-
})(WorkerGraphicDescriptionContext || (WorkerGraphicDescriptionContext = {}));
|
|
103461
|
-
/** @beta */
|
|
103462
103653
|
var GraphicDescriptionBuilder;
|
|
103463
103654
|
(function (GraphicDescriptionBuilder) {
|
|
103464
103655
|
/** Create a [[GraphicDescriptionBuilder]] using the specified `options`. */
|
|
@@ -103469,6 +103660,41 @@ var GraphicDescriptionBuilder;
|
|
|
103469
103660
|
})(GraphicDescriptionBuilder || (GraphicDescriptionBuilder = {}));
|
|
103470
103661
|
|
|
103471
103662
|
|
|
103663
|
+
/***/ }),
|
|
103664
|
+
|
|
103665
|
+
/***/ "../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js":
|
|
103666
|
+
/*!******************************************************************************!*\
|
|
103667
|
+
!*** ../../core/frontend/lib/esm/common/render/GraphicDescriptionContext.js ***!
|
|
103668
|
+
\******************************************************************************/
|
|
103669
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
103670
|
+
|
|
103671
|
+
"use strict";
|
|
103672
|
+
__webpack_require__.r(__webpack_exports__);
|
|
103673
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
103674
|
+
/* harmony export */ "WorkerGraphicDescriptionContext": () => (/* binding */ WorkerGraphicDescriptionContext)
|
|
103675
|
+
/* harmony export */ });
|
|
103676
|
+
/* harmony import */ var _internal_Symbols__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ../internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
103677
|
+
/* harmony import */ var _internal_render_GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../internal/render/GraphicDescriptionContextImpl */ "../../core/frontend/lib/esm/common/internal/render/GraphicDescriptionContextImpl.js");
|
|
103678
|
+
/*---------------------------------------------------------------------------------------------
|
|
103679
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
103680
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
103681
|
+
*--------------------------------------------------------------------------------------------*/
|
|
103682
|
+
/** @packageDocumentation
|
|
103683
|
+
* @module Rendering
|
|
103684
|
+
*/
|
|
103685
|
+
|
|
103686
|
+
|
|
103687
|
+
/** @beta */
|
|
103688
|
+
var WorkerGraphicDescriptionContext;
|
|
103689
|
+
(function (WorkerGraphicDescriptionContext) {
|
|
103690
|
+
/** Instantiate a context from its opaque representation. */
|
|
103691
|
+
function fromProps(props) {
|
|
103692
|
+
return new _internal_render_GraphicDescriptionContextImpl__WEBPACK_IMPORTED_MODULE_1__.WorkerGraphicDescriptionContextImpl(props);
|
|
103693
|
+
}
|
|
103694
|
+
WorkerGraphicDescriptionContext.fromProps = fromProps;
|
|
103695
|
+
})(WorkerGraphicDescriptionContext || (WorkerGraphicDescriptionContext = {}));
|
|
103696
|
+
|
|
103697
|
+
|
|
103472
103698
|
/***/ }),
|
|
103473
103699
|
|
|
103474
103700
|
/***/ "../../core/frontend/lib/esm/common/render/GraphicPrimitive.js":
|
|
@@ -109514,17 +109740,56 @@ class RenderSystem {
|
|
|
109514
109740
|
*/
|
|
109515
109741
|
async resolveGraphicDescriptionContext(props, iModel) {
|
|
109516
109742
|
const impl = props;
|
|
109517
|
-
if (typeof impl.transientIds !== "object") {
|
|
109743
|
+
if (typeof impl.transientIds !== "object" || !Array.isArray(impl.textures)) {
|
|
109518
109744
|
throw new Error("Invalid GraphicDescriptionContextProps");
|
|
109519
109745
|
}
|
|
109520
109746
|
if (impl.resolved) {
|
|
109521
109747
|
throw new Error("resolveGraphicDescriptionContext can only be called once for a given GraphicDescriptionContextProps");
|
|
109522
109748
|
}
|
|
109749
|
+
const textures = new Map();
|
|
109750
|
+
await Promise.allSettled(impl.textures.map(async (tex, i) => {
|
|
109751
|
+
let texture;
|
|
109752
|
+
if (tex.source.gradient) {
|
|
109753
|
+
texture = this.getGradientTexture(_itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.Gradient.Symb.fromJSON(tex.source.gradient));
|
|
109754
|
+
}
|
|
109755
|
+
else if (tex.source.imageSource) {
|
|
109756
|
+
texture = await this.createTextureFromSource({
|
|
109757
|
+
source: new _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageSource(tex.source.imageSource, tex.source.format),
|
|
109758
|
+
type: tex.type,
|
|
109759
|
+
transparency: tex.transparency,
|
|
109760
|
+
});
|
|
109761
|
+
}
|
|
109762
|
+
else if (tex.source.imageBuffer) {
|
|
109763
|
+
texture = this.createTexture({
|
|
109764
|
+
type: tex.type,
|
|
109765
|
+
image: {
|
|
109766
|
+
source: _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.ImageBuffer.create(tex.source.imageBuffer, tex.source.format, tex.source.width),
|
|
109767
|
+
transparency: tex.transparency,
|
|
109768
|
+
},
|
|
109769
|
+
});
|
|
109770
|
+
}
|
|
109771
|
+
else if (tex.source.url) {
|
|
109772
|
+
const image = await (0,_common_ImageUtil__WEBPACK_IMPORTED_MODULE_6__.tryImageElementFromUrl)(tex.source.url);
|
|
109773
|
+
if (image) {
|
|
109774
|
+
texture = this.createTexture({
|
|
109775
|
+
type: tex.type,
|
|
109776
|
+
image: {
|
|
109777
|
+
source: image,
|
|
109778
|
+
transparency: tex.transparency,
|
|
109779
|
+
},
|
|
109780
|
+
});
|
|
109781
|
+
}
|
|
109782
|
+
}
|
|
109783
|
+
if (texture) {
|
|
109784
|
+
textures.set(i.toString(10), texture);
|
|
109785
|
+
}
|
|
109786
|
+
}));
|
|
109523
109787
|
const remap = iModel.transientIds.merge(impl.transientIds);
|
|
109524
109788
|
impl.resolved = true;
|
|
109525
109789
|
return {
|
|
109526
109790
|
[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_12__._implementationProhibited]: undefined,
|
|
109527
109791
|
remapTransientLocalId: (source) => remap(source),
|
|
109792
|
+
[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_12__._textures]: textures,
|
|
109528
109793
|
};
|
|
109529
109794
|
}
|
|
109530
109795
|
}
|
|
@@ -116853,6 +117118,9 @@ class Material extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMat
|
|
|
116853
117118
|
this.isAtlas = false;
|
|
116854
117119
|
this.fragUniforms = new Float32Array(4);
|
|
116855
117120
|
this.rgba = new Float32Array(4);
|
|
117121
|
+
if (Material.preserveParams) {
|
|
117122
|
+
this.params = params;
|
|
117123
|
+
}
|
|
116856
117124
|
if (undefined !== params.diffuseColor) {
|
|
116857
117125
|
const rgb = _FloatRGBA__WEBPACK_IMPORTED_MODULE_1__.FloatRgb.fromColorDef(params.diffuseColor);
|
|
116858
117126
|
this.rgba[0] = rgb.red;
|
|
@@ -116882,6 +117150,8 @@ class Material extends _itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMat
|
|
|
116882
117150
|
}
|
|
116883
117151
|
// eslint-disable-next-line deprecation/deprecation
|
|
116884
117152
|
Material.default = new Material(_itwin_core_common__WEBPACK_IMPORTED_MODULE_0__.RenderMaterial.Params.defaults);
|
|
117153
|
+
/** Strictly for testing. */
|
|
117154
|
+
Material.preserveParams = false;
|
|
116885
117155
|
Object.freeze(Material.default);
|
|
116886
117156
|
/** @internal */
|
|
116887
117157
|
function createMaterialInfo(source) {
|
|
@@ -139665,6 +139935,7 @@ class GraphicsTile extends _internal__WEBPACK_IMPORTED_MODULE_4__.Tile {
|
|
|
139665
139935
|
type: tree.batchType,
|
|
139666
139936
|
loadEdges: false !== tree.edgeOptions,
|
|
139667
139937
|
options: { tileId: this.contentId },
|
|
139938
|
+
timeline: tree.timeline,
|
|
139668
139939
|
});
|
|
139669
139940
|
let content = { isLeaf: true };
|
|
139670
139941
|
if (reader) {
|
|
@@ -142692,6 +142963,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142692
142963
|
/* 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");
|
|
142693
142964
|
/* harmony import */ var _render_GraphicBranch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../render/GraphicBranch */ "../../core/frontend/lib/esm/render/GraphicBranch.js");
|
|
142694
142965
|
/* 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");
|
|
142966
|
+
/* harmony import */ var _common_internal_Symbols__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../common/internal/Symbols */ "../../core/frontend/lib/esm/common/internal/Symbols.js");
|
|
142695
142967
|
/*---------------------------------------------------------------------------------------------
|
|
142696
142968
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
142697
142969
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -142708,6 +142980,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
142708
142980
|
|
|
142709
142981
|
|
|
142710
142982
|
|
|
142983
|
+
|
|
142711
142984
|
async function loadNamedTexture(name, namedTex, options) {
|
|
142712
142985
|
// Reasons a texture could be embedded in the tile content instead of requested separately from the backend:
|
|
142713
142986
|
// - external textures are disabled
|
|
@@ -143083,7 +143356,7 @@ async function createGraphicFromDescription(descr, context, system) {
|
|
|
143083
143356
|
const graphics = [];
|
|
143084
143357
|
const graphicsOptions = {
|
|
143085
143358
|
system,
|
|
143086
|
-
textures:
|
|
143359
|
+
textures: context[_common_internal_Symbols__WEBPACK_IMPORTED_MODULE_9__._textures],
|
|
143087
143360
|
patterns: new Map(),
|
|
143088
143361
|
};
|
|
143089
143362
|
for (const primitive of descr.primitives) {
|
|
@@ -298862,7 +299135,7 @@ var loadLanguages = instance.loadLanguages;
|
|
|
298862
299135
|
/***/ ((module) => {
|
|
298863
299136
|
|
|
298864
299137
|
"use strict";
|
|
298865
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.8.0-dev.
|
|
299138
|
+
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"}}');
|
|
298866
299139
|
|
|
298867
299140
|
/***/ })
|
|
298868
299141
|
|