@itwin/ecschema-rpcinterface-tests 4.3.0-dev.23 → 4.3.0-dev.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/dist/bundled-tests.js +217 -53
- 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_4_14_node_modules_loaders_gl_draco_d-aa4ff5.bundled-tests.js.map +1 -1
- package/package.json +16 -16
|
@@ -28598,6 +28598,7 @@ var ChangesetType;
|
|
|
28598
28598
|
"use strict";
|
|
28599
28599
|
__webpack_require__.r(__webpack_exports__);
|
|
28600
28600
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
28601
|
+
/* harmony export */ ClipIntersectionStyle: () => (/* binding */ ClipIntersectionStyle),
|
|
28601
28602
|
/* harmony export */ ClipStyle: () => (/* binding */ ClipStyle),
|
|
28602
28603
|
/* harmony export */ CutStyle: () => (/* binding */ CutStyle)
|
|
28603
28604
|
/* harmony export */ });
|
|
@@ -28605,6 +28606,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28605
28606
|
/* harmony import */ var _RgbColor__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./RgbColor */ "../../core/common/lib/esm/RgbColor.js");
|
|
28606
28607
|
/* harmony import */ var _HiddenLine__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./HiddenLine */ "../../core/common/lib/esm/HiddenLine.js");
|
|
28607
28608
|
/* harmony import */ var _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FeatureSymbology */ "../../core/common/lib/esm/FeatureSymbology.js");
|
|
28609
|
+
/* harmony import */ var _ColorDef__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./ColorDef */ "../../core/common/lib/esm/ColorDef.js");
|
|
28608
28610
|
/*---------------------------------------------------------------------------------------------
|
|
28609
28611
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
28610
28612
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -28616,6 +28618,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
28616
28618
|
|
|
28617
28619
|
|
|
28618
28620
|
|
|
28621
|
+
|
|
28619
28622
|
/** As part of a [[ClipStyle]], describes how section-cut graphics should be displayed.
|
|
28620
28623
|
* @note Section-cut graphics are only produced if [[ClipStyle.produceCutGeometry]] is `true`.
|
|
28621
28624
|
* @public
|
|
@@ -28668,30 +28671,89 @@ class CutStyle {
|
|
|
28668
28671
|
/** The default CutStyle, configured to draw the section-cut graphics using the view's settings, with no overrides. */
|
|
28669
28672
|
CutStyle.defaults = new CutStyle();
|
|
28670
28673
|
|
|
28674
|
+
/** As part of a [[ClipStyle]], describes how to colorize geometry intersecting the clip planes.
|
|
28675
|
+
* @note Edges are highlighted only if [[ClipStyle.ClipIntersectionStyle]] is `true`.
|
|
28676
|
+
* @public
|
|
28677
|
+
* @extensions
|
|
28678
|
+
*/
|
|
28679
|
+
class ClipIntersectionStyle {
|
|
28680
|
+
constructor(color = _RgbColor__WEBPACK_IMPORTED_MODULE_1__.RgbColor.fromColorDef(_ColorDef__WEBPACK_IMPORTED_MODULE_4__.ColorDef.white), width = 1) {
|
|
28681
|
+
this.color = color;
|
|
28682
|
+
this.width = width;
|
|
28683
|
+
}
|
|
28684
|
+
/** Create a highlight from its components. */
|
|
28685
|
+
static create(color, width) {
|
|
28686
|
+
if (!color && !width)
|
|
28687
|
+
return this.defaults;
|
|
28688
|
+
return new ClipIntersectionStyle(color, width);
|
|
28689
|
+
}
|
|
28690
|
+
static fromJSON(props) {
|
|
28691
|
+
if (props === undefined) {
|
|
28692
|
+
return ClipIntersectionStyle.defaults;
|
|
28693
|
+
}
|
|
28694
|
+
const color = props.color ? _RgbColor__WEBPACK_IMPORTED_MODULE_1__.RgbColor.fromJSON(props.color) : _RgbColor__WEBPACK_IMPORTED_MODULE_1__.RgbColor.fromColorDef(_ColorDef__WEBPACK_IMPORTED_MODULE_4__.ColorDef.white);
|
|
28695
|
+
const width = props.width ? props.width : 1;
|
|
28696
|
+
return new ClipIntersectionStyle(color, width);
|
|
28697
|
+
}
|
|
28698
|
+
/** The JSON representation of this style. It is `undefined` if this style matches the defaults. */
|
|
28699
|
+
toJSON() {
|
|
28700
|
+
const props = {};
|
|
28701
|
+
if (this.matchesDefaults) {
|
|
28702
|
+
return undefined;
|
|
28703
|
+
}
|
|
28704
|
+
if (this.color)
|
|
28705
|
+
props.color = this.color.toJSON();
|
|
28706
|
+
if (this.width)
|
|
28707
|
+
props.width = this.width;
|
|
28708
|
+
return props;
|
|
28709
|
+
}
|
|
28710
|
+
get matchesDefaults() {
|
|
28711
|
+
if (this === ClipIntersectionStyle.defaults)
|
|
28712
|
+
return true;
|
|
28713
|
+
return !this.color && !this.width;
|
|
28714
|
+
}
|
|
28715
|
+
}
|
|
28716
|
+
ClipIntersectionStyle.defaults = new ClipIntersectionStyle();
|
|
28717
|
+
|
|
28671
28718
|
/** Describes symbology and behavior applied to a [ClipVector]($core-geometry) when applied to a [ViewState]($frontend) or [[ModelClipGroup]].
|
|
28672
28719
|
* @see [[DisplayStyleSettings.clipStyle]].
|
|
28673
28720
|
* @public
|
|
28674
28721
|
*/
|
|
28675
28722
|
class ClipStyle {
|
|
28676
|
-
constructor(produceCutGeometry, cutStyle, inside, outside) {
|
|
28723
|
+
constructor(produceCutGeometry, colorizeIntersection, cutStyle, inside, outside, intersectionStyle) {
|
|
28677
28724
|
this.produceCutGeometry = produceCutGeometry;
|
|
28725
|
+
this.colorizeIntersection = colorizeIntersection;
|
|
28678
28726
|
this.cutStyle = cutStyle;
|
|
28679
28727
|
this.insideColor = inside;
|
|
28680
28728
|
this.outsideColor = outside;
|
|
28729
|
+
this.intersectionStyle = intersectionStyle;
|
|
28681
28730
|
}
|
|
28682
|
-
/**
|
|
28683
|
-
static create(
|
|
28684
|
-
if (
|
|
28731
|
+
/** @internal */
|
|
28732
|
+
static create(styleOrProduceCutGeometry, cutStyle, insideColor, outsideColor) {
|
|
28733
|
+
if (typeof styleOrProduceCutGeometry === "boolean") {
|
|
28734
|
+
cutStyle = cutStyle === undefined ? CutStyle.defaults : cutStyle;
|
|
28735
|
+
if (!styleOrProduceCutGeometry && cutStyle.matchesDefaults && !insideColor && !outsideColor) {
|
|
28736
|
+
return this.defaults;
|
|
28737
|
+
}
|
|
28738
|
+
return new ClipStyle(styleOrProduceCutGeometry, false, cutStyle, insideColor, outsideColor, undefined);
|
|
28739
|
+
}
|
|
28740
|
+
const style = styleOrProduceCutGeometry;
|
|
28741
|
+
if (!style.produceCutGeometry && !style.colorizeIntersection && (!style.cutStyle || style.cutStyle.matchesDefaults) && !style.insideColor && !style.outsideColor && !style.intersectionStyle)
|
|
28685
28742
|
return this.defaults;
|
|
28686
|
-
|
|
28743
|
+
const produceCutGeometry = style.produceCutGeometry ? true : false;
|
|
28744
|
+
const colorizeIntersection = style.colorizeIntersection ? true : false;
|
|
28745
|
+
cutStyle = style.cutStyle === undefined ? CutStyle.defaults : style.cutStyle;
|
|
28746
|
+
return new ClipStyle(produceCutGeometry, colorizeIntersection, cutStyle, style.insideColor, style.outsideColor, style.intersectionStyle);
|
|
28687
28747
|
}
|
|
28688
28748
|
static fromJSON(props) {
|
|
28689
28749
|
if (_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.isNonEmptyObject(props)) {
|
|
28690
28750
|
const produceCutGeometry = props.produceCutGeometry ?? false;
|
|
28751
|
+
const colorizeIntersection = props.colorizeIntersection ? true : false;
|
|
28691
28752
|
const cutStyle = CutStyle.fromJSON(props.cutStyle);
|
|
28692
|
-
const
|
|
28693
|
-
const
|
|
28694
|
-
|
|
28753
|
+
const insideColor = props.insideColor ? _RgbColor__WEBPACK_IMPORTED_MODULE_1__.RgbColor.fromJSON(props.insideColor) : undefined;
|
|
28754
|
+
const outsideColor = props.outsideColor ? _RgbColor__WEBPACK_IMPORTED_MODULE_1__.RgbColor.fromJSON(props.outsideColor) : undefined;
|
|
28755
|
+
const intersectionStyle = props.intersectionStyle ? ClipIntersectionStyle.fromJSON(props.intersectionStyle) : undefined;
|
|
28756
|
+
return this.create({ produceCutGeometry, colorizeIntersection, cutStyle, insideColor, outsideColor, intersectionStyle });
|
|
28695
28757
|
}
|
|
28696
28758
|
return this.defaults;
|
|
28697
28759
|
}
|
|
@@ -28702,6 +28764,8 @@ class ClipStyle {
|
|
|
28702
28764
|
const props = {};
|
|
28703
28765
|
if (this.produceCutGeometry)
|
|
28704
28766
|
props.produceCutGeometry = true;
|
|
28767
|
+
if (this.colorizeIntersection)
|
|
28768
|
+
props.colorizeIntersection = true;
|
|
28705
28769
|
const cutStyle = this.cutStyle.toJSON();
|
|
28706
28770
|
if (cutStyle) {
|
|
28707
28771
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(!this.cutStyle.matchesDefaults);
|
|
@@ -28711,17 +28775,19 @@ class ClipStyle {
|
|
|
28711
28775
|
props.insideColor = this.insideColor.toJSON();
|
|
28712
28776
|
if (this.outsideColor)
|
|
28713
28777
|
props.outsideColor = this.outsideColor.toJSON();
|
|
28778
|
+
if (this.intersectionStyle)
|
|
28779
|
+
props.intersectionStyle = this.intersectionStyle.toJSON();
|
|
28714
28780
|
return props;
|
|
28715
28781
|
}
|
|
28716
28782
|
/** Returns true if this style matches the [[ClipStyle.defaults]] - that is, it overrides no settings from the view. */
|
|
28717
28783
|
get matchesDefaults() {
|
|
28718
28784
|
if (this === ClipStyle.defaults)
|
|
28719
28785
|
return true;
|
|
28720
|
-
return !this.produceCutGeometry && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults;
|
|
28786
|
+
return !this.produceCutGeometry && !this.colorizeIntersection && !this.insideColor && !this.outsideColor && this.cutStyle.matchesDefaults && !this.intersectionStyle;
|
|
28721
28787
|
}
|
|
28722
28788
|
}
|
|
28723
28789
|
/** The default style, which overrides none of the view's settings. */
|
|
28724
|
-
ClipStyle.defaults = new ClipStyle(false, CutStyle.defaults, undefined, undefined);
|
|
28790
|
+
ClipStyle.defaults = new ClipStyle(false, false, CutStyle.defaults, undefined, undefined, undefined);
|
|
28725
28791
|
|
|
28726
28792
|
|
|
28727
28793
|
|
|
@@ -44245,6 +44311,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
44245
44311
|
/* harmony export */ ChangedValueState: () => (/* reexport safe */ _ECSqlTypes__WEBPACK_IMPORTED_MODULE_21__.ChangedValueState),
|
|
44246
44312
|
/* harmony export */ ChangesetType: () => (/* reexport safe */ _ChangesetProps__WEBPACK_IMPORTED_MODULE_11__.ChangesetType),
|
|
44247
44313
|
/* harmony export */ ChannelConstraintError: () => (/* reexport safe */ _IModelError__WEBPACK_IMPORTED_MODULE_62__.ChannelConstraintError),
|
|
44314
|
+
/* harmony export */ ClipIntersectionStyle: () => (/* reexport safe */ _ClipStyle__WEBPACK_IMPORTED_MODULE_12__.ClipIntersectionStyle),
|
|
44248
44315
|
/* harmony export */ ClipStyle: () => (/* reexport safe */ _ClipStyle__WEBPACK_IMPORTED_MODULE_12__.ClipStyle),
|
|
44249
44316
|
/* harmony export */ Code: () => (/* reexport safe */ _Code__WEBPACK_IMPORTED_MODULE_13__.Code),
|
|
44250
44317
|
/* harmony export */ CodeScopeSpec: () => (/* reexport safe */ _Code__WEBPACK_IMPORTED_MODULE_13__.CodeScopeSpec),
|
|
@@ -99873,6 +99940,7 @@ const extensionExports = {
|
|
|
99873
99940
|
ChangedValueState: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ChangedValueState,
|
|
99874
99941
|
ChangesetType: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ChangesetType,
|
|
99875
99942
|
ClipEventType: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.ClipEventType,
|
|
99943
|
+
ClipIntersectionStyle: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ClipIntersectionStyle,
|
|
99876
99944
|
Cluster: _core_frontend__WEBPACK_IMPORTED_MODULE_1__.Cluster,
|
|
99877
99945
|
ColorByName: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorByName,
|
|
99878
99946
|
ColorDef: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef,
|
|
@@ -110608,6 +110676,10 @@ class ClipStack {
|
|
|
110608
110676
|
this._outsideColor = _FloatRGBA__WEBPACK_IMPORTED_MODULE_3__.FloatRgba.from(0, 0, 0, 0);
|
|
110609
110677
|
/** For detecting whether the transform changed from one invocation of setViewClip to the next. */
|
|
110610
110678
|
this._prevTransform = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Transform.createZero();
|
|
110679
|
+
/** True if we want to colorize geometry intersecting clip planes */
|
|
110680
|
+
this._colorizeIntersection = false;
|
|
110681
|
+
/** The style to colorize the geometry intersecting clip planes */
|
|
110682
|
+
this._intersectionStyle = _FloatRGBA__WEBPACK_IMPORTED_MODULE_3__.FloatRgba.from(0, 0, 0, 0);
|
|
110611
110683
|
this._getTransform = getTransform;
|
|
110612
110684
|
this._wantViewClip = wantViewClip;
|
|
110613
110685
|
this._numTotalRows = this._numRowsInUse = 0;
|
|
@@ -110623,6 +110695,15 @@ class ClipStack {
|
|
|
110623
110695
|
get hasOutsideColor() {
|
|
110624
110696
|
return this.outsideColor.alpha !== 0;
|
|
110625
110697
|
}
|
|
110698
|
+
get colorizeIntersection() {
|
|
110699
|
+
return this._colorizeIntersection;
|
|
110700
|
+
}
|
|
110701
|
+
set colorizeIntersection(b) {
|
|
110702
|
+
this._colorizeIntersection = b;
|
|
110703
|
+
}
|
|
110704
|
+
get intersectionStyle() {
|
|
110705
|
+
return this._intersectionStyle;
|
|
110706
|
+
}
|
|
110626
110707
|
get bytesUsed() {
|
|
110627
110708
|
return this._texture ? this._texture.bytesUsed : 0;
|
|
110628
110709
|
}
|
|
@@ -110630,6 +110711,7 @@ class ClipStack {
|
|
|
110630
110711
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(this._stack.length === 1);
|
|
110631
110712
|
this.updateColor(style.insideColor, this._insideColor);
|
|
110632
110713
|
this.updateColor(style.outsideColor, this._outsideColor);
|
|
110714
|
+
this.updateIntersectionStyle(style.colorizeIntersection, style.intersectionStyle, this._intersectionStyle);
|
|
110633
110715
|
const transform = this._getTransform();
|
|
110634
110716
|
if (!transform.isAlmostEqual(this._prevTransform)) {
|
|
110635
110717
|
transform.clone(this._prevTransform);
|
|
@@ -110766,6 +110848,15 @@ class ClipStack {
|
|
|
110766
110848
|
if (rgb)
|
|
110767
110849
|
rgba.setRgbColor(rgb);
|
|
110768
110850
|
}
|
|
110851
|
+
updateIntersectionStyle(colorizeIntersection, style, _thisStyle) {
|
|
110852
|
+
this._colorizeIntersection = colorizeIntersection === true ? true : false;
|
|
110853
|
+
if (style !== undefined) {
|
|
110854
|
+
if (style.color !== undefined)
|
|
110855
|
+
_thisStyle.setRgbColor(style.color);
|
|
110856
|
+
if (style.width !== undefined)
|
|
110857
|
+
_thisStyle.alpha = style.width;
|
|
110858
|
+
}
|
|
110859
|
+
}
|
|
110769
110860
|
}
|
|
110770
110861
|
|
|
110771
110862
|
|
|
@@ -121014,6 +121105,7 @@ var Convert;
|
|
|
121014
121105
|
case 8 /* VariableType.Sampler2D */: return "sampler2D";
|
|
121015
121106
|
case 9 /* VariableType.SamplerCube */: return "samplerCube";
|
|
121016
121107
|
case 10 /* VariableType.Uint */: return "uint";
|
|
121108
|
+
case 11 /* VariableType.BVec2 */: return "bvec2";
|
|
121017
121109
|
default:
|
|
121018
121110
|
(0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(false);
|
|
121019
121111
|
return "undefined";
|
|
@@ -121224,6 +121316,7 @@ class ShaderVariables {
|
|
|
121224
121316
|
variableSize = 1;
|
|
121225
121317
|
break;
|
|
121226
121318
|
case 3 /* VariableType.Vec2 */:
|
|
121319
|
+
case 11 /* VariableType.BVec2 */:
|
|
121227
121320
|
variableSize = 2;
|
|
121228
121321
|
break;
|
|
121229
121322
|
case 4 /* VariableType.Vec3 */:
|
|
@@ -121290,6 +121383,7 @@ class ShaderVariables {
|
|
|
121290
121383
|
variableSize = 1;
|
|
121291
121384
|
break;
|
|
121292
121385
|
case 3 /* VariableType.Vec2 */:
|
|
121386
|
+
case 11 /* VariableType.BVec2 */:
|
|
121293
121387
|
variableSize = 2;
|
|
121294
121388
|
break;
|
|
121295
121389
|
case 4 /* VariableType.Vec3 */:
|
|
@@ -121673,9 +121767,9 @@ class FragmentShaderBuilder extends ShaderBuilder {
|
|
|
121673
121767
|
const applyClipping = this.get(10 /* FragmentShaderComponent.ApplyClipping */);
|
|
121674
121768
|
if (undefined !== applyClipping) {
|
|
121675
121769
|
prelude.addline("vec3 g_clipColor;\n");
|
|
121676
|
-
prelude.addFunction("
|
|
121677
|
-
main.addline("
|
|
121678
|
-
main.addline(" if (
|
|
121770
|
+
prelude.addFunction("bvec2 applyClipping(vec4 baseColor)", applyClipping);
|
|
121771
|
+
main.addline(" g_hasClipColor = applyClipping(baseColor);");
|
|
121772
|
+
main.addline(" if (g_hasClipColor.x) { baseColor.rgb = g_clipColor; } else {");
|
|
121679
121773
|
clipIndent = " ";
|
|
121680
121774
|
}
|
|
121681
121775
|
const applyMaterialOverrides = this.get(2 /* FragmentShaderComponent.ApplyMaterialOverrides */);
|
|
@@ -121731,6 +121825,9 @@ class FragmentShaderBuilder extends ShaderBuilder {
|
|
|
121731
121825
|
prelude.addFunction("vec4 applyLighting(vec4 baseColor)", applyLighting);
|
|
121732
121826
|
main.addline(" baseColor = applyLighting(baseColor);");
|
|
121733
121827
|
}
|
|
121828
|
+
if (undefined !== applyClipping) {
|
|
121829
|
+
main.addline(" if (g_hasClipColor.y) { baseColor.rgba = vec4(g_clipColor, 1.0); } ");
|
|
121830
|
+
}
|
|
121734
121831
|
const reverseWoW = this.get(9 /* FragmentShaderComponent.ReverseWhiteOnWhite */);
|
|
121735
121832
|
if (undefined !== reverseWoW) {
|
|
121736
121833
|
prelude.addFunction("vec4 reverseWhiteOnWhite(vec4 baseColor)", reverseWoW);
|
|
@@ -129574,7 +129671,9 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129574
129671
|
/* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
|
|
129575
129672
|
/* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
|
|
129576
129673
|
/* harmony import */ var _Common__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Common */ "../../core/frontend/lib/esm/render/webgl/glsl/Common.js");
|
|
129577
|
-
/* harmony import */ var
|
|
129674
|
+
/* harmony import */ var _FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./FeatureSymbology */ "../../core/frontend/lib/esm/render/webgl/glsl/FeatureSymbology.js");
|
|
129675
|
+
/* harmony import */ var _Translucency__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Translucency */ "../../core/frontend/lib/esm/render/webgl/glsl/Translucency.js");
|
|
129676
|
+
/* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
|
|
129578
129677
|
/*---------------------------------------------------------------------------------------------
|
|
129579
129678
|
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
129580
129679
|
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
@@ -129586,11 +129685,11 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
129586
129685
|
|
|
129587
129686
|
|
|
129588
129687
|
|
|
129688
|
+
|
|
129689
|
+
|
|
129589
129690
|
const getClipPlaneFloat = `
|
|
129590
129691
|
vec4 getClipPlane(int index) {
|
|
129591
|
-
|
|
129592
|
-
float y = (float(index) + 0.5) / float(u_clipParams[2]);
|
|
129593
|
-
return TEXTURE(s_clipSampler, vec2(x, y));
|
|
129692
|
+
return texelFetch(s_clipSampler, ivec2(0, index), 0);
|
|
129594
129693
|
}
|
|
129595
129694
|
`;
|
|
129596
129695
|
const unpackFloat = `
|
|
@@ -129611,57 +129710,112 @@ float calcClipPlaneDist(vec3 camPos, vec4 plane) {
|
|
|
129611
129710
|
return dot(vec4(camPos, 1.0), plane);
|
|
129612
129711
|
}
|
|
129613
129712
|
`;
|
|
129713
|
+
const applyClipPlanesLoop = `
|
|
129714
|
+
for (int i = u_clipParams[0]; i < u_clipParams[1]; i++) {
|
|
129715
|
+
`;
|
|
129716
|
+
const applyClipPlanesLoopBody = `
|
|
129717
|
+
vec4 plane = getClipPlane(i);
|
|
129718
|
+
if (plane.x == 2.0) { // indicates start of new UnionOfConvexClipPlaneSets
|
|
129719
|
+
if (numSetsClippedBy + int(clippedByCurrentPlaneSet) == numPlaneSets)
|
|
129720
|
+
break;
|
|
129721
|
+
|
|
129722
|
+
numPlaneSets = 1;
|
|
129723
|
+
numSetsClippedBy = 0;
|
|
129724
|
+
clippedByCurrentPlaneSet = false;
|
|
129725
|
+
} else if (plane.xyz == vec3(0.0)) { // indicates start of new clip plane set
|
|
129726
|
+
numPlaneSets = numPlaneSets + 1;
|
|
129727
|
+
numSetsClippedBy += int(clippedByCurrentPlaneSet);
|
|
129728
|
+
clippedByCurrentPlaneSet = false;
|
|
129729
|
+
} else if (!clippedByCurrentPlaneSet && calcClipPlaneDist(v_eyeSpace, plane) < 0.0) {
|
|
129730
|
+
clippedByCurrentPlaneSet = true;
|
|
129731
|
+
}
|
|
129732
|
+
`;
|
|
129733
|
+
const applyClipPlanesIntersectionLoopBody = `
|
|
129734
|
+
if ((i <= u_clipParams[1] - 2) && (!clippedByCurrentPlaneSet)) {
|
|
129735
|
+
|
|
129736
|
+
//Obtaining closest point on plane to current frag in eyespace
|
|
129737
|
+
vec3 pointOnPlane = v_eyeSpace - (abs(calcClipPlaneDist(v_eyeSpace, plane)) * plane.xyz);
|
|
129738
|
+
|
|
129739
|
+
//determining whether to colorize
|
|
129740
|
+
if (distance(v_eyeSpace, pointOnPlane) <= (kFrustumType_Perspective == u_frustum.z ? -pointOnPlane.z * widthFactor : widthFactor)) {
|
|
129741
|
+
colorizeIntersection = true;
|
|
129742
|
+
}
|
|
129743
|
+
}
|
|
129744
|
+
}
|
|
129745
|
+
|
|
129746
|
+
//Need to pull this condition out of the loop for when there are multiple clip planes defined
|
|
129747
|
+
if (colorizeIntersection && !clippedByCurrentPlaneSet) {
|
|
129748
|
+
g_clipColor = u_clipIntersection.rgb;
|
|
129749
|
+
return bvec2(true, true);
|
|
129750
|
+
}
|
|
129751
|
+
`;
|
|
129614
129752
|
const applyClipPlanesPrelude = `
|
|
129615
129753
|
int numPlaneSets = 1;
|
|
129616
129754
|
int numSetsClippedBy = 0;
|
|
129617
129755
|
bool clippedByCurrentPlaneSet = false;
|
|
129618
|
-
|
|
129619
|
-
|
|
129620
|
-
|
|
129756
|
+
bool colorizeIntersection = false;
|
|
129757
|
+
if (u_colorizeIntersection) {
|
|
129758
|
+
float widthFactor = u_pixelWidthFactor * 2.0 * u_clipIntersection.a;
|
|
129759
|
+
${applyClipPlanesLoop}${applyClipPlanesLoopBody}${applyClipPlanesIntersectionLoopBody}
|
|
129760
|
+
} else {
|
|
129761
|
+
${applyClipPlanesLoop}${applyClipPlanesLoopBody} }\n
|
|
129762
|
+
}
|
|
129621
129763
|
`;
|
|
129622
129764
|
const applyClipPlanesPostlude = `
|
|
129623
|
-
vec4 plane = getClipPlane(i);
|
|
129624
|
-
if (plane.x == 2.0) { // indicates start of new UnionOfConvexClipPlaneSets
|
|
129625
|
-
if (numSetsClippedBy + int(clippedByCurrentPlaneSet) == numPlaneSets)
|
|
129626
|
-
break;
|
|
129627
|
-
|
|
129628
|
-
numPlaneSets = 1;
|
|
129629
|
-
numSetsClippedBy = 0;
|
|
129630
|
-
clippedByCurrentPlaneSet = false;
|
|
129631
|
-
} else if (plane.xyz == vec3(0.0)) { // indicates start of new clip plane set
|
|
129632
|
-
numPlaneSets = numPlaneSets + 1;
|
|
129633
|
-
numSetsClippedBy += int(clippedByCurrentPlaneSet);
|
|
129634
|
-
clippedByCurrentPlaneSet = false;
|
|
129635
|
-
} else if (!clippedByCurrentPlaneSet && calcClipPlaneDist(v_eyeSpace, plane) < 0.0) {
|
|
129636
|
-
clippedByCurrentPlaneSet = true;
|
|
129637
|
-
}
|
|
129638
|
-
}
|
|
129639
129765
|
|
|
129640
129766
|
numSetsClippedBy += int(clippedByCurrentPlaneSet);
|
|
129641
129767
|
if (numSetsClippedBy == numPlaneSets) {
|
|
129642
129768
|
if (u_outsideRgba.a > 0.0) {
|
|
129643
129769
|
g_clipColor = u_outsideRgba.rgb;
|
|
129644
|
-
return true;
|
|
129770
|
+
return bvec2(true,false);
|
|
129645
129771
|
} else {
|
|
129646
129772
|
discard;
|
|
129647
129773
|
}
|
|
129648
129774
|
} else if (u_insideRgba.a > 0.0) {
|
|
129649
129775
|
g_clipColor = u_insideRgba.rgb;
|
|
129650
|
-
return true;
|
|
129776
|
+
return bvec2(true,false);
|
|
129651
129777
|
}
|
|
129652
129778
|
|
|
129653
|
-
return false;
|
|
129779
|
+
return bvec2(false,false);
|
|
129780
|
+
`;
|
|
129781
|
+
const assignFragData = `
|
|
129782
|
+
if (g_hasClipColor.y) {
|
|
129783
|
+
vec4 output0 = vec4(g_clipColor, 1.0);
|
|
129784
|
+
vec4 output1 = vec4(1.0, 1.0, 0.0, 1.0);
|
|
129785
|
+
|
|
129786
|
+
FragColor0 = output0;
|
|
129787
|
+
FragColor1 = output1;
|
|
129788
|
+
} else {
|
|
129789
|
+
${_Translucency__WEBPACK_IMPORTED_MODULE_4__.computeOutputs}
|
|
129790
|
+
|
|
129791
|
+
FragColor0 = output0;
|
|
129792
|
+
FragColor1 = output1;
|
|
129793
|
+
}
|
|
129654
129794
|
`;
|
|
129655
|
-
const applyClipPlanes = applyClipPlanesPrelude +
|
|
129795
|
+
const applyClipPlanes = applyClipPlanesPrelude + applyClipPlanesPostlude;
|
|
129656
129796
|
const clipParams = new Int32Array(3);
|
|
129657
129797
|
/** @internal */
|
|
129658
129798
|
function addClipping(prog) {
|
|
129659
129799
|
const frag = prog.frag;
|
|
129660
129800
|
const vert = prog.vert;
|
|
129661
129801
|
(0,_Common__WEBPACK_IMPORTED_MODULE_2__.addEyeSpace)(prog);
|
|
129802
|
+
prog.addUniform("u_outsideRgba", 5 /* VariableType.Vec4 */, (program) => {
|
|
129803
|
+
program.addGraphicUniform("u_outsideRgba", (uniform, params) => {
|
|
129804
|
+
params.target.uniforms.branch.clipStack.outsideColor.bind(uniform);
|
|
129805
|
+
});
|
|
129806
|
+
});
|
|
129807
|
+
prog.addUniform("u_insideRgba", 5 /* VariableType.Vec4 */, (program) => {
|
|
129808
|
+
program.addGraphicUniform("u_insideRgba", (uniform, params) => {
|
|
129809
|
+
params.target.uniforms.branch.clipStack.insideColor.bind(uniform);
|
|
129810
|
+
});
|
|
129811
|
+
});
|
|
129812
|
+
(0,_Common__WEBPACK_IMPORTED_MODULE_2__.addFrustum)(prog);
|
|
129813
|
+
(0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_3__.addPixelWidthFactor)(frag);
|
|
129814
|
+
(0,_Vertex__WEBPACK_IMPORTED_MODULE_5__.addModelViewMatrix)(vert);
|
|
129662
129815
|
// [0] = index of first plane
|
|
129663
129816
|
// [1] = index of last plane (one past the end)
|
|
129664
129817
|
// [2] = texture height
|
|
129818
|
+
prog.frag.addGlobal("g_hasClipColor", 11 /* VariableType.BVec2 */);
|
|
129665
129819
|
prog.addUniformArray("u_clipParams", 1 /* VariableType.Int */, 3, (program) => {
|
|
129666
129820
|
program.addGraphicUniform("u_clipParams", (uniform, params) => {
|
|
129667
129821
|
// Set this to false to visualize pre-shader culling of geometry.
|
|
@@ -129674,17 +129828,16 @@ function addClipping(prog) {
|
|
|
129674
129828
|
uniform.setUniform1iv(clipParams);
|
|
129675
129829
|
});
|
|
129676
129830
|
});
|
|
129677
|
-
prog.addUniform("
|
|
129678
|
-
program.
|
|
129679
|
-
params.target.uniforms.branch.clipStack.
|
|
129831
|
+
prog.frag.addUniform("u_colorizeIntersection", 0 /* VariableType.Boolean */, (program) => {
|
|
129832
|
+
program.addProgramUniform("u_colorizeIntersection", (uniform, params) => {
|
|
129833
|
+
uniform.setUniform1i(params.target.uniforms.branch.clipStack.colorizeIntersection ? 1 : 0);
|
|
129680
129834
|
});
|
|
129681
129835
|
});
|
|
129682
|
-
prog.addUniform("
|
|
129683
|
-
program.addGraphicUniform("
|
|
129684
|
-
params.target.uniforms.branch.clipStack.
|
|
129836
|
+
prog.frag.addUniform("u_clipIntersection", 5 /* VariableType.Vec4 */, (program) => {
|
|
129837
|
+
program.addGraphicUniform("u_clipIntersection", (uniform, params) => {
|
|
129838
|
+
params.target.uniforms.branch.clipStack.intersectionStyle.bind(uniform);
|
|
129685
129839
|
});
|
|
129686
129840
|
});
|
|
129687
|
-
(0,_Vertex__WEBPACK_IMPORTED_MODULE_3__.addModelViewMatrix)(vert);
|
|
129688
129841
|
frag.addFunction(getClipPlaneFloat);
|
|
129689
129842
|
frag.addFunction(calcClipPlaneDist);
|
|
129690
129843
|
frag.addUniform("s_clipSampler", 8 /* VariableType.Sampler2D */, (program) => {
|
|
@@ -129696,6 +129849,9 @@ function addClipping(prog) {
|
|
|
129696
129849
|
});
|
|
129697
129850
|
}, 3 /* VariablePrecision.High */);
|
|
129698
129851
|
frag.set(10 /* FragmentShaderComponent.ApplyClipping */, applyClipPlanes);
|
|
129852
|
+
// modify translucent shaders
|
|
129853
|
+
if (frag.findFunction(_Translucency__WEBPACK_IMPORTED_MODULE_4__.computeAlphaWeight))
|
|
129854
|
+
frag.set(16 /* FragmentShaderComponent.AssignFragData */, assignFragData);
|
|
129699
129855
|
}
|
|
129700
129856
|
|
|
129701
129857
|
|
|
@@ -130162,10 +130318,10 @@ const computeTranslucentColor = `
|
|
|
130162
130318
|
vec4 computeColor() {
|
|
130163
130319
|
vec4 opaque = computeOpaqueColor();
|
|
130164
130320
|
vec4 accum = TEXTURE(u_accumulation, v_texCoord);
|
|
130165
|
-
|
|
130321
|
+
vec2 rg = TEXTURE(u_revealage, v_texCoord).rg;
|
|
130166
130322
|
|
|
130167
|
-
vec4 transparent = vec4(accum.rgb / clamp(r, 1e-4, 5e4), accum.a);
|
|
130168
|
-
vec4 col = (1.0 - transparent.a) * transparent + transparent.a * opaque;
|
|
130323
|
+
vec4 transparent = vec4(accum.rgb / clamp(rg.r, 1e-4, 5e4), accum.a);
|
|
130324
|
+
vec4 col = mix((1.0 - transparent.a) * transparent + transparent.a * opaque, vec4(u_clipIntersection.rgb, 1.0), rg.g);
|
|
130169
130325
|
return col;
|
|
130170
130326
|
}
|
|
130171
130327
|
`;
|
|
@@ -130213,6 +130369,11 @@ function createCompositeProgram(flags, context) {
|
|
|
130213
130369
|
_Texture__WEBPACK_IMPORTED_MODULE_2__.Texture2DHandle.bindSampler(uniform, params.geometry.reveal, _RenderFlags__WEBPACK_IMPORTED_MODULE_1__.TextureUnit.Two);
|
|
130214
130370
|
});
|
|
130215
130371
|
});
|
|
130372
|
+
builder.frag.addUniform("u_clipIntersection", 5 /* VariableType.Vec4 */, (program) => {
|
|
130373
|
+
program.addGraphicUniform("u_clipIntersection", (uniform, params) => {
|
|
130374
|
+
params.target.uniforms.branch.clipStack.intersectionStyle.bind(uniform);
|
|
130375
|
+
});
|
|
130376
|
+
});
|
|
130216
130377
|
frag.addFunction(computeTranslucentColor);
|
|
130217
130378
|
if (!wantHilite) {
|
|
130218
130379
|
frag.set(1 /* FragmentShaderComponent.ComputeBaseColor */, computeTranslucentBaseColor);
|
|
@@ -131355,6 +131516,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
131355
131516
|
/* harmony export */ addHiliter: () => (/* binding */ addHiliter),
|
|
131356
131517
|
/* harmony export */ addMaxAlpha: () => (/* binding */ addMaxAlpha),
|
|
131357
131518
|
/* harmony export */ addOvrFlagConstants: () => (/* binding */ addOvrFlagConstants),
|
|
131519
|
+
/* harmony export */ addPixelWidthFactor: () => (/* binding */ addPixelWidthFactor),
|
|
131358
131520
|
/* harmony export */ addRenderOrder: () => (/* binding */ addRenderOrder),
|
|
131359
131521
|
/* harmony export */ addRenderOrderConstants: () => (/* binding */ addRenderOrderConstants),
|
|
131360
131522
|
/* harmony export */ addSurfaceDiscard: () => (/* binding */ addSurfaceDiscard),
|
|
@@ -135819,7 +135981,9 @@ function addThematicDisplay(builder, isForPointClouds = false, isForTerrainMesh
|
|
|
135819
135981
|
"use strict";
|
|
135820
135982
|
__webpack_require__.r(__webpack_exports__);
|
|
135821
135983
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
135822
|
-
/* harmony export */ addTranslucency: () => (/* binding */ addTranslucency)
|
|
135984
|
+
/* harmony export */ addTranslucency: () => (/* binding */ addTranslucency),
|
|
135985
|
+
/* harmony export */ computeAlphaWeight: () => (/* binding */ computeAlphaWeight),
|
|
135986
|
+
/* harmony export */ computeOutputs: () => (/* binding */ computeOutputs)
|
|
135823
135987
|
/* harmony export */ });
|
|
135824
135988
|
/* harmony import */ var _Common__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./Common */ "../../core/frontend/lib/esm/render/webgl/glsl/Common.js");
|
|
135825
135989
|
/* harmony import */ var _Fragment__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Fragment */ "../../core/frontend/lib/esm/render/webgl/glsl/Fragment.js");
|
|
@@ -135857,7 +136021,7 @@ const computeOutputs = `
|
|
|
135857
136021
|
float outputScale = (u_shaderFlags[kShaderBit_OITScaleOutput] ? 1.0 / 3001.040604 : 1.0);
|
|
135858
136022
|
|
|
135859
136023
|
vec4 output0 = vec4(Ci * wzi * outputScale, ai);
|
|
135860
|
-
vec4 output1 = vec4(ai * wzi * outputScale);
|
|
136024
|
+
vec4 output1 = vec4(ai * wzi * outputScale, 0.0, 0.0, ai * wzi * outputScale);
|
|
135861
136025
|
`;
|
|
135862
136026
|
const assignFragData = `${computeOutputs}
|
|
135863
136027
|
FragColor0 = output0;
|
|
@@ -289673,7 +289837,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
|
|
|
289673
289837
|
/***/ ((module) => {
|
|
289674
289838
|
|
|
289675
289839
|
"use strict";
|
|
289676
|
-
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.
|
|
289840
|
+
module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"4.3.0-dev.24","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 -c extraction.eslint.config.js \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2 && 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.3.0-dev.24","@itwin/core-bentley":"workspace:^4.3.0-dev.24","@itwin/core-common":"workspace:^4.3.0-dev.24","@itwin/core-geometry":"workspace:^4.3.0-dev.24","@itwin/core-orbitgt":"workspace:^4.3.0-dev.24","@itwin/core-quantity":"workspace:^4.3.0-dev.24"},"//devDependencies":["NOTE: All peerDependencies should also be listed as devDependencies since peerDependencies are not considered by npm install","NOTE: All tools used by scripts in this package must be listed as devDependencies"],"devDependencies":{"@itwin/appui-abstract":"workspace:*","@itwin/build-tools":"workspace:*","@itwin/core-bentley":"workspace:*","@itwin/core-common":"workspace:*","@itwin/core-geometry":"workspace:*","@itwin/core-orbitgt":"workspace:*","@itwin/core-quantity":"workspace:*","@itwin/certa":"workspace:*","@itwin/eslint-plugin":"4.0.0-dev.44","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/mocha":"^8.2.2","@types/node":"18.16.1","@types/sinon":"^10.0.15","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.3.10","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^8.44.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^15.0.4","source-map-loader":"^4.0.0","typescript":"~5.0.2","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.1.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","fuse.js":"^3.3.0","wms-capabilities":"0.4.0"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"}}');
|
|
289677
289841
|
|
|
289678
289842
|
/***/ })
|
|
289679
289843
|
|