@itwin/rpcinterface-full-stack-tests 3.5.0-dev.63 → 3.5.0-dev.65

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.
@@ -64191,6 +64191,8 @@ var TypeOfChange;
64191
64191
  TypeOfChange[TypeOfChange["Indirect"] = 8] = "Indirect";
64192
64192
  /** Hidden properties of the element changed */
64193
64193
  TypeOfChange[TypeOfChange["Hidden"] = 16] = "Hidden";
64194
+ /** The top-most parent of the element has changed */
64195
+ TypeOfChange[TypeOfChange["Parent"] = 32] = "Parent";
64194
64196
  })(TypeOfChange || (TypeOfChange = {}));
64195
64197
 
64196
64198
 
@@ -79114,8 +79116,16 @@ class ViewDetails {
79114
79116
  return this._clipVector.isValid ? this._clipVector : undefined;
79115
79117
  }
79116
79118
  set clipVector(clip) {
79117
- if (!clip)
79118
- clip = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.ClipVector.createEmpty();
79119
+ const curClip = this.clipVector;
79120
+ if (curClip === clip)
79121
+ return;
79122
+ if (!curClip) {
79123
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== clip);
79124
+ // An empty clip is equivalent to no clip.
79125
+ if (!clip.isValid)
79126
+ return;
79127
+ }
79128
+ clip = clip !== null && clip !== void 0 ? clip : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.ClipVector.createEmpty();
79119
79129
  this.onClipVectorChanged.raiseEvent(clip.isValid ? clip : undefined);
79120
79130
  this._clipVector = clip;
79121
79131
  if (clip.isValid)
@@ -114116,6 +114126,7 @@ __webpack_require__.r(__webpack_exports__);
114116
114126
  /* harmony export */ "ViewPose3d": () => (/* binding */ ViewPose3d)
114117
114127
  /* harmony export */ });
114118
114128
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
114129
+ /* harmony import */ var _ViewState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ViewState */ "../../core/frontend/lib/esm/ViewState.js");
114119
114130
  /*---------------------------------------------------------------------------------------------
114120
114131
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
114121
114132
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -114124,8 +114135,10 @@ __webpack_require__.r(__webpack_exports__);
114124
114135
  * @module Views
114125
114136
  */
114126
114137
 
114127
- /** The "pose" for a view. This is either the volume or area, depending on whether the view is 3d or 2d,
114128
- * plus the camera position/angle, if it is enabled.
114138
+
114139
+ /** The "pose" for a [View]($docs/learning/frontend/views#viewstate-parameters) describing the viewed area or volume, depending upon whether
114140
+ * the view is 2d or 3d.
114141
+ * @see [[ViewState.savePose]] to extract a pose from a view and [[ViewState.applyPose]] to apply a pose to a view.
114129
114142
  * @note a ViewPose is immutable.
114130
114143
  * @public
114131
114144
  * @extensions
@@ -114134,15 +114147,22 @@ class ViewPose {
114134
114147
  constructor(cameraOn) {
114135
114148
  this.cameraOn = cameraOn;
114136
114149
  }
114150
+ /** Computes the center of the viewed volume. */
114137
114151
  get center() {
114138
114152
  const delta = this.rotation.multiplyTransposeVector(this.extents);
114139
114153
  return this.origin.plusScaled(delta, 0.5);
114140
114154
  }
114155
+ /** Returns the target point of the view. This is the same as [[center]] unless [[cameraOn]] is `true`. */
114141
114156
  get target() { return this.center; }
114157
+ /** Computes the Z vector of the [[rotation]] matrix. */
114142
114158
  get zVec() { return this.rotation.getRow(2); }
114143
114159
  }
114144
- /** @internal */
114160
+ /** The "pose" for a [[ViewState3d]], including information about the view's [Camera]($common) if it is enabled.
114161
+ * @public
114162
+ * @extensions
114163
+ */
114145
114164
  class ViewPose3d extends ViewPose {
114165
+ /** Construct a pose from the specified 3d view. */
114146
114166
  constructor(view) {
114147
114167
  super(view.isCameraOn);
114148
114168
  this.origin = view.origin.clone();
@@ -114150,17 +114170,24 @@ class ViewPose3d extends ViewPose {
114150
114170
  this.rotation = view.rotation.clone();
114151
114171
  this.camera = view.camera.clone();
114152
114172
  }
114173
+ /** @internal override */
114153
114174
  get target() {
114154
114175
  return this.cameraOn ? this.camera.eye.plusScaled(this.rotation.getRow(2), -1.0 * this.camera.focusDist) : this.center;
114155
114176
  }
114177
+ /** @internal override */
114156
114178
  equal(other) {
114179
+ if (!(other instanceof ViewPose3d))
114180
+ return false;
114157
114181
  return this.cameraOn === other.cameraOn &&
114158
114182
  this.origin.isAlmostEqual(other.origin) &&
114159
114183
  this.extents.isAlmostEqual(other.extents) &&
114160
114184
  this.rotation.isAlmostEqual(other.rotation) &&
114161
114185
  (!this.cameraOn || this.camera.equals(other.camera));
114162
114186
  }
114187
+ /** @internal override */
114163
114188
  equalState(view) {
114189
+ if (!(view instanceof _ViewState__WEBPACK_IMPORTED_MODULE_1__.ViewState3d))
114190
+ return false;
114164
114191
  return this.cameraOn === view.isCameraOn &&
114165
114192
  this.origin.isAlmostEqual(view.origin) &&
114166
114193
  this.extents.isAlmostEqual(view.extents) &&
@@ -114168,26 +114195,39 @@ class ViewPose3d extends ViewPose {
114168
114195
  (!this.cameraOn || this.camera.equals(view.camera));
114169
114196
  }
114170
114197
  }
114171
- /** @internal */
114198
+ /** The "pose" for a [[ViewState2d]].
114199
+ * @public
114200
+ * @extensions
114201
+ */
114172
114202
  class ViewPose2d extends ViewPose {
114203
+ /** Construct a pose from the specified 2d view. */
114173
114204
  constructor(view) {
114174
114205
  super(false);
114175
- this.origin2 = view.origin.clone();
114206
+ this.origin2d = view.origin.clone();
114176
114207
  this.delta = view.delta.clone();
114177
114208
  this.angle = view.angle.clone();
114178
114209
  }
114210
+ /** @internal override */
114179
114211
  equal(other) {
114180
- return this.origin2.isAlmostEqual(other.origin) &&
114212
+ if (!(other instanceof ViewPose2d))
114213
+ return false;
114214
+ return this.origin2d.isAlmostEqual(other.origin) &&
114181
114215
  this.delta.isAlmostEqual(other.delta) &&
114182
114216
  this.angle.isAlmostEqualNoPeriodShift(other.angle);
114183
114217
  }
114218
+ /** @internal override */
114184
114219
  equalState(view) {
114185
- return this.origin2.isAlmostEqual(view.origin) &&
114220
+ if (!(view instanceof _ViewState__WEBPACK_IMPORTED_MODULE_1__.ViewState2d))
114221
+ return false;
114222
+ return this.origin2d.isAlmostEqual(view.origin) &&
114186
114223
  this.delta.isAlmostEqual(view.delta) &&
114187
114224
  this.angle.isAlmostEqualNoPeriodShift(view.angle);
114188
114225
  }
114189
- get origin() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d(this.origin2.x, this.origin2.y); }
114226
+ /** @internal override */
114227
+ get origin() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d(this.origin2d.x, this.origin2d.y); }
114228
+ /** @internal override */
114190
114229
  get extents() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d(this.delta.x, this.delta.y); }
114230
+ /** @internal override */
114191
114231
  get rotation() { return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ(), this.angle); }
114192
114232
  }
114193
114233
 
@@ -115429,16 +115469,18 @@ class ViewState3d extends ViewState {
115429
115469
  const index = this.details.modelClipGroups.findGroupIndex(modelId);
115430
115470
  return -1 !== index ? this._modelClips[index] : undefined;
115431
115471
  }
115432
- /** @internal */
115472
+ /** Capture a copy of the viewed volume and camera parameters. */
115433
115473
  savePose() { return new _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose3d(this); }
115434
- /** @internal */
115474
+ /** @internal override */
115435
115475
  applyPose(val) {
115436
- this._cameraOn = val.cameraOn;
115437
- this.setOrigin(val.origin);
115438
- this.setExtents(val.extents);
115439
- this.rotation.setFrom(val.rotation);
115440
- this.camera.setFrom(val.camera);
115441
- this._updateMaxGlobalScopeFactor();
115476
+ if (val instanceof _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose3d) {
115477
+ this._cameraOn = val.cameraOn;
115478
+ this.setOrigin(val.origin);
115479
+ this.setExtents(val.extents);
115480
+ this.rotation.setFrom(val.rotation);
115481
+ this.camera.setFrom(val.camera);
115482
+ this._updateMaxGlobalScopeFactor();
115483
+ }
115442
115484
  return this;
115443
115485
  }
115444
115486
  toJSON() {
@@ -116134,13 +116176,15 @@ class ViewState2d extends ViewState {
116134
116176
  is3d() { return false; }
116135
116177
  /** @internal */
116136
116178
  isSpatialView() { return false; }
116137
- /** @internal */
116179
+ /** Capture a copy of the viewed area. */
116138
116180
  savePose() { return new _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose2d(this); }
116139
- /** @internal */
116181
+ /** @internal override */
116140
116182
  applyPose(val) {
116141
- this.setOrigin(val.origin);
116142
- this.setExtents(val.delta);
116143
- this.angle.setFrom(val.angle);
116183
+ if (val instanceof _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose2d) {
116184
+ this.setOrigin(val.origin);
116185
+ this.setExtents(val.delta);
116186
+ this.angle.setFrom(val.angle);
116187
+ }
116144
116188
  return this;
116145
116189
  }
116146
116190
  /** Return the model for this 2d view. */
@@ -137381,6 +137425,19 @@ class MeshData {
137381
137425
  if (undefined !== params.surface.textureMapping) {
137382
137426
  this.texture = params.surface.textureMapping.texture;
137383
137427
  this._textureAlwaysDisplayed = params.surface.textureMapping.alwaysDisplayed;
137428
+ if (undefined !== params.surface.material && !params.surface.material.isAtlas) {
137429
+ const matTM = params.surface.material.material.textureMapping;
137430
+ if (undefined !== matTM && undefined !== matTM.normalMapParams) {
137431
+ if (undefined !== matTM.normalMapParams.normalMap) {
137432
+ this.normalMap = matTM.normalMapParams.normalMap;
137433
+ }
137434
+ else {
137435
+ // If there are normal map params but the normal map is not present, use the texture as a normal map instead of a pattern map.
137436
+ this.normalMap = this.texture;
137437
+ this.texture = undefined;
137438
+ }
137439
+ }
137440
+ }
137384
137441
  }
137385
137442
  else {
137386
137443
  this.texture = undefined;
@@ -137465,6 +137522,7 @@ class MeshGeometry extends _CachedGeometry__WEBPACK_IMPORTED_MODULE_1__.LUTGeome
137465
137522
  get colorInfo() { return this.mesh.lut.colorInfo; }
137466
137523
  get uniformColor() { return this.colorInfo.isUniform ? this.colorInfo.uniform : undefined; }
137467
137524
  get texture() { return this.mesh.texture; }
137525
+ get normalMap() { return this.mesh.normalMap; }
137468
137526
  get hasBakedLighting() { return this.mesh.hasBakedLighting; }
137469
137527
  get lut() { return this.mesh.lut; }
137470
137528
  get hasScalarAnimation() { return this.mesh.lut.hasScalarAnimation; }
@@ -140275,6 +140333,8 @@ var TextureUnit;
140275
140333
  TextureUnit[TextureUnit["RealityMeshThematicGradient"] = WebGLRenderingContext.TEXTURE11] = "RealityMeshThematicGradient";
140276
140334
  // Lookup table for indexed edges - used only if WebGL 2 is available.
140277
140335
  TextureUnit[TextureUnit["EdgeLUT"] = WebGLRenderingContext.TEXTURE12] = "EdgeLUT";
140336
+ // Normal map texture - used only if WebGL 2 is available.
140337
+ TextureUnit[TextureUnit["NormalMap"] = WebGLRenderingContext.TEXTURE13] = "NormalMap";
140278
140338
  })(TextureUnit || (TextureUnit = {}));
140279
140339
  /** @internal */
140280
140340
  function isPlanar(order) {
@@ -143780,7 +143840,7 @@ class VertexShaderBuilder extends ShaderBuilder {
143780
143840
  */
143781
143841
  class FragmentShaderBuilder extends ShaderBuilder {
143782
143842
  constructor(flags = {}) {
143783
- super(21 /* COUNT */, flags);
143843
+ super(22 /* COUNT */, flags);
143784
143844
  this.requiresEarlyZWorkaround = false;
143785
143845
  if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2)
143786
143846
  this.addFragOutput("FragColor", -1);
@@ -143826,6 +143886,11 @@ class FragmentShaderBuilder extends ShaderBuilder {
143826
143886
  prelude.addFunction("bool checkForEarlyDiscard()", checkForEarlyDiscard);
143827
143887
  main.addline(" if (checkForEarlyDiscard()) { discard; return; }");
143828
143888
  }
143889
+ const finalizeNormal = this.get(21 /* FinalizeNormal */);
143890
+ if (undefined !== finalizeNormal) {
143891
+ prelude.addFunction("vec3 finalizeNormal()", finalizeNormal);
143892
+ main.addline(" g_normal = finalizeNormal();");
143893
+ }
143829
143894
  main.addline(" vec4 baseColor = computeBaseColor();");
143830
143895
  const finalizeDepth = this.get(18 /* FinalizeDepth */);
143831
143896
  if (undefined !== finalizeDepth) {
@@ -145358,6 +145423,7 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
145358
145423
  get isLit() { return _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.Lit === this.surfaceType || _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.TexturedLit === this.surfaceType; }
145359
145424
  get isTexturedType() { return _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.Textured === this.surfaceType || _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.TexturedLit === this.surfaceType; }
145360
145425
  get hasTexture() { return this.isTexturedType && undefined !== this.texture; }
145426
+ get hasNormalMap() { return this.isLit && this.isTexturedType && undefined !== this.normalMap; }
145361
145427
  get isGlyph() { return this.mesh.isGlyph; }
145362
145428
  get alwaysRenderTranslucent() { return this.isGlyph; }
145363
145429
  get isTileSection() { return undefined !== this.texture && this.texture.isTileSection; }
@@ -145474,6 +145540,9 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
145474
145540
  useTexture(params) {
145475
145541
  return this.wantTextures(params.target, this.hasTexture);
145476
145542
  }
145543
+ useNormalMap(params) {
145544
+ return this.wantNormalMaps(params.target, this.hasNormalMap);
145545
+ }
145477
145546
  computeSurfaceFlags(params, flags) {
145478
145547
  const target = params.target;
145479
145548
  const vf = target.currentViewFlags;
@@ -145481,7 +145550,6 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
145481
145550
  flags[3 /* IgnoreMaterial */] = useMaterial ? 0 : 1;
145482
145551
  flags[9 /* HasMaterialAtlas */] = useMaterial && this.hasMaterialAtlas ? 1 : 0;
145483
145552
  flags[1 /* ApplyLighting */] = 0;
145484
- flags[8 /* HasNormalMap */] = 0;
145485
145553
  flags[6 /* HasColorAndNormal */] = 0;
145486
145554
  if (this.isLit) {
145487
145555
  flags[2 /* HasNormals */] = 1;
@@ -145498,6 +145566,7 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
145498
145566
  flags[2 /* HasNormals */] = 0;
145499
145567
  }
145500
145568
  flags[0 /* HasTexture */] = this.useTexture(params) ? 1 : 0;
145569
+ flags[8 /* HasNormalMap */] = this.useNormalMap(params) ? 1 : 0;
145501
145570
  // The transparency threshold controls how transparent a surface must be to allow light to pass through; more opaque surfaces cast shadows.
145502
145571
  flags[4 /* TransparencyThreshold */] = params.target.isDrawingShadowMap ? 1 : 0;
145503
145572
  flags[5 /* BackgroundFill */] = 0;
@@ -145544,6 +145613,17 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
145544
145613
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.Always === (fill & _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.Always);
145545
145614
  }
145546
145615
  }
145616
+ wantNormalMaps(target, normalMapExists) {
145617
+ if (!normalMapExists || !target.displayNormalMaps)
145618
+ return false;
145619
+ const flags = target.currentViewFlags;
145620
+ switch (flags.renderMode) {
145621
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SmoothShade:
145622
+ return flags.textures;
145623
+ default:
145624
+ return false;
145625
+ }
145626
+ }
145547
145627
  }
145548
145628
 
145549
145629
 
@@ -146218,6 +146298,7 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
146218
146298
  textureWeight: args.textureMapping.weight,
146219
146299
  worldMapping: args.textureMapping.worldMapping,
146220
146300
  }));
146301
+ params.textureMapping.normalMapParams = args.textureMapping.normalMapParams;
146221
146302
  }
146222
146303
  if (args.source) {
146223
146304
  params.key = args.source.id;
@@ -146561,6 +146642,7 @@ class Target extends _RenderTarget__WEBPACK_IMPORTED_MODULE_8__.RenderTarget {
146561
146642
  this.displayRealityTilePreload = false;
146562
146643
  this.displayRealityTileRanges = false;
146563
146644
  this.logRealityTiles = false;
146645
+ this.displayNormalMaps = true;
146564
146646
  this.freezeRealityTiles = false;
146565
146647
  this._isDisposed = false;
146566
146648
  this._scratchRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
@@ -150805,9 +150887,10 @@ __webpack_require__.r(__webpack_exports__);
150805
150887
  /* harmony export */ });
150806
150888
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
150807
150889
  /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
150808
- /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
150809
- /* harmony import */ var _Surface__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Surface */ "../../core/frontend/lib/esm/render/webgl/glsl/Surface.js");
150810
- /* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
150890
+ /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../System */ "../../core/frontend/lib/esm/render/webgl/System.js");
150891
+ /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
150892
+ /* harmony import */ var _Surface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Surface */ "../../core/frontend/lib/esm/render/webgl/glsl/Surface.js");
150893
+ /* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
150811
150894
  /*---------------------------------------------------------------------------------------------
150812
150895
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
150813
150896
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -150820,6 +150903,7 @@ __webpack_require__.r(__webpack_exports__);
150820
150903
 
150821
150904
 
150822
150905
 
150906
+
150823
150907
  const initialize = `
150824
150908
  g_anim_step = vec2(1.0) / u_animLUTParams.xy;
150825
150909
  g_anim_center = g_anim_step * 0.5;
@@ -150975,12 +151059,12 @@ function addAnimation(vert, isSurface, isThematic) {
150975
151059
  vert.addGlobal("g_anim_step", 3 /* Vec2 */);
150976
151060
  vert.addGlobal("g_anim_center", 3 /* Vec2 */);
150977
151061
  vert.addInitializer(initialize);
150978
- vert.addFunction(_Vertex__WEBPACK_IMPORTED_MODULE_4__.unquantizePosition);
151062
+ vert.addFunction(_Vertex__WEBPACK_IMPORTED_MODULE_5__.unquantizePosition);
150979
151063
  vert.addUniform("u_animLUT", 8 /* Sampler2D */, (prog) => {
150980
151064
  prog.addGraphicUniform("u_animLUT", (uniform, params) => {
150981
151065
  const channels = (params.geometry.asLUT).lut.auxChannels;
150982
151066
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== channels);
150983
- channels.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_2__.TextureUnit.AuxChannelLUT);
151067
+ channels.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.AuxChannelLUT);
150984
151068
  });
150985
151069
  });
150986
151070
  vert.addUniform("u_animLUTParams", 4 /* Vec3 */, (prog) => {
@@ -151032,7 +151116,7 @@ function addAnimation(vert, isSurface, isThematic) {
151032
151116
  });
151033
151117
  // Normal and param
151034
151118
  if (isSurface) {
151035
- vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_3__.octDecodeNormal);
151119
+ vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_4__.octDecodeNormal);
151036
151120
  vert.addFunction(computeAnimationFrameNormal);
151037
151121
  vert.addFunction(computeAnimationNormal);
151038
151122
  vert.addFunction(computeAnimationFrameParam);
@@ -151046,7 +151130,7 @@ function addAnimation(vert, isSurface, isThematic) {
151046
151130
  uniform.setUniform3fv(animParams);
151047
151131
  });
151048
151132
  });
151049
- if (isThematic === 0 /* No */) {
151133
+ if (isThematic === 0 /* No */ || _System__WEBPACK_IMPORTED_MODULE_2__.System.instance.capabilities.isWebGL2) {
151050
151134
  vert.addUniform("u_animScalarParams", 4 /* Vec3 */, (prog) => {
151051
151135
  prog.addGraphicUniform("u_animScalarParams", (uniform, params) => {
151052
151136
  const scalars = getScalarChannel(params);
@@ -151691,7 +151775,8 @@ function createCombineTexturesProgram(context) {
151691
151775
  "use strict";
151692
151776
  __webpack_require__.r(__webpack_exports__);
151693
151777
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
151694
- /* harmony export */ "addChooseWithBitFlagFunctions": () => (/* binding */ addChooseWithBitFlagFunctions),
151778
+ /* harmony export */ "addChooseVec2WithBitFlagsFunction": () => (/* binding */ addChooseVec2WithBitFlagsFunction),
151779
+ /* harmony export */ "addChooseVec3WithBitFlagFunction": () => (/* binding */ addChooseVec3WithBitFlagFunction),
151695
151780
  /* harmony export */ "addExtractNthBit": () => (/* binding */ addExtractNthBit),
151696
151781
  /* harmony export */ "addEyeSpace": () => (/* binding */ addEyeSpace),
151697
151782
  /* harmony export */ "addFrustum": () => (/* binding */ addFrustum),
@@ -151711,17 +151796,18 @@ __webpack_require__.r(__webpack_exports__);
151711
151796
 
151712
151797
 
151713
151798
 
151714
- const chooseFloatWithBitFlag = `
151715
- float chooseFloatWithBitFlag(float f1, float f2, float flags, float n) { return nthBitSet(flags, n) ? f2 : f1; }
151716
- `;
151717
- const chooseFloatWithBitFlag2 = `
151718
- float chooseFloatWithBitFlag(float f1, float f2, uint flags, uint n) { return 0u != (flags & n) ? f2 : f1; }
151799
+ // These are not used anywhere currently, but will leave them here commented out in case we want them later.
151800
+ // const chooseFloatWithBitFlag = `
151801
+ // float chooseFloatWithBitFlag(float f1, float f2, float flags, float n) { return nthBitSet(flags, n) ? f2 : f1; }
151802
+ // `;
151803
+ // const chooseFloatWithBitFlag2 = `
151804
+ // float chooseFloatWithBitFlag(float f1, float f2, uint flags, uint n) { return 0u != (flags & n) ? f2 : f1; }
151805
+ // `;
151806
+ const chooseVec2With2BitFlags = `
151807
+ vec2 chooseVec2With2BitFlags(vec2 v1, vec2 v2, float flags, float n1, float n2) { return (nthBitSet(flags, n1) || nthBitSet(flags, n2)) ? v2 : v1; }
151719
151808
  `;
151720
- const chooseVec2WithBitFlag = `
151721
- vec2 chooseVec2WithBitFlag(vec2 v1, vec2 v2, float flags, float n) { return nthBitSet(flags, n) ? v2 : v1; }
151722
- `;
151723
- const chooseVec2WithBitFlag2 = `
151724
- vec2 chooseVec2WithBitFlag(vec2 v1, vec2 v2, uint flags, uint n) { return 0u != (flags & n) ? v2 : v1; }
151809
+ const chooseVec2With2BitFlags2 = `
151810
+ vec2 chooseVec2With2BitFlags(vec2 v1, vec2 v2, uint flags, uint n1, uint n2) { return 0u != (flags & (n1 | n2)) ? v2 : v1; }
151725
151811
  `;
151726
151812
  const chooseVec3WithBitFlag = `
151727
151813
  vec3 chooseVec3WithBitFlag(vec3 v1, vec3 v2, float flags, float n) { return nthBitSet(flags, n) ? v2 : v1; }
@@ -151730,41 +151816,34 @@ const chooseVec3WithBitFlag2 = `
151730
151816
  vec3 chooseVec3WithBitFlag(vec3 v1, vec3 v2, uint flags, uint n) { return 0u != (flags & n) ? v2 : v1; }
151731
151817
  `;
151732
151818
  /** @internal */
151733
- function addChooseWithBitFlagFunctions(shader) {
151819
+ function addChooseVec2WithBitFlagsFunction(shader) {
151734
151820
  if (_System__WEBPACK_IMPORTED_MODULE_1__.System.instance.capabilities.isWebGL2) {
151735
151821
  shader.addFunction(extractNthBit2);
151736
- shader.addFunction(chooseFloatWithBitFlag2);
151737
- shader.addFunction(chooseVec2WithBitFlag2);
151738
- shader.addFunction(chooseVec3WithBitFlag2);
151822
+ shader.addFunction(chooseVec2With2BitFlags2);
151739
151823
  }
151740
151824
  else {
151741
151825
  shader.addFunction(nthBitSet);
151742
- shader.addFunction(chooseFloatWithBitFlag);
151743
- shader.addFunction(chooseVec2WithBitFlag);
151744
- shader.addFunction(chooseVec3WithBitFlag);
151826
+ shader.addFunction(chooseVec2With2BitFlags);
151745
151827
  }
151746
151828
  }
151747
- function addShaderFlagsLookup(shader) {
151748
- shader.addConstant("kShaderBit_Monochrome", 1 /* Int */, "0");
151749
- shader.addConstant("kShaderBit_NonUniformColor", 1 /* Int */, "1");
151750
- shader.addConstant("kShaderBit_OITFlatAlphaWeight", 1 /* Int */, "2");
151751
- shader.addConstant("kShaderBit_OITScaleOutput", 1 /* Int */, "3");
151752
- shader.addConstant("kShaderBit_IgnoreNonLocatable", 1 /* Int */, "4");
151753
- addChooseWithBitFlagFunctions(shader);
151829
+ /** @internal */
151830
+ function addChooseVec3WithBitFlagFunction(shader) {
151754
151831
  if (_System__WEBPACK_IMPORTED_MODULE_1__.System.instance.capabilities.isWebGL2) {
151755
151832
  shader.addFunction(extractNthBit2);
151756
- shader.addFunction(chooseFloatWithBitFlag2);
151757
- shader.addFunction(chooseVec2WithBitFlag2);
151758
151833
  shader.addFunction(chooseVec3WithBitFlag2);
151759
151834
  }
151760
151835
  else {
151761
151836
  shader.addFunction(nthBitSet);
151762
- shader.addFunction(extractNthBit);
151763
- shader.addFunction(chooseFloatWithBitFlag);
151764
- shader.addFunction(chooseVec2WithBitFlag);
151765
151837
  shader.addFunction(chooseVec3WithBitFlag);
151766
151838
  }
151767
151839
  }
151840
+ function addShaderFlagsConstants(shader) {
151841
+ shader.addConstant("kShaderBit_Monochrome", 1 /* Int */, "0");
151842
+ shader.addConstant("kShaderBit_NonUniformColor", 1 /* Int */, "1");
151843
+ shader.addConstant("kShaderBit_OITFlatAlphaWeight", 1 /* Int */, "2");
151844
+ shader.addConstant("kShaderBit_OITScaleOutput", 1 /* Int */, "3");
151845
+ shader.addConstant("kShaderBit_IgnoreNonLocatable", 1 /* Int */, "4");
151846
+ }
151768
151847
  const shaderFlagArray = new Int32Array(5);
151769
151848
  const kShaderBitMonochrome = 0;
151770
151849
  const kShaderBitNonUniformColor = 1;
@@ -151811,8 +151890,8 @@ function setShaderFlags(uniform, params) {
151811
151890
  }
151812
151891
  /** @internal */
151813
151892
  function addShaderFlags(builder) {
151814
- addShaderFlagsLookup(builder.vert);
151815
- addShaderFlagsLookup(builder.frag);
151893
+ addShaderFlagsConstants(builder.vert);
151894
+ addShaderFlagsConstants(builder.frag);
151816
151895
  builder.addUniformArray("u_shaderFlags", 0 /* Boolean */, 5, (prog) => {
151817
151896
  prog.addGraphicUniform("u_shaderFlags", (uniform, params) => setShaderFlags(uniform, params));
151818
151897
  });
@@ -154058,8 +154137,6 @@ const applyLighting = `
154058
154137
 
154059
154138
  // Extract surface properties
154060
154139
  vec3 rgb = baseColor.rgb;
154061
- vec3 normal = normalize(v_n.xyz);
154062
- normal *= 2.0 * float(gl_FrontFacing) - 1.0;
154063
154140
  vec3 toEye = kFrustumType_Perspective == u_frustum.z ? normalize(v_eyeSpace.xyz) : vec3(0.0, 0.0, -1.0);
154064
154141
 
154065
154142
  // Extract material properties
@@ -154076,8 +154153,8 @@ const applyLighting = `
154076
154153
 
154077
154154
  float directionalDiffuseIntensity = 0.0;
154078
154155
  float directionalSpecularIntensity = 0.0;
154079
- computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, normal, toEye, u_sunDir, sunIntensity, specularExponent);
154080
- computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, normal ,toEye, portraitDir, portraitIntensity, specularExponent);
154156
+ computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, g_normal, toEye, u_sunDir, sunIntensity, specularExponent);
154157
+ computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, g_normal ,toEye, portraitDir, portraitIntensity, specularExponent);
154081
154158
 
154082
154159
  const float directionalFudge = 0.92; // leftover from old lighting implementation
154083
154160
  vec3 diffuseAccum = directionalDiffuseIntensity * diffuseWeight * rgb * directionalFudge; // directional light is white.
@@ -154097,18 +154174,18 @@ const applyLighting = `
154097
154174
  float hemiIntensity = u_lightSettings[11];
154098
154175
 
154099
154176
  // diffuse
154100
- float hemiDot = dot(normal, u_upVector);
154177
+ float hemiDot = dot(g_normal, u_upVector);
154101
154178
  float hemiDiffuseWeight = 0.5 * hemiDot + 0.5;
154102
154179
  vec3 hemiColor = mix(ground, sky, hemiDiffuseWeight);
154103
154180
  diffuseAccum += hemiIntensity * hemiColor * rgb;
154104
154181
 
154105
154182
  // sky specular
154106
- vec3 reflectSky = normalize(reflect(u_upVector, normal));
154183
+ vec3 reflectSky = normalize(reflect(u_upVector, g_normal));
154107
154184
  float skyDot = max(dot(reflectSky, toEye), 0.0001);
154108
154185
  float hemiSpecWeight = hemiIntensity * pow(skyDot, specularExponent);
154109
154186
 
154110
154187
  // ground specular
154111
- vec3 reflectGround = normalize(reflect(-u_upVector, normal));
154188
+ vec3 reflectGround = normalize(reflect(-u_upVector, g_normal));
154112
154189
  float groundDot = max(dot(reflectGround, toEye), 0.0001);
154113
154190
  hemiSpecWeight += hemiIntensity * pow(groundDot, specularExponent);
154114
154191
 
@@ -154119,7 +154196,7 @@ const applyLighting = `
154119
154196
  // Apply fresnel reflection.
154120
154197
  float fresnelIntensity = u_lightSettings[15];
154121
154198
  if (0.0 != fresnelIntensity) {
154122
- float fresnel = -dot(toEye, normal);
154199
+ float fresnel = -dot(toEye, g_normal);
154123
154200
  if (fresnelIntensity < 0.0) {
154124
154201
  fresnelIntensity = abs(fresnelIntensity);
154125
154202
  fresnel = 1.0 - fresnel;
@@ -154989,7 +155066,7 @@ function createPointCloudBuilder(classified, featureMode, thematic) {
154989
155066
  }
154990
155067
  if (1 /* Yes */ === thematic) {
154991
155068
  (0,_Thematic__WEBPACK_IMPORTED_MODULE_7__.addThematicDisplay)(builder, true);
154992
- (0,_Surface__WEBPACK_IMPORTED_MODULE_8__.addTexture)(builder, 0 /* No */, 1 /* Yes */, true);
155069
+ (0,_Surface__WEBPACK_IMPORTED_MODULE_8__.addTexture)(builder, 0 /* No */, 1 /* Yes */, true, false);
154993
155070
  }
154994
155071
  return builder;
154995
155072
  }
@@ -155456,7 +155533,8 @@ __webpack_require__.r(__webpack_exports__);
155456
155533
  /* harmony export */ "addColorOverrideMix": () => (/* binding */ addColorOverrideMix),
155457
155534
  /* harmony export */ "createClassifierRealityMeshHiliter": () => (/* binding */ createClassifierRealityMeshHiliter),
155458
155535
  /* harmony export */ "createRealityMeshBuilder": () => (/* binding */ createRealityMeshBuilder),
155459
- /* harmony export */ "createRealityMeshHiliter": () => (/* binding */ createRealityMeshHiliter)
155536
+ /* harmony export */ "createRealityMeshHiliter": () => (/* binding */ createRealityMeshHiliter),
155537
+ /* harmony export */ "finalizeNormal": () => (/* binding */ finalizeNormal)
155460
155538
  /* harmony export */ });
155461
155539
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
155462
155540
  /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
@@ -155509,6 +155587,9 @@ const computeNormal = `
155509
155587
  g_hillshadeIndex = normal.z; // save off world Z for thematic hill shade mode index
155510
155588
  return normalize(u_worldToViewN * normal);
155511
155589
  `;
155590
+ const finalizeNormal = `
155591
+ return normalize(v_n) * (2.0 * float(gl_FrontFacing) - 1.0);
155592
+ `;
155512
155593
  const testInside = `
155513
155594
  bool testInside(float x0, float y0, float x1, float y1, float x, float y) {
155514
155595
  vec2 perp = vec2(y0 - y1, x1 - x0), test = vec2(x - x0, y - y0);
@@ -155683,6 +155764,8 @@ function addThematicToRealityMesh(builder, gradientTextureUnit) {
155683
155764
  builder.vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_15__.octDecodeNormal);
155684
155765
  builder.vert.addGlobal("g_hillshadeIndex", 2 /* Float */);
155685
155766
  builder.addFunctionComputedVarying("v_n", 4 /* Vec3 */, "computeLightingNormal", computeNormal);
155767
+ builder.frag.addGlobal("g_normal", 4 /* Vec3 */);
155768
+ builder.frag.set(21 /* FinalizeNormal */, finalizeNormal);
155686
155769
  (0,_Thematic__WEBPACK_IMPORTED_MODULE_16__.addThematicDisplay)(builder, false, true);
155687
155770
  builder.addInlineComputedVarying("v_thematicIndex", 2 /* Float */, (0,_Thematic__WEBPACK_IMPORTED_MODULE_16__.getComputeThematicIndex)(builder.vert.usesInstancedGeometry, false, false));
155688
155771
  builder.vert.addUniform("u_worldToViewN", 6 /* Mat3 */, (prog) => {
@@ -156321,10 +156404,7 @@ float shadowMapEVSM(vec3 shadowPos) {
156321
156404
  const applySolarShadowMap = `
156322
156405
  if (v_shadowPos.x < 0.0 || v_shadowPos.x > 1.0 || v_shadowPos.y < 0.0 || v_shadowPos.y > 1.0 || v_shadowPos.z < 0.0 || v_shadowPos.z > 1.0)
156323
156406
  return baseColor;
156324
- vec3 toEye = kFrustumType_Perspective == u_frustum.z ? normalize(v_eyeSpace) : vec3(0.0, 0.0, -1.0);
156325
- vec3 normal = normalize(v_n);
156326
- normal = (dot(normal, toEye) > 0.0) ? -normal : normal;
156327
- float visible = (u_surfaceFlags[kSurfaceBitIndex_HasNormals] && (dot(normal, u_sunDir) < 0.0)) ? 0.0 : shadowMapEVSM(v_shadowPos);
156407
+ float visible = (u_surfaceFlags[kSurfaceBitIndex_HasNormals] && (dot(g_normal, u_sunDir) < 0.0)) ? 0.0 : shadowMapEVSM(v_shadowPos);
156328
156408
  return vec4(baseColor.rgb * mix(u_shadowParams.rgb, vec3(1.0), visible), baseColor.a);
156329
156409
  `;
156330
156410
  const applySolarShadowMapTerrain = `
@@ -156558,7 +156638,7 @@ function addMaterial(builder, instanced) {
156558
156638
  (0,_Decode__WEBPACK_IMPORTED_MODULE_10__.addUnpackAndNormalize2Bytes)(frag);
156559
156639
  frag.addFunction(decodeFragMaterialParams);
156560
156640
  frag.addInitializer("decodeMaterialParams(v_materialParams);");
156561
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(frag);
156641
+ (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseVec3WithBitFlagFunction)(frag);
156562
156642
  frag.set(2 /* ApplyMaterialOverrides */, applyTextureWeight);
156563
156643
  const vert = builder.vert;
156564
156644
  vert.addGlobal("mat_rgb", 5 /* Vec4 */); // a = 0 if not overridden, else 1
@@ -156647,7 +156727,7 @@ function createCommon(isInstanced, animated, shadowable, isThematic, isHiliter,
156647
156727
  function createSurfaceHiliter(instanced, classified, posType) {
156648
156728
  const builder = createCommon(instanced, 0 /* No */, 0 /* No */, 0 /* No */, true, posType);
156649
156729
  addSurfaceFlags(builder, true, false);
156650
- addTexture(builder, 0 /* No */, 0 /* No */);
156730
+ addTexture(builder, 0 /* No */, 0 /* No */, false, true);
156651
156731
  if (classified) {
156652
156732
  (0,_PlanarClassification__WEBPACK_IMPORTED_MODULE_15__.addHilitePlanarClassifier)(builder);
156653
156733
  builder.vert.addGlobal("feature_ignore_material", 0 /* Boolean */, "false");
@@ -156681,12 +156761,14 @@ function addSurfaceFlagsLookup(builder) {
156681
156761
  builder.addBitFlagConstant("kSurfaceBit_HasTexture", 0 /* HasTexture */);
156682
156762
  builder.addBitFlagConstant("kSurfaceBit_IgnoreMaterial", 3 /* IgnoreMaterial */);
156683
156763
  builder.addBitFlagConstant("kSurfaceBit_OverrideRgb", 7 /* OverrideRgb */);
156764
+ builder.addBitFlagConstant("kSurfaceBit_HasNormalMap", 8 /* HasNormalMap */);
156684
156765
  // Only need masks for flags modified in vertex shader
156685
156766
  const suffix = _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 ? "u" : ".0";
156686
156767
  const type = _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 ? 10 /* Uint */ : 2 /* Float */;
156687
156768
  builder.addConstant("kSurfaceMask_HasTexture", type, 1 /* HasTexture */.toString() + suffix);
156688
156769
  builder.addConstant("kSurfaceMask_IgnoreMaterial", type, 8 /* IgnoreMaterial */.toString() + suffix);
156689
156770
  builder.addConstant("kSurfaceMask_OverrideRgb", type, 128 /* OverrideRgb */.toString() + suffix);
156771
+ builder.addConstant("kSurfaceMask_HasNormalMap", type, 256 /* HasNormalMap */.toString() + suffix);
156690
156772
  (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addExtractNthBit)(builder);
156691
156773
  if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
156692
156774
  builder.addFunction(isSurfaceBitSet2);
@@ -156701,19 +156783,20 @@ const initSurfaceFlags = `
156701
156783
  surfaceFlags = u_surfaceFlags[kSurfaceBitIndex_HasTexture] ? kSurfaceMask_HasTexture : 0.0;
156702
156784
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_IgnoreMaterial] ? kSurfaceMask_IgnoreMaterial : 0.0;
156703
156785
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_OverrideRgb] ? kSurfaceMask_OverrideRgb : 0.0;
156786
+ surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_HasNormalMap] ? kSurfaceMask_HasNormalMap : 0.0;
156704
156787
  `;
156705
156788
  const initSurfaceFlags2 = `
156706
156789
  surfaceFlags = u_surfaceFlags[kSurfaceBitIndex_HasTexture] ? kSurfaceMask_HasTexture : 0u;
156707
156790
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_IgnoreMaterial] ? kSurfaceMask_IgnoreMaterial : 0u;
156708
156791
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_OverrideRgb] ? kSurfaceMask_OverrideRgb : 0u;
156792
+ surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_HasNormalMap] ? kSurfaceMask_HasNormalMap : 0u;
156709
156793
  `;
156710
156794
  const computeBaseSurfaceFlags = `
156711
- bool hasTexture = u_surfaceFlags[kSurfaceBitIndex_HasTexture];
156712
156795
  if (feature_ignore_material) {
156713
- if (hasTexture) {
156714
- hasTexture = false;
156796
+ if (u_surfaceFlags[kSurfaceBitIndex_HasTexture])
156715
156797
  surfaceFlags -= kSurfaceMask_HasTexture;
156716
- }
156798
+ if (u_surfaceFlags[kSurfaceBitIndex_HasNormalMap])
156799
+ surfaceFlags -= kSurfaceMask_HasNormalMap;
156717
156800
 
156718
156801
  surfaceFlags += kSurfaceMask_IgnoreMaterial;
156719
156802
  }
@@ -156751,6 +156834,39 @@ function getComputeNormal(quantized) {
156751
156834
  return normalize(MAT_NORM * octDecodeNormal(normal));
156752
156835
  `;
156753
156836
  }
156837
+ const finalizeNormalPrelude = `
156838
+ vec3 normal = normalize(v_n) * (2.0 * float(gl_FrontFacing) - 1.0);
156839
+ `;
156840
+ const finalizeNormalNormalMap = `
156841
+ if (isSurfaceBitSet(kSurfaceBit_HasNormalMap)) {
156842
+ // Modify the normal with the normal map texture.
156843
+ // First calculate the tangent.
156844
+ vec3 dp1 = dFdx(v_eyeSpace);
156845
+ vec3 dp2 = dFdy(v_eyeSpace);
156846
+ vec2 duv1 = dFdx(v_texCoord);
156847
+ vec2 duv2 = dFdy(v_texCoord);
156848
+ vec3 tangent = normalize(duv2.y * dp1 - duv1.y * dp2);
156849
+ tangent = normalize (tangent - normal * dot (normal, tangent)); // re-orthogonalize with normal
156850
+ bool flip = (duv1.x * duv2.y - duv2.x * duv1.y) < 0.0;
156851
+ if (flip)
156852
+ tangent = -tangent;
156853
+ vec3 biTangent = cross (normal, tangent);
156854
+ if (flip)
156855
+ biTangent = -biTangent;
156856
+ vec3 normM = TEXTURE(s_normalMap, v_texCoord).xyz;
156857
+ if (length (normM) > 0.0001) { // check for empty normal texture
156858
+ normM = (normM - 0.5) * 2.0;
156859
+ normM = normalize (normM);
156860
+ normM.x *= abs(u_normalMapScale);
156861
+ normM.y *= u_normalMapScale;
156862
+ normM = normalize (normM);
156863
+ normal = normalize (normM.x * tangent + normM.y * biTangent + normM.z * normal);
156864
+ }
156865
+ }
156866
+ `;
156867
+ const finalizeNormalPostlude = `
156868
+ return normal;
156869
+ `;
156754
156870
  function getComputeAnimatedNormal(quantized) {
156755
156871
  return `
156756
156872
  if (u_animNormalParams.x >= 0.0)
@@ -156766,7 +156882,7 @@ function getComputeTexCoord(quantized) {
156766
156882
  return `
156767
156883
  vec4 rgba = ${vertData};
156768
156884
  vec2 qcoords = vec2(decodeUInt16(rgba.xy), decodeUInt16(rgba.zw));
156769
- return chooseVec2WithBitFlag(vec2(0.0), unquantize2d(qcoords, u_qTexCoordParams), surfaceFlags, kSurfaceBit_HasTexture);
156885
+ return chooseVec2With2BitFlags(vec2(0.0), unquantize2d(qcoords, u_qTexCoordParams), surfaceFlags, kSurfaceBit_HasTexture, kSurfaceBit_HasNormalMap);
156770
156886
  `;
156771
156887
  }
156772
156888
  function getComputeAnimatedTexCoord(quantized) {
@@ -156828,9 +156944,29 @@ function addNormal(builder, instanced, animated) {
156828
156944
  (0,_Vertex__WEBPACK_IMPORTED_MODULE_20__.addNormalMatrix)(builder.vert, instanced);
156829
156945
  const quantized = "quantized" === builder.vert.positionType;
156830
156946
  builder.vert.addFunction(octDecodeNormal);
156831
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.vert);
156832
156947
  builder.vert.addFunction("vec3 computeSurfaceNormal()", getComputeNormal(quantized));
156833
156948
  builder.addFunctionComputedVarying("v_n", 4 /* Vec3 */, "computeLightingNormal", animated ? getComputeAnimatedNormal(quantized) : "return computeSurfaceNormal();");
156949
+ builder.frag.addGlobal("g_normal", 4 /* Vec3 */);
156950
+ let finalizeNormal = finalizeNormalPrelude;
156951
+ if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
156952
+ finalizeNormal += finalizeNormalNormalMap;
156953
+ builder.frag.addUniform("u_normalMapScale", 2 /* Float */, (prog) => {
156954
+ prog.addGraphicUniform("u_normalMapScale", (uniform, params) => {
156955
+ var _a;
156956
+ let normalMapScale = 1.0;
156957
+ if (undefined !== params.geometry.materialInfo && !params.geometry.materialInfo.isAtlas &&
156958
+ undefined !== params.geometry.materialInfo.textureMapping &&
156959
+ undefined !== params.geometry.materialInfo.textureMapping.normalMapParams) {
156960
+ normalMapScale = (_a = params.geometry.materialInfo.textureMapping.normalMapParams.scale) !== null && _a !== void 0 ? _a : 1.0;
156961
+ if (!params.geometry.materialInfo.textureMapping.normalMapParams.greenDown)
156962
+ normalMapScale = -normalMapScale;
156963
+ }
156964
+ uniform.setUniform1f(normalMapScale);
156965
+ });
156966
+ });
156967
+ }
156968
+ finalizeNormal += finalizeNormalPostlude;
156969
+ builder.frag.set(21 /* FinalizeNormal */, finalizeNormal);
156834
156970
  // Set to true to colorize surfaces based on normals (in world space).
156835
156971
  // You must also set checkMaxVarying to false in ProgramBuilder.buildProgram to avoid assertions, if using a non-optimized build.
156836
156972
  const debugNormals = false;
@@ -156840,19 +156976,21 @@ function addNormal(builder, instanced, animated) {
156840
156976
  }
156841
156977
  }
156842
156978
  /** @internal */
156843
- function addTexture(builder, animated, isThematic, isPointCloud = false) {
156979
+ function addTexture(builder, animated, isThematic, isPointCloud, isHilite) {
156844
156980
  if (isThematic) {
156845
156981
  builder.addInlineComputedVarying("v_thematicIndex", 2 /* Float */, (0,_Thematic__WEBPACK_IMPORTED_MODULE_18__.getComputeThematicIndex)(builder.vert.usesInstancedGeometry, isPointCloud, true));
156846
156982
  }
156847
- else {
156983
+ // Point clouds do not need to compute texture coordinates since the only texture they use is the thematic gradient.
156984
+ // Surfaces now need texture coordinates even for thematic in case they have a normal map (except for webgl1 which does not have normal maps).
156985
+ if (!isPointCloud && (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 || !isThematic)) {
156848
156986
  builder.vert.addFunction(_Decode__WEBPACK_IMPORTED_MODULE_10__.unquantize2d);
156849
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.vert);
156987
+ (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseVec2WithBitFlagsFunction)(builder.vert);
156850
156988
  const quantized = "quantized" === builder.vert.positionType;
156851
156989
  builder.addFunctionComputedVarying("v_texCoord", 3 /* Vec2 */, "computeTexCoord", animated ? getComputeAnimatedTexCoord(quantized) : getComputeTexCoord(quantized));
156852
156990
  builder.vert.addUniform("u_qTexCoordParams", 5 /* Vec4 */, (prog) => {
156853
156991
  prog.addGraphicUniform("u_qTexCoordParams", (uniform, params) => {
156854
156992
  const surfGeom = params.geometry.asSurface;
156855
- if (surfGeom.useTexture(params.programParams)) {
156993
+ if (surfGeom.useTexture(params.programParams) || (surfGeom.useNormalMap(params.programParams) && !isPointCloud)) {
156856
156994
  const uvQParams = surfGeom.lut.uvQParams;
156857
156995
  if (undefined !== uvQParams) {
156858
156996
  uniform.setUniform4fv(uvQParams);
@@ -156878,6 +157016,21 @@ function addTexture(builder, animated, isThematic, isPointCloud = false) {
156878
157016
  }
156879
157017
  });
156880
157018
  });
157019
+ if (!isHilite && !isPointCloud && _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
157020
+ builder.frag.addUniform("s_normalMap", 8 /* Sampler2D */, (prog) => {
157021
+ prog.addGraphicUniform("s_normalMap", (uniform, params) => {
157022
+ const surfGeom = params.geometry.asSurface;
157023
+ if (surfGeom.useNormalMap(params.programParams)) {
157024
+ const normalMap = surfGeom.normalMap;
157025
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== normalMap);
157026
+ normalMap.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.NormalMap);
157027
+ }
157028
+ else {
157029
+ _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.ensureSamplerBound(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.NormalMap);
157030
+ }
157031
+ });
157032
+ });
157033
+ }
156881
157034
  }
156882
157035
  const discardClassifiedByAlpha = `
156883
157036
  if (u_no_classifier_discard)
@@ -156931,14 +157084,13 @@ function createSurfaceBuilder(flags) {
156931
157084
  (0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addSurfaceDiscard)(builder, flags);
156932
157085
  addNormal(builder, flags.isInstanced, flags.isAnimated);
156933
157086
  // In HiddenLine mode, we must compute the base color (plus feature overrides etc) in order to get the alpha, then replace with background color (preserving alpha for the transparency threshold test).
156934
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.frag);
156935
157087
  builder.frag.set(3 /* FinalizeBaseColor */, applyBackgroundColor);
156936
157088
  builder.frag.addUniform("u_bgColor", 4 /* Vec3 */, (prog) => {
156937
157089
  prog.addProgramUniform("u_bgColor", (uniform, params) => {
156938
157090
  params.target.uniforms.style.bindBackgroundRgb(uniform);
156939
157091
  });
156940
157092
  });
156941
- addTexture(builder, flags.isAnimated, flags.isThematic);
157093
+ addTexture(builder, flags.isAnimated, flags.isThematic, false, false);
156942
157094
  builder.frag.addUniform("u_applyGlyphTex", 0 /* Boolean */, (prog) => {
156943
157095
  prog.addGraphicUniform("u_applyGlyphTex", (uniform, params) => {
156944
157096
  const surfGeom = params.geometry.asSurface;
@@ -157083,7 +157235,7 @@ vec3 getIsoLineColor(float ndx, float stepCount) {
157083
157235
  const fwidthWhenAvailable = `\nfloat _universal_fwidth(float coord) { return fwidth(coord); }\n`;
157084
157236
  const fwidthWhenNotAvailable = `\nfloat _universal_fwidth(float coord) { return coord; }\n`; // ###TODO: can we do something reasonable in this case?
157085
157237
  const slopeAndHillShadeShader = ` else if (kThematicDisplayMode_Slope == u_thematicDisplayMode) {
157086
- float d = dot(v_n, u_thematicAxis);
157238
+ float d = dot(g_normal, u_thematicAxis);
157087
157239
  if (d < 0.0)
157088
157240
  d = -d;
157089
157241
 
@@ -157101,11 +157253,7 @@ const slopeAndHillShadeShader = ` else if (kThematicDisplayMode_Slope == u_thema
157101
157253
 
157102
157254
  ndx = d;
157103
157255
  } else if (kThematicDisplayMode_HillShade == u_thematicDisplayMode) {
157104
- float d = dot(v_n, u_thematicSunDirection);
157105
-
157106
- // In the case of HillShade, v_thematicIndex contains the normal's z in world space.
157107
- if (!gl_FrontFacing && v_thematicIndex < 0.0)
157108
- d = -d;
157256
+ float d = dot(g_normal, u_thematicSunDirection);
157109
157257
 
157110
157258
  ndx = max(0.0, d);
157111
157259
  }`;
@@ -160073,23 +160221,23 @@ class GltfReader {
160073
160221
  return undefined !== view ? view.toBufferData(type) : undefined;
160074
160222
  }
160075
160223
  readFeatureIndices(_json) { return undefined; }
160224
+ extractId(value) {
160225
+ switch (typeof value) {
160226
+ case "string":
160227
+ return value;
160228
+ case "number":
160229
+ return value.toString();
160230
+ default:
160231
+ return undefined;
160232
+ }
160233
+ }
160076
160234
  extractTextureId(material) {
160077
160235
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
160078
160236
  if (typeof material !== "object")
160079
160237
  return undefined;
160080
- const extractId = (value) => {
160081
- switch (typeof value) {
160082
- case "string":
160083
- return value;
160084
- case "number":
160085
- return value.toString();
160086
- default:
160087
- return undefined;
160088
- }
160089
- };
160090
160238
  // Bimium's shader value...almost certainly obsolete at this point.
160091
160239
  if (isGltf1Material(material))
160092
- return (_a = material.diffuse) !== null && _a !== void 0 ? _a : extractId((_b = material.values) === null || _b === void 0 ? void 0 : _b.tex);
160240
+ return (_a = material.diffuse) !== null && _a !== void 0 ? _a : this.extractId((_b = material.values) === null || _b === void 0 ? void 0 : _b.tex);
160093
160241
  // KHR_techniques_webgl extension
160094
160242
  const techniques = (_d = (_c = this._glTF.extensions) === null || _c === void 0 ? void 0 : _c.KHR_techniques_webgl) === null || _d === void 0 ? void 0 : _d.techniques;
160095
160243
  const ext = Array.isArray(techniques) ? (_e = material.extensions) === null || _e === void 0 ? void 0 : _e.KHR_techniques_webgl : undefined;
@@ -160099,12 +160247,20 @@ class GltfReader {
160099
160247
  for (const uniformName of Object.keys(uniforms)) {
160100
160248
  const uniform = uniforms[uniformName];
160101
160249
  if (typeof uniform === "object" && uniform.type === GltfDataType.Sampler2d)
160102
- return extractId((_f = ext.values[uniformName]) === null || _f === void 0 ? void 0 : _f.index);
160250
+ return this.extractId((_f = ext.values[uniformName]) === null || _f === void 0 ? void 0 : _f.index);
160103
160251
  }
160104
160252
  }
160105
160253
  }
160106
- const id = extractId((_h = (_g = material.pbrMetallicRoughness) === null || _g === void 0 ? void 0 : _g.baseColorTexture) === null || _h === void 0 ? void 0 : _h.index);
160107
- return id !== null && id !== void 0 ? id : extractId((_j = material.emissiveTexture) === null || _j === void 0 ? void 0 : _j.index);
160254
+ const id = this.extractId((_h = (_g = material.pbrMetallicRoughness) === null || _g === void 0 ? void 0 : _g.baseColorTexture) === null || _h === void 0 ? void 0 : _h.index);
160255
+ return id !== null && id !== void 0 ? id : this.extractId((_j = material.emissiveTexture) === null || _j === void 0 ? void 0 : _j.index);
160256
+ }
160257
+ extractNormalMapId(material) {
160258
+ var _a;
160259
+ if (typeof material !== "object")
160260
+ return undefined;
160261
+ if (isGltf1Material(material))
160262
+ return undefined;
160263
+ return this.extractId((_a = material.normalTexture) === null || _a === void 0 ? void 0 : _a.index);
160108
160264
  }
160109
160265
  isMaterialTransparent(material) {
160110
160266
  var _a, _b;
@@ -160125,9 +160281,15 @@ class GltfReader {
160125
160281
  createDisplayParams(material, hasBakedLighting) {
160126
160282
  const isTransparent = this.isMaterialTransparent(material);
160127
160283
  const textureId = this.extractTextureId(material);
160128
- const textureMapping = undefined !== textureId ? this.findTextureMapping(textureId, isTransparent) : undefined;
160284
+ const normalMapId = this.extractNormalMapId(material);
160285
+ const textureMapping = (undefined !== textureId || undefined !== normalMapId) ? this.findTextureMapping(textureId, isTransparent, normalMapId) : undefined;
160129
160286
  const color = colorFromMaterial(material, isTransparent);
160130
- return new _render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.Always, undefined, undefined, hasBakedLighting, textureMapping);
160287
+ let renderMaterial;
160288
+ if (undefined !== textureMapping && undefined !== textureMapping.normalMapParams) {
160289
+ const args = { diffuse: { color }, specular: { color: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white }, textureMapping };
160290
+ renderMaterial = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.renderSystem.createRenderMaterial(args);
160291
+ }
160292
+ return new _render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams(_render_primitives_DisplayParams__WEBPACK_IMPORTED_MODULE_8__.DisplayParams.Type.Mesh, color, color, 1, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.LinePixels.Solid, _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.FillFlags.Always, renderMaterial, undefined, hasBakedLighting, textureMapping);
160131
160293
  }
160132
160294
  readMeshPrimitives(node, featureTable, thisTransform, thisBias) {
160133
160295
  const meshes = [];
@@ -160704,11 +160866,38 @@ class GltfReader {
160704
160866
  });
160705
160867
  return renderTexture !== null && renderTexture !== void 0 ? renderTexture : false;
160706
160868
  }
160707
- findTextureMapping(id, isTransparent) {
160708
- let texture = this._resolvedTextures.get({ id, isTransparent });
160709
- if (undefined === texture)
160710
- this._resolvedTextures.set({ id, isTransparent }, texture = this.resolveTexture(id, isTransparent));
160711
- return texture ? new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params()) : undefined;
160869
+ findTextureMapping(id, isTransparent, normalMapId) {
160870
+ if (undefined === id && undefined === normalMapId)
160871
+ return undefined;
160872
+ let texture;
160873
+ if (undefined !== id) {
160874
+ texture = this._resolvedTextures.get({ id, isTransparent });
160875
+ if (undefined === texture)
160876
+ this._resolvedTextures.set({ id, isTransparent }, texture = this.resolveTexture(id, isTransparent));
160877
+ }
160878
+ let normalMap;
160879
+ if (undefined !== normalMapId) {
160880
+ normalMap = this._resolvedTextures.get({ id: normalMapId, isTransparent: false });
160881
+ if (undefined === normalMap)
160882
+ this._resolvedTextures.set({ id: normalMapId, isTransparent: false }, normalMap = this.resolveTexture(normalMapId, false));
160883
+ }
160884
+ let nMap;
160885
+ if (normalMap) {
160886
+ if (texture) {
160887
+ nMap = {
160888
+ normalMap,
160889
+ };
160890
+ }
160891
+ else {
160892
+ texture = normalMap;
160893
+ nMap = {};
160894
+ }
160895
+ }
160896
+ if (!texture)
160897
+ return undefined;
160898
+ const textureMapping = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params());
160899
+ textureMapping.normalMapParams = nMap;
160900
+ return textureMapping;
160712
160901
  }
160713
160902
  }
160714
160903
  /** Produce a [[RenderGraphic]] from a [glTF](https://www.khronos.org/gltf/) asset suitable for use in [view decorations]($docs/learning/frontend/ViewDecorations).
@@ -162080,6 +162269,7 @@ class ImdlReader {
162080
162269
  mapMode: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(paramsJson.mode),
162081
162270
  worldMapping: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asBool(paramsJson.worldMapping),
162082
162271
  };
162272
+ // TODO: Need to extract normal map properties from json once they're sent by the backend.
162083
162273
  return new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params(paramProps));
162084
162274
  }
162085
162275
  async loadNamedTextures() {
@@ -292498,7 +292688,7 @@ class TestContext {
292498
292688
  this.initializeRpcInterfaces({ title: this.settings.Backend.name, version: this.settings.Backend.version });
292499
292689
  const iModelClient = new imodels_client_management_1.IModelsClient({ api: { baseUrl: `https://${(_a = process.env.IMJS_URL_PREFIX) !== null && _a !== void 0 ? _a : ""}api.bentley.com/imodels` } });
292500
292690
  await core_frontend_1.NoRenderApp.startup({
292501
- applicationVersion: "3.5.0-dev.63",
292691
+ applicationVersion: "3.5.0-dev.65",
292502
292692
  applicationId: this.settings.gprid,
292503
292693
  authorizationClient: new frontend_1.TestFrontendAuthorizationClient(this.adminUserAccessToken),
292504
292694
  hubAccess: new imodels_access_frontend_1.FrontendIModelsAccess(iModelClient),
@@ -311621,7 +311811,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
311621
311811
  /***/ ((module) => {
311622
311812
 
311623
311813
  "use strict";
311624
- module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.63","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.5.0-dev.63","@itwin/core-bentley":"workspace:^3.5.0-dev.63","@itwin/core-common":"workspace:^3.5.0-dev.63","@itwin/core-geometry":"workspace:^3.5.0-dev.63","@itwin/core-orbitgt":"workspace:^3.5.0-dev.63","@itwin/core-quantity":"workspace:^3.5.0-dev.63","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.63"},"//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":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
311814
+ module.exports = JSON.parse('{"name":"@itwin/core-frontend","version":"3.5.0-dev.65","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","build:ci":"npm run -s build && npm run -s build:esm","build:cjs":"npm run -s copy:js:cjs && tsc 1>&2 --outDir lib/cjs","build:esm":"npm run -s copy:js:esm && tsc 1>&2 --module ES2020 --outDir lib/esm","clean":"rimraf lib .rush/temp/package-deps*.json","copy:public":"cpx \\"./src/public/**/*\\" ./lib/public","copy:js:cjs":"cpx \\"./src/**/*.js\\" ./lib/cjs","copy:js:esm":"cpx \\"./src/**/*.js\\" ./lib/esm","docs":"betools docs --includes=../../generated-docs/extract --json=../../generated-docs/core/core-frontend/file.json --tsIndexFile=./core-frontend.ts --onlyJson --excludes=webgl/**/*,**/primitives,**/map/*.d.ts,**/tile/*.d.ts,**/*-css.ts","extract-api":"betools extract-api --entry=core-frontend && npm run extract-extension-api","extract-extension-api":"eslint --no-eslintrc -c \\"../../tools/eslint-plugin/dist/configs/extension-exports-config.js\\" \\"./src/**/*.ts\\" 1>&2","lint":"eslint -f visualstudio \\"./src/**/*.ts\\" 1>&2","pseudolocalize":"betools pseudolocalize --englishDir ./src/public/locales/en --out ./public/locales/en-PSEUDO","test":"npm run -s webpackTests && certa -r chrome","cover":"npm -s test","test:debug":"certa -r chrome --debug","webpackTests":"webpack --config ./src/test/utils/webpack.config.js 1>&2"},"repository":{"type":"git","url":"https://github.com/iTwin/itwinjs-core/tree/master/core/frontend"},"keywords":["Bentley","BIM","iModel","digital-twin","iTwin"],"author":{"name":"Bentley Systems, Inc.","url":"http://www.bentley.com"},"peerDependencies":{"@itwin/appui-abstract":"workspace:^3.5.0-dev.65","@itwin/core-bentley":"workspace:^3.5.0-dev.65","@itwin/core-common":"workspace:^3.5.0-dev.65","@itwin/core-geometry":"workspace:^3.5.0-dev.65","@itwin/core-orbitgt":"workspace:^3.5.0-dev.65","@itwin/core-quantity":"workspace:^3.5.0-dev.65","@itwin/webgl-compatibility":"workspace:^3.5.0-dev.65"},"//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":"workspace:*","@itwin/webgl-compatibility":"workspace:*","@types/chai":"4.3.1","@types/chai-as-promised":"^7","@types/deep-assign":"^0.1.0","@types/lodash":"^4.14.0","@types/mocha":"^8.2.2","@types/node":"18.11.5","@types/qs":"^6.5.0","@types/semver":"7.3.10","@types/superagent":"^4.1.14","@types/sinon":"^9.0.0","babel-loader":"~8.2.5","babel-plugin-istanbul":"~6.1.1","chai":"^4.1.2","chai-as-promised":"^7","cpx2":"^3.0.0","eslint":"^7.11.0","glob":"^7.1.2","mocha":"^10.0.0","nyc":"^15.1.0","rimraf":"^3.0.2","sinon":"^9.0.2","source-map-loader":"^4.0.0","typescript":"~4.4.0","webpack":"^5.64.4"},"//dependencies":["NOTE: these dependencies should be only for things that DO NOT APPEAR IN THE API","NOTE: core-frontend should remain UI technology agnostic, so no react/angular dependencies are allowed"],"dependencies":{"@itwin/object-storage-azure":"~1.4.0","@itwin/cloud-agnostic-core":"~1.4.0","@itwin/object-storage-core":"~1.4.0","@itwin/core-i18n":"workspace:*","@itwin/core-telemetry":"workspace:*","@loaders.gl/core":"^3.1.6","@loaders.gl/draco":"^3.1.6","deep-assign":"^2.0.0","fuse.js":"^3.3.0","lodash":"^4.17.10","qs":"^6.5.1","semver":"^7.3.5","superagent":"7.1.3","wms-capabilities":"0.4.0","xml-js":"~1.6.11","reflect-metadata":"0.1.13"},"nyc":{"extends":"./node_modules/@itwin/build-tools/.nycrc"},"eslintConfig":{"plugins":["@itwin"],"extends":"plugin:@itwin/itwinjs-recommended","rules":{"@itwin/no-internal-barrel-imports":["error",{"required-barrel-modules":["./src/tile/internal.ts"]}],"@itwin/public-extension-exports":["error",{"releaseTags":["public","preview"],"outputApiFile":false}]},"overrides":[{"files":["*.test.ts","*.test.tsx","**/test/**/*.ts"],"rules":{"@itwin/no-internal-barrel-imports":"off"}}]}}');
311625
311815
 
311626
311816
  /***/ }),
311627
311817