@itwin/ecschema-rpcinterface-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.
@@ -63854,6 +63854,8 @@ var TypeOfChange;
63854
63854
  TypeOfChange[TypeOfChange["Indirect"] = 8] = "Indirect";
63855
63855
  /** Hidden properties of the element changed */
63856
63856
  TypeOfChange[TypeOfChange["Hidden"] = 16] = "Hidden";
63857
+ /** The top-most parent of the element has changed */
63858
+ TypeOfChange[TypeOfChange["Parent"] = 32] = "Parent";
63857
63859
  })(TypeOfChange || (TypeOfChange = {}));
63858
63860
 
63859
63861
 
@@ -78777,8 +78779,16 @@ class ViewDetails {
78777
78779
  return this._clipVector.isValid ? this._clipVector : undefined;
78778
78780
  }
78779
78781
  set clipVector(clip) {
78780
- if (!clip)
78781
- clip = _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.ClipVector.createEmpty();
78782
+ const curClip = this.clipVector;
78783
+ if (curClip === clip)
78784
+ return;
78785
+ if (!curClip) {
78786
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== clip);
78787
+ // An empty clip is equivalent to no clip.
78788
+ if (!clip.isValid)
78789
+ return;
78790
+ }
78791
+ clip = clip !== null && clip !== void 0 ? clip : _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.ClipVector.createEmpty();
78782
78792
  this.onClipVectorChanged.raiseEvent(clip.isValid ? clip : undefined);
78783
78793
  this._clipVector = clip;
78784
78794
  if (clip.isValid)
@@ -123463,6 +123473,7 @@ __webpack_require__.r(__webpack_exports__);
123463
123473
  /* harmony export */ "ViewPose3d": () => (/* binding */ ViewPose3d)
123464
123474
  /* harmony export */ });
123465
123475
  /* harmony import */ var _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-geometry */ "../../core/geometry/lib/esm/core-geometry.js");
123476
+ /* harmony import */ var _ViewState__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./ViewState */ "../../core/frontend/lib/esm/ViewState.js");
123466
123477
  /*---------------------------------------------------------------------------------------------
123467
123478
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
123468
123479
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -123471,8 +123482,10 @@ __webpack_require__.r(__webpack_exports__);
123471
123482
  * @module Views
123472
123483
  */
123473
123484
 
123474
- /** The "pose" for a view. This is either the volume or area, depending on whether the view is 3d or 2d,
123475
- * plus the camera position/angle, if it is enabled.
123485
+
123486
+ /** The "pose" for a [View]($docs/learning/frontend/views#viewstate-parameters) describing the viewed area or volume, depending upon whether
123487
+ * the view is 2d or 3d.
123488
+ * @see [[ViewState.savePose]] to extract a pose from a view and [[ViewState.applyPose]] to apply a pose to a view.
123476
123489
  * @note a ViewPose is immutable.
123477
123490
  * @public
123478
123491
  * @extensions
@@ -123481,15 +123494,22 @@ class ViewPose {
123481
123494
  constructor(cameraOn) {
123482
123495
  this.cameraOn = cameraOn;
123483
123496
  }
123497
+ /** Computes the center of the viewed volume. */
123484
123498
  get center() {
123485
123499
  const delta = this.rotation.multiplyTransposeVector(this.extents);
123486
123500
  return this.origin.plusScaled(delta, 0.5);
123487
123501
  }
123502
+ /** Returns the target point of the view. This is the same as [[center]] unless [[cameraOn]] is `true`. */
123488
123503
  get target() { return this.center; }
123504
+ /** Computes the Z vector of the [[rotation]] matrix. */
123489
123505
  get zVec() { return this.rotation.getRow(2); }
123490
123506
  }
123491
- /** @internal */
123507
+ /** The "pose" for a [[ViewState3d]], including information about the view's [Camera]($common) if it is enabled.
123508
+ * @public
123509
+ * @extensions
123510
+ */
123492
123511
  class ViewPose3d extends ViewPose {
123512
+ /** Construct a pose from the specified 3d view. */
123493
123513
  constructor(view) {
123494
123514
  super(view.isCameraOn);
123495
123515
  this.origin = view.origin.clone();
@@ -123497,17 +123517,24 @@ class ViewPose3d extends ViewPose {
123497
123517
  this.rotation = view.rotation.clone();
123498
123518
  this.camera = view.camera.clone();
123499
123519
  }
123520
+ /** @internal override */
123500
123521
  get target() {
123501
123522
  return this.cameraOn ? this.camera.eye.plusScaled(this.rotation.getRow(2), -1.0 * this.camera.focusDist) : this.center;
123502
123523
  }
123524
+ /** @internal override */
123503
123525
  equal(other) {
123526
+ if (!(other instanceof ViewPose3d))
123527
+ return false;
123504
123528
  return this.cameraOn === other.cameraOn &&
123505
123529
  this.origin.isAlmostEqual(other.origin) &&
123506
123530
  this.extents.isAlmostEqual(other.extents) &&
123507
123531
  this.rotation.isAlmostEqual(other.rotation) &&
123508
123532
  (!this.cameraOn || this.camera.equals(other.camera));
123509
123533
  }
123534
+ /** @internal override */
123510
123535
  equalState(view) {
123536
+ if (!(view instanceof _ViewState__WEBPACK_IMPORTED_MODULE_1__.ViewState3d))
123537
+ return false;
123511
123538
  return this.cameraOn === view.isCameraOn &&
123512
123539
  this.origin.isAlmostEqual(view.origin) &&
123513
123540
  this.extents.isAlmostEqual(view.extents) &&
@@ -123515,26 +123542,39 @@ class ViewPose3d extends ViewPose {
123515
123542
  (!this.cameraOn || this.camera.equals(view.camera));
123516
123543
  }
123517
123544
  }
123518
- /** @internal */
123545
+ /** The "pose" for a [[ViewState2d]].
123546
+ * @public
123547
+ * @extensions
123548
+ */
123519
123549
  class ViewPose2d extends ViewPose {
123550
+ /** Construct a pose from the specified 2d view. */
123520
123551
  constructor(view) {
123521
123552
  super(false);
123522
- this.origin2 = view.origin.clone();
123553
+ this.origin2d = view.origin.clone();
123523
123554
  this.delta = view.delta.clone();
123524
123555
  this.angle = view.angle.clone();
123525
123556
  }
123557
+ /** @internal override */
123526
123558
  equal(other) {
123527
- return this.origin2.isAlmostEqual(other.origin) &&
123559
+ if (!(other instanceof ViewPose2d))
123560
+ return false;
123561
+ return this.origin2d.isAlmostEqual(other.origin) &&
123528
123562
  this.delta.isAlmostEqual(other.delta) &&
123529
123563
  this.angle.isAlmostEqualNoPeriodShift(other.angle);
123530
123564
  }
123565
+ /** @internal override */
123531
123566
  equalState(view) {
123532
- return this.origin2.isAlmostEqual(view.origin) &&
123567
+ if (!(view instanceof _ViewState__WEBPACK_IMPORTED_MODULE_1__.ViewState2d))
123568
+ return false;
123569
+ return this.origin2d.isAlmostEqual(view.origin) &&
123533
123570
  this.delta.isAlmostEqual(view.delta) &&
123534
123571
  this.angle.isAlmostEqualNoPeriodShift(view.angle);
123535
123572
  }
123536
- get origin() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d(this.origin2.x, this.origin2.y); }
123573
+ /** @internal override */
123574
+ get origin() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Point3d(this.origin2d.x, this.origin2d.y); }
123575
+ /** @internal override */
123537
123576
  get extents() { return new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d(this.delta.x, this.delta.y); }
123577
+ /** @internal override */
123538
123578
  get rotation() { return _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Matrix3d.createRotationAroundVector(_itwin_core_geometry__WEBPACK_IMPORTED_MODULE_0__.Vector3d.unitZ(), this.angle); }
123539
123579
  }
123540
123580
 
@@ -124776,16 +124816,18 @@ class ViewState3d extends ViewState {
124776
124816
  const index = this.details.modelClipGroups.findGroupIndex(modelId);
124777
124817
  return -1 !== index ? this._modelClips[index] : undefined;
124778
124818
  }
124779
- /** @internal */
124819
+ /** Capture a copy of the viewed volume and camera parameters. */
124780
124820
  savePose() { return new _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose3d(this); }
124781
- /** @internal */
124821
+ /** @internal override */
124782
124822
  applyPose(val) {
124783
- this._cameraOn = val.cameraOn;
124784
- this.setOrigin(val.origin);
124785
- this.setExtents(val.extents);
124786
- this.rotation.setFrom(val.rotation);
124787
- this.camera.setFrom(val.camera);
124788
- this._updateMaxGlobalScopeFactor();
124823
+ if (val instanceof _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose3d) {
124824
+ this._cameraOn = val.cameraOn;
124825
+ this.setOrigin(val.origin);
124826
+ this.setExtents(val.extents);
124827
+ this.rotation.setFrom(val.rotation);
124828
+ this.camera.setFrom(val.camera);
124829
+ this._updateMaxGlobalScopeFactor();
124830
+ }
124789
124831
  return this;
124790
124832
  }
124791
124833
  toJSON() {
@@ -125481,13 +125523,15 @@ class ViewState2d extends ViewState {
125481
125523
  is3d() { return false; }
125482
125524
  /** @internal */
125483
125525
  isSpatialView() { return false; }
125484
- /** @internal */
125526
+ /** Capture a copy of the viewed area. */
125485
125527
  savePose() { return new _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose2d(this); }
125486
- /** @internal */
125528
+ /** @internal override */
125487
125529
  applyPose(val) {
125488
- this.setOrigin(val.origin);
125489
- this.setExtents(val.delta);
125490
- this.angle.setFrom(val.angle);
125530
+ if (val instanceof _ViewPose__WEBPACK_IMPORTED_MODULE_14__.ViewPose2d) {
125531
+ this.setOrigin(val.origin);
125532
+ this.setExtents(val.delta);
125533
+ this.angle.setFrom(val.angle);
125534
+ }
125491
125535
  return this;
125492
125536
  }
125493
125537
  /** Return the model for this 2d view. */
@@ -146728,6 +146772,19 @@ class MeshData {
146728
146772
  if (undefined !== params.surface.textureMapping) {
146729
146773
  this.texture = params.surface.textureMapping.texture;
146730
146774
  this._textureAlwaysDisplayed = params.surface.textureMapping.alwaysDisplayed;
146775
+ if (undefined !== params.surface.material && !params.surface.material.isAtlas) {
146776
+ const matTM = params.surface.material.material.textureMapping;
146777
+ if (undefined !== matTM && undefined !== matTM.normalMapParams) {
146778
+ if (undefined !== matTM.normalMapParams.normalMap) {
146779
+ this.normalMap = matTM.normalMapParams.normalMap;
146780
+ }
146781
+ else {
146782
+ // 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.
146783
+ this.normalMap = this.texture;
146784
+ this.texture = undefined;
146785
+ }
146786
+ }
146787
+ }
146731
146788
  }
146732
146789
  else {
146733
146790
  this.texture = undefined;
@@ -146812,6 +146869,7 @@ class MeshGeometry extends _CachedGeometry__WEBPACK_IMPORTED_MODULE_1__.LUTGeome
146812
146869
  get colorInfo() { return this.mesh.lut.colorInfo; }
146813
146870
  get uniformColor() { return this.colorInfo.isUniform ? this.colorInfo.uniform : undefined; }
146814
146871
  get texture() { return this.mesh.texture; }
146872
+ get normalMap() { return this.mesh.normalMap; }
146815
146873
  get hasBakedLighting() { return this.mesh.hasBakedLighting; }
146816
146874
  get lut() { return this.mesh.lut; }
146817
146875
  get hasScalarAnimation() { return this.mesh.lut.hasScalarAnimation; }
@@ -149622,6 +149680,8 @@ var TextureUnit;
149622
149680
  TextureUnit[TextureUnit["RealityMeshThematicGradient"] = WebGLRenderingContext.TEXTURE11] = "RealityMeshThematicGradient";
149623
149681
  // Lookup table for indexed edges - used only if WebGL 2 is available.
149624
149682
  TextureUnit[TextureUnit["EdgeLUT"] = WebGLRenderingContext.TEXTURE12] = "EdgeLUT";
149683
+ // Normal map texture - used only if WebGL 2 is available.
149684
+ TextureUnit[TextureUnit["NormalMap"] = WebGLRenderingContext.TEXTURE13] = "NormalMap";
149625
149685
  })(TextureUnit || (TextureUnit = {}));
149626
149686
  /** @internal */
149627
149687
  function isPlanar(order) {
@@ -153127,7 +153187,7 @@ class VertexShaderBuilder extends ShaderBuilder {
153127
153187
  */
153128
153188
  class FragmentShaderBuilder extends ShaderBuilder {
153129
153189
  constructor(flags = {}) {
153130
- super(21 /* COUNT */, flags);
153190
+ super(22 /* COUNT */, flags);
153131
153191
  this.requiresEarlyZWorkaround = false;
153132
153192
  if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2)
153133
153193
  this.addFragOutput("FragColor", -1);
@@ -153173,6 +153233,11 @@ class FragmentShaderBuilder extends ShaderBuilder {
153173
153233
  prelude.addFunction("bool checkForEarlyDiscard()", checkForEarlyDiscard);
153174
153234
  main.addline(" if (checkForEarlyDiscard()) { discard; return; }");
153175
153235
  }
153236
+ const finalizeNormal = this.get(21 /* FinalizeNormal */);
153237
+ if (undefined !== finalizeNormal) {
153238
+ prelude.addFunction("vec3 finalizeNormal()", finalizeNormal);
153239
+ main.addline(" g_normal = finalizeNormal();");
153240
+ }
153176
153241
  main.addline(" vec4 baseColor = computeBaseColor();");
153177
153242
  const finalizeDepth = this.get(18 /* FinalizeDepth */);
153178
153243
  if (undefined !== finalizeDepth) {
@@ -154705,6 +154770,7 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
154705
154770
  get isLit() { return _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.Lit === this.surfaceType || _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.TexturedLit === this.surfaceType; }
154706
154771
  get isTexturedType() { return _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.Textured === this.surfaceType || _primitives_SurfaceParams__WEBPACK_IMPORTED_MODULE_2__.SurfaceType.TexturedLit === this.surfaceType; }
154707
154772
  get hasTexture() { return this.isTexturedType && undefined !== this.texture; }
154773
+ get hasNormalMap() { return this.isLit && this.isTexturedType && undefined !== this.normalMap; }
154708
154774
  get isGlyph() { return this.mesh.isGlyph; }
154709
154775
  get alwaysRenderTranslucent() { return this.isGlyph; }
154710
154776
  get isTileSection() { return undefined !== this.texture && this.texture.isTileSection; }
@@ -154821,6 +154887,9 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
154821
154887
  useTexture(params) {
154822
154888
  return this.wantTextures(params.target, this.hasTexture);
154823
154889
  }
154890
+ useNormalMap(params) {
154891
+ return this.wantNormalMaps(params.target, this.hasNormalMap);
154892
+ }
154824
154893
  computeSurfaceFlags(params, flags) {
154825
154894
  const target = params.target;
154826
154895
  const vf = target.currentViewFlags;
@@ -154828,7 +154897,6 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
154828
154897
  flags[3 /* IgnoreMaterial */] = useMaterial ? 0 : 1;
154829
154898
  flags[9 /* HasMaterialAtlas */] = useMaterial && this.hasMaterialAtlas ? 1 : 0;
154830
154899
  flags[1 /* ApplyLighting */] = 0;
154831
- flags[8 /* HasNormalMap */] = 0;
154832
154900
  flags[6 /* HasColorAndNormal */] = 0;
154833
154901
  if (this.isLit) {
154834
154902
  flags[2 /* HasNormals */] = 1;
@@ -154845,6 +154913,7 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
154845
154913
  flags[2 /* HasNormals */] = 0;
154846
154914
  }
154847
154915
  flags[0 /* HasTexture */] = this.useTexture(params) ? 1 : 0;
154916
+ flags[8 /* HasNormalMap */] = this.useNormalMap(params) ? 1 : 0;
154848
154917
  // The transparency threshold controls how transparent a surface must be to allow light to pass through; more opaque surfaces cast shadows.
154849
154918
  flags[4 /* TransparencyThreshold */] = params.target.isDrawingShadowMap ? 1 : 0;
154850
154919
  flags[5 /* BackgroundFill */] = 0;
@@ -154891,6 +154960,17 @@ class SurfaceGeometry extends _MeshGeometry__WEBPACK_IMPORTED_MODULE_7__.MeshGeo
154891
154960
  return _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.Always === (fill & _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.FillFlags.Always);
154892
154961
  }
154893
154962
  }
154963
+ wantNormalMaps(target, normalMapExists) {
154964
+ if (!normalMapExists || !target.displayNormalMaps)
154965
+ return false;
154966
+ const flags = target.currentViewFlags;
154967
+ switch (flags.renderMode) {
154968
+ case _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__.RenderMode.SmoothShade:
154969
+ return flags.textures;
154970
+ default:
154971
+ return false;
154972
+ }
154973
+ }
154894
154974
  }
154895
154975
 
154896
154976
 
@@ -155565,6 +155645,7 @@ class System extends _RenderSystem__WEBPACK_IMPORTED_MODULE_7__.RenderSystem {
155565
155645
  textureWeight: args.textureMapping.weight,
155566
155646
  worldMapping: args.textureMapping.worldMapping,
155567
155647
  }));
155648
+ params.textureMapping.normalMapParams = args.textureMapping.normalMapParams;
155568
155649
  }
155569
155650
  if (args.source) {
155570
155651
  params.key = args.source.id;
@@ -155908,6 +155989,7 @@ class Target extends _RenderTarget__WEBPACK_IMPORTED_MODULE_8__.RenderTarget {
155908
155989
  this.displayRealityTilePreload = false;
155909
155990
  this.displayRealityTileRanges = false;
155910
155991
  this.logRealityTiles = false;
155992
+ this.displayNormalMaps = true;
155911
155993
  this.freezeRealityTiles = false;
155912
155994
  this._isDisposed = false;
155913
155995
  this._scratchRange = new _itwin_core_geometry__WEBPACK_IMPORTED_MODULE_1__.Range3d();
@@ -160152,9 +160234,10 @@ __webpack_require__.r(__webpack_exports__);
160152
160234
  /* harmony export */ });
160153
160235
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
160154
160236
  /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
160155
- /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
160156
- /* harmony import */ var _Surface__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Surface */ "../../core/frontend/lib/esm/render/webgl/glsl/Surface.js");
160157
- /* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
160237
+ /* harmony import */ var _System__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../System */ "../../core/frontend/lib/esm/render/webgl/System.js");
160238
+ /* harmony import */ var _RenderFlags__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../RenderFlags */ "../../core/frontend/lib/esm/render/webgl/RenderFlags.js");
160239
+ /* harmony import */ var _Surface__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Surface */ "../../core/frontend/lib/esm/render/webgl/glsl/Surface.js");
160240
+ /* harmony import */ var _Vertex__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Vertex */ "../../core/frontend/lib/esm/render/webgl/glsl/Vertex.js");
160158
160241
  /*---------------------------------------------------------------------------------------------
160159
160242
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
160160
160243
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -160167,6 +160250,7 @@ __webpack_require__.r(__webpack_exports__);
160167
160250
 
160168
160251
 
160169
160252
 
160253
+
160170
160254
  const initialize = `
160171
160255
  g_anim_step = vec2(1.0) / u_animLUTParams.xy;
160172
160256
  g_anim_center = g_anim_step * 0.5;
@@ -160322,12 +160406,12 @@ function addAnimation(vert, isSurface, isThematic) {
160322
160406
  vert.addGlobal("g_anim_step", 3 /* Vec2 */);
160323
160407
  vert.addGlobal("g_anim_center", 3 /* Vec2 */);
160324
160408
  vert.addInitializer(initialize);
160325
- vert.addFunction(_Vertex__WEBPACK_IMPORTED_MODULE_4__.unquantizePosition);
160409
+ vert.addFunction(_Vertex__WEBPACK_IMPORTED_MODULE_5__.unquantizePosition);
160326
160410
  vert.addUniform("u_animLUT", 8 /* Sampler2D */, (prog) => {
160327
160411
  prog.addGraphicUniform("u_animLUT", (uniform, params) => {
160328
160412
  const channels = (params.geometry.asLUT).lut.auxChannels;
160329
160413
  (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== channels);
160330
- channels.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_2__.TextureUnit.AuxChannelLUT);
160414
+ channels.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.AuxChannelLUT);
160331
160415
  });
160332
160416
  });
160333
160417
  vert.addUniform("u_animLUTParams", 4 /* Vec3 */, (prog) => {
@@ -160379,7 +160463,7 @@ function addAnimation(vert, isSurface, isThematic) {
160379
160463
  });
160380
160464
  // Normal and param
160381
160465
  if (isSurface) {
160382
- vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_3__.octDecodeNormal);
160466
+ vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_4__.octDecodeNormal);
160383
160467
  vert.addFunction(computeAnimationFrameNormal);
160384
160468
  vert.addFunction(computeAnimationNormal);
160385
160469
  vert.addFunction(computeAnimationFrameParam);
@@ -160393,7 +160477,7 @@ function addAnimation(vert, isSurface, isThematic) {
160393
160477
  uniform.setUniform3fv(animParams);
160394
160478
  });
160395
160479
  });
160396
- if (isThematic === 0 /* No */) {
160480
+ if (isThematic === 0 /* No */ || _System__WEBPACK_IMPORTED_MODULE_2__.System.instance.capabilities.isWebGL2) {
160397
160481
  vert.addUniform("u_animScalarParams", 4 /* Vec3 */, (prog) => {
160398
160482
  prog.addGraphicUniform("u_animScalarParams", (uniform, params) => {
160399
160483
  const scalars = getScalarChannel(params);
@@ -161038,7 +161122,8 @@ function createCombineTexturesProgram(context) {
161038
161122
  "use strict";
161039
161123
  __webpack_require__.r(__webpack_exports__);
161040
161124
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
161041
- /* harmony export */ "addChooseWithBitFlagFunctions": () => (/* binding */ addChooseWithBitFlagFunctions),
161125
+ /* harmony export */ "addChooseVec2WithBitFlagsFunction": () => (/* binding */ addChooseVec2WithBitFlagsFunction),
161126
+ /* harmony export */ "addChooseVec3WithBitFlagFunction": () => (/* binding */ addChooseVec3WithBitFlagFunction),
161042
161127
  /* harmony export */ "addExtractNthBit": () => (/* binding */ addExtractNthBit),
161043
161128
  /* harmony export */ "addEyeSpace": () => (/* binding */ addEyeSpace),
161044
161129
  /* harmony export */ "addFrustum": () => (/* binding */ addFrustum),
@@ -161058,17 +161143,18 @@ __webpack_require__.r(__webpack_exports__);
161058
161143
 
161059
161144
 
161060
161145
 
161061
- const chooseFloatWithBitFlag = `
161062
- float chooseFloatWithBitFlag(float f1, float f2, float flags, float n) { return nthBitSet(flags, n) ? f2 : f1; }
161063
- `;
161064
- const chooseFloatWithBitFlag2 = `
161065
- float chooseFloatWithBitFlag(float f1, float f2, uint flags, uint n) { return 0u != (flags & n) ? f2 : f1; }
161146
+ // These are not used anywhere currently, but will leave them here commented out in case we want them later.
161147
+ // const chooseFloatWithBitFlag = `
161148
+ // float chooseFloatWithBitFlag(float f1, float f2, float flags, float n) { return nthBitSet(flags, n) ? f2 : f1; }
161149
+ // `;
161150
+ // const chooseFloatWithBitFlag2 = `
161151
+ // float chooseFloatWithBitFlag(float f1, float f2, uint flags, uint n) { return 0u != (flags & n) ? f2 : f1; }
161152
+ // `;
161153
+ const chooseVec2With2BitFlags = `
161154
+ vec2 chooseVec2With2BitFlags(vec2 v1, vec2 v2, float flags, float n1, float n2) { return (nthBitSet(flags, n1) || nthBitSet(flags, n2)) ? v2 : v1; }
161066
161155
  `;
161067
- const chooseVec2WithBitFlag = `
161068
- vec2 chooseVec2WithBitFlag(vec2 v1, vec2 v2, float flags, float n) { return nthBitSet(flags, n) ? v2 : v1; }
161069
- `;
161070
- const chooseVec2WithBitFlag2 = `
161071
- vec2 chooseVec2WithBitFlag(vec2 v1, vec2 v2, uint flags, uint n) { return 0u != (flags & n) ? v2 : v1; }
161156
+ const chooseVec2With2BitFlags2 = `
161157
+ vec2 chooseVec2With2BitFlags(vec2 v1, vec2 v2, uint flags, uint n1, uint n2) { return 0u != (flags & (n1 | n2)) ? v2 : v1; }
161072
161158
  `;
161073
161159
  const chooseVec3WithBitFlag = `
161074
161160
  vec3 chooseVec3WithBitFlag(vec3 v1, vec3 v2, float flags, float n) { return nthBitSet(flags, n) ? v2 : v1; }
@@ -161077,41 +161163,34 @@ const chooseVec3WithBitFlag2 = `
161077
161163
  vec3 chooseVec3WithBitFlag(vec3 v1, vec3 v2, uint flags, uint n) { return 0u != (flags & n) ? v2 : v1; }
161078
161164
  `;
161079
161165
  /** @internal */
161080
- function addChooseWithBitFlagFunctions(shader) {
161166
+ function addChooseVec2WithBitFlagsFunction(shader) {
161081
161167
  if (_System__WEBPACK_IMPORTED_MODULE_1__.System.instance.capabilities.isWebGL2) {
161082
161168
  shader.addFunction(extractNthBit2);
161083
- shader.addFunction(chooseFloatWithBitFlag2);
161084
- shader.addFunction(chooseVec2WithBitFlag2);
161085
- shader.addFunction(chooseVec3WithBitFlag2);
161169
+ shader.addFunction(chooseVec2With2BitFlags2);
161086
161170
  }
161087
161171
  else {
161088
161172
  shader.addFunction(nthBitSet);
161089
- shader.addFunction(chooseFloatWithBitFlag);
161090
- shader.addFunction(chooseVec2WithBitFlag);
161091
- shader.addFunction(chooseVec3WithBitFlag);
161173
+ shader.addFunction(chooseVec2With2BitFlags);
161092
161174
  }
161093
161175
  }
161094
- function addShaderFlagsLookup(shader) {
161095
- shader.addConstant("kShaderBit_Monochrome", 1 /* Int */, "0");
161096
- shader.addConstant("kShaderBit_NonUniformColor", 1 /* Int */, "1");
161097
- shader.addConstant("kShaderBit_OITFlatAlphaWeight", 1 /* Int */, "2");
161098
- shader.addConstant("kShaderBit_OITScaleOutput", 1 /* Int */, "3");
161099
- shader.addConstant("kShaderBit_IgnoreNonLocatable", 1 /* Int */, "4");
161100
- addChooseWithBitFlagFunctions(shader);
161176
+ /** @internal */
161177
+ function addChooseVec3WithBitFlagFunction(shader) {
161101
161178
  if (_System__WEBPACK_IMPORTED_MODULE_1__.System.instance.capabilities.isWebGL2) {
161102
161179
  shader.addFunction(extractNthBit2);
161103
- shader.addFunction(chooseFloatWithBitFlag2);
161104
- shader.addFunction(chooseVec2WithBitFlag2);
161105
161180
  shader.addFunction(chooseVec3WithBitFlag2);
161106
161181
  }
161107
161182
  else {
161108
161183
  shader.addFunction(nthBitSet);
161109
- shader.addFunction(extractNthBit);
161110
- shader.addFunction(chooseFloatWithBitFlag);
161111
- shader.addFunction(chooseVec2WithBitFlag);
161112
161184
  shader.addFunction(chooseVec3WithBitFlag);
161113
161185
  }
161114
161186
  }
161187
+ function addShaderFlagsConstants(shader) {
161188
+ shader.addConstant("kShaderBit_Monochrome", 1 /* Int */, "0");
161189
+ shader.addConstant("kShaderBit_NonUniformColor", 1 /* Int */, "1");
161190
+ shader.addConstant("kShaderBit_OITFlatAlphaWeight", 1 /* Int */, "2");
161191
+ shader.addConstant("kShaderBit_OITScaleOutput", 1 /* Int */, "3");
161192
+ shader.addConstant("kShaderBit_IgnoreNonLocatable", 1 /* Int */, "4");
161193
+ }
161115
161194
  const shaderFlagArray = new Int32Array(5);
161116
161195
  const kShaderBitMonochrome = 0;
161117
161196
  const kShaderBitNonUniformColor = 1;
@@ -161158,8 +161237,8 @@ function setShaderFlags(uniform, params) {
161158
161237
  }
161159
161238
  /** @internal */
161160
161239
  function addShaderFlags(builder) {
161161
- addShaderFlagsLookup(builder.vert);
161162
- addShaderFlagsLookup(builder.frag);
161240
+ addShaderFlagsConstants(builder.vert);
161241
+ addShaderFlagsConstants(builder.frag);
161163
161242
  builder.addUniformArray("u_shaderFlags", 0 /* Boolean */, 5, (prog) => {
161164
161243
  prog.addGraphicUniform("u_shaderFlags", (uniform, params) => setShaderFlags(uniform, params));
161165
161244
  });
@@ -163405,8 +163484,6 @@ const applyLighting = `
163405
163484
 
163406
163485
  // Extract surface properties
163407
163486
  vec3 rgb = baseColor.rgb;
163408
- vec3 normal = normalize(v_n.xyz);
163409
- normal *= 2.0 * float(gl_FrontFacing) - 1.0;
163410
163487
  vec3 toEye = kFrustumType_Perspective == u_frustum.z ? normalize(v_eyeSpace.xyz) : vec3(0.0, 0.0, -1.0);
163411
163488
 
163412
163489
  // Extract material properties
@@ -163423,8 +163500,8 @@ const applyLighting = `
163423
163500
 
163424
163501
  float directionalDiffuseIntensity = 0.0;
163425
163502
  float directionalSpecularIntensity = 0.0;
163426
- computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, normal, toEye, u_sunDir, sunIntensity, specularExponent);
163427
- computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, normal ,toEye, portraitDir, portraitIntensity, specularExponent);
163503
+ computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, g_normal, toEye, u_sunDir, sunIntensity, specularExponent);
163504
+ computeDirectionalLight(directionalDiffuseIntensity, directionalSpecularIntensity, g_normal ,toEye, portraitDir, portraitIntensity, specularExponent);
163428
163505
 
163429
163506
  const float directionalFudge = 0.92; // leftover from old lighting implementation
163430
163507
  vec3 diffuseAccum = directionalDiffuseIntensity * diffuseWeight * rgb * directionalFudge; // directional light is white.
@@ -163444,18 +163521,18 @@ const applyLighting = `
163444
163521
  float hemiIntensity = u_lightSettings[11];
163445
163522
 
163446
163523
  // diffuse
163447
- float hemiDot = dot(normal, u_upVector);
163524
+ float hemiDot = dot(g_normal, u_upVector);
163448
163525
  float hemiDiffuseWeight = 0.5 * hemiDot + 0.5;
163449
163526
  vec3 hemiColor = mix(ground, sky, hemiDiffuseWeight);
163450
163527
  diffuseAccum += hemiIntensity * hemiColor * rgb;
163451
163528
 
163452
163529
  // sky specular
163453
- vec3 reflectSky = normalize(reflect(u_upVector, normal));
163530
+ vec3 reflectSky = normalize(reflect(u_upVector, g_normal));
163454
163531
  float skyDot = max(dot(reflectSky, toEye), 0.0001);
163455
163532
  float hemiSpecWeight = hemiIntensity * pow(skyDot, specularExponent);
163456
163533
 
163457
163534
  // ground specular
163458
- vec3 reflectGround = normalize(reflect(-u_upVector, normal));
163535
+ vec3 reflectGround = normalize(reflect(-u_upVector, g_normal));
163459
163536
  float groundDot = max(dot(reflectGround, toEye), 0.0001);
163460
163537
  hemiSpecWeight += hemiIntensity * pow(groundDot, specularExponent);
163461
163538
 
@@ -163466,7 +163543,7 @@ const applyLighting = `
163466
163543
  // Apply fresnel reflection.
163467
163544
  float fresnelIntensity = u_lightSettings[15];
163468
163545
  if (0.0 != fresnelIntensity) {
163469
- float fresnel = -dot(toEye, normal);
163546
+ float fresnel = -dot(toEye, g_normal);
163470
163547
  if (fresnelIntensity < 0.0) {
163471
163548
  fresnelIntensity = abs(fresnelIntensity);
163472
163549
  fresnel = 1.0 - fresnel;
@@ -164336,7 +164413,7 @@ function createPointCloudBuilder(classified, featureMode, thematic) {
164336
164413
  }
164337
164414
  if (1 /* Yes */ === thematic) {
164338
164415
  (0,_Thematic__WEBPACK_IMPORTED_MODULE_7__.addThematicDisplay)(builder, true);
164339
- (0,_Surface__WEBPACK_IMPORTED_MODULE_8__.addTexture)(builder, 0 /* No */, 1 /* Yes */, true);
164416
+ (0,_Surface__WEBPACK_IMPORTED_MODULE_8__.addTexture)(builder, 0 /* No */, 1 /* Yes */, true, false);
164340
164417
  }
164341
164418
  return builder;
164342
164419
  }
@@ -164803,7 +164880,8 @@ __webpack_require__.r(__webpack_exports__);
164803
164880
  /* harmony export */ "addColorOverrideMix": () => (/* binding */ addColorOverrideMix),
164804
164881
  /* harmony export */ "createClassifierRealityMeshHiliter": () => (/* binding */ createClassifierRealityMeshHiliter),
164805
164882
  /* harmony export */ "createRealityMeshBuilder": () => (/* binding */ createRealityMeshBuilder),
164806
- /* harmony export */ "createRealityMeshHiliter": () => (/* binding */ createRealityMeshHiliter)
164883
+ /* harmony export */ "createRealityMeshHiliter": () => (/* binding */ createRealityMeshHiliter),
164884
+ /* harmony export */ "finalizeNormal": () => (/* binding */ finalizeNormal)
164807
164885
  /* harmony export */ });
164808
164886
  /* harmony import */ var _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @itwin/core-bentley */ "../../core/bentley/lib/esm/core-bentley.js");
164809
164887
  /* harmony import */ var _itwin_core_common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @itwin/core-common */ "../../core/common/lib/esm/core-common.js");
@@ -164856,6 +164934,9 @@ const computeNormal = `
164856
164934
  g_hillshadeIndex = normal.z; // save off world Z for thematic hill shade mode index
164857
164935
  return normalize(u_worldToViewN * normal);
164858
164936
  `;
164937
+ const finalizeNormal = `
164938
+ return normalize(v_n) * (2.0 * float(gl_FrontFacing) - 1.0);
164939
+ `;
164859
164940
  const testInside = `
164860
164941
  bool testInside(float x0, float y0, float x1, float y1, float x, float y) {
164861
164942
  vec2 perp = vec2(y0 - y1, x1 - x0), test = vec2(x - x0, y - y0);
@@ -165030,6 +165111,8 @@ function addThematicToRealityMesh(builder, gradientTextureUnit) {
165030
165111
  builder.vert.addFunction(_Surface__WEBPACK_IMPORTED_MODULE_15__.octDecodeNormal);
165031
165112
  builder.vert.addGlobal("g_hillshadeIndex", 2 /* Float */);
165032
165113
  builder.addFunctionComputedVarying("v_n", 4 /* Vec3 */, "computeLightingNormal", computeNormal);
165114
+ builder.frag.addGlobal("g_normal", 4 /* Vec3 */);
165115
+ builder.frag.set(21 /* FinalizeNormal */, finalizeNormal);
165033
165116
  (0,_Thematic__WEBPACK_IMPORTED_MODULE_16__.addThematicDisplay)(builder, false, true);
165034
165117
  builder.addInlineComputedVarying("v_thematicIndex", 2 /* Float */, (0,_Thematic__WEBPACK_IMPORTED_MODULE_16__.getComputeThematicIndex)(builder.vert.usesInstancedGeometry, false, false));
165035
165118
  builder.vert.addUniform("u_worldToViewN", 6 /* Mat3 */, (prog) => {
@@ -165668,10 +165751,7 @@ float shadowMapEVSM(vec3 shadowPos) {
165668
165751
  const applySolarShadowMap = `
165669
165752
  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)
165670
165753
  return baseColor;
165671
- vec3 toEye = kFrustumType_Perspective == u_frustum.z ? normalize(v_eyeSpace) : vec3(0.0, 0.0, -1.0);
165672
- vec3 normal = normalize(v_n);
165673
- normal = (dot(normal, toEye) > 0.0) ? -normal : normal;
165674
- float visible = (u_surfaceFlags[kSurfaceBitIndex_HasNormals] && (dot(normal, u_sunDir) < 0.0)) ? 0.0 : shadowMapEVSM(v_shadowPos);
165754
+ float visible = (u_surfaceFlags[kSurfaceBitIndex_HasNormals] && (dot(g_normal, u_sunDir) < 0.0)) ? 0.0 : shadowMapEVSM(v_shadowPos);
165675
165755
  return vec4(baseColor.rgb * mix(u_shadowParams.rgb, vec3(1.0), visible), baseColor.a);
165676
165756
  `;
165677
165757
  const applySolarShadowMapTerrain = `
@@ -165905,7 +165985,7 @@ function addMaterial(builder, instanced) {
165905
165985
  (0,_Decode__WEBPACK_IMPORTED_MODULE_10__.addUnpackAndNormalize2Bytes)(frag);
165906
165986
  frag.addFunction(decodeFragMaterialParams);
165907
165987
  frag.addInitializer("decodeMaterialParams(v_materialParams);");
165908
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(frag);
165988
+ (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseVec3WithBitFlagFunction)(frag);
165909
165989
  frag.set(2 /* ApplyMaterialOverrides */, applyTextureWeight);
165910
165990
  const vert = builder.vert;
165911
165991
  vert.addGlobal("mat_rgb", 5 /* Vec4 */); // a = 0 if not overridden, else 1
@@ -165994,7 +166074,7 @@ function createCommon(isInstanced, animated, shadowable, isThematic, isHiliter,
165994
166074
  function createSurfaceHiliter(instanced, classified, posType) {
165995
166075
  const builder = createCommon(instanced, 0 /* No */, 0 /* No */, 0 /* No */, true, posType);
165996
166076
  addSurfaceFlags(builder, true, false);
165997
- addTexture(builder, 0 /* No */, 0 /* No */);
166077
+ addTexture(builder, 0 /* No */, 0 /* No */, false, true);
165998
166078
  if (classified) {
165999
166079
  (0,_PlanarClassification__WEBPACK_IMPORTED_MODULE_15__.addHilitePlanarClassifier)(builder);
166000
166080
  builder.vert.addGlobal("feature_ignore_material", 0 /* Boolean */, "false");
@@ -166028,12 +166108,14 @@ function addSurfaceFlagsLookup(builder) {
166028
166108
  builder.addBitFlagConstant("kSurfaceBit_HasTexture", 0 /* HasTexture */);
166029
166109
  builder.addBitFlagConstant("kSurfaceBit_IgnoreMaterial", 3 /* IgnoreMaterial */);
166030
166110
  builder.addBitFlagConstant("kSurfaceBit_OverrideRgb", 7 /* OverrideRgb */);
166111
+ builder.addBitFlagConstant("kSurfaceBit_HasNormalMap", 8 /* HasNormalMap */);
166031
166112
  // Only need masks for flags modified in vertex shader
166032
166113
  const suffix = _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 ? "u" : ".0";
166033
166114
  const type = _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 ? 10 /* Uint */ : 2 /* Float */;
166034
166115
  builder.addConstant("kSurfaceMask_HasTexture", type, 1 /* HasTexture */.toString() + suffix);
166035
166116
  builder.addConstant("kSurfaceMask_IgnoreMaterial", type, 8 /* IgnoreMaterial */.toString() + suffix);
166036
166117
  builder.addConstant("kSurfaceMask_OverrideRgb", type, 128 /* OverrideRgb */.toString() + suffix);
166118
+ builder.addConstant("kSurfaceMask_HasNormalMap", type, 256 /* HasNormalMap */.toString() + suffix);
166037
166119
  (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addExtractNthBit)(builder);
166038
166120
  if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
166039
166121
  builder.addFunction(isSurfaceBitSet2);
@@ -166048,19 +166130,20 @@ const initSurfaceFlags = `
166048
166130
  surfaceFlags = u_surfaceFlags[kSurfaceBitIndex_HasTexture] ? kSurfaceMask_HasTexture : 0.0;
166049
166131
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_IgnoreMaterial] ? kSurfaceMask_IgnoreMaterial : 0.0;
166050
166132
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_OverrideRgb] ? kSurfaceMask_OverrideRgb : 0.0;
166133
+ surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_HasNormalMap] ? kSurfaceMask_HasNormalMap : 0.0;
166051
166134
  `;
166052
166135
  const initSurfaceFlags2 = `
166053
166136
  surfaceFlags = u_surfaceFlags[kSurfaceBitIndex_HasTexture] ? kSurfaceMask_HasTexture : 0u;
166054
166137
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_IgnoreMaterial] ? kSurfaceMask_IgnoreMaterial : 0u;
166055
166138
  surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_OverrideRgb] ? kSurfaceMask_OverrideRgb : 0u;
166139
+ surfaceFlags += u_surfaceFlags[kSurfaceBitIndex_HasNormalMap] ? kSurfaceMask_HasNormalMap : 0u;
166056
166140
  `;
166057
166141
  const computeBaseSurfaceFlags = `
166058
- bool hasTexture = u_surfaceFlags[kSurfaceBitIndex_HasTexture];
166059
166142
  if (feature_ignore_material) {
166060
- if (hasTexture) {
166061
- hasTexture = false;
166143
+ if (u_surfaceFlags[kSurfaceBitIndex_HasTexture])
166062
166144
  surfaceFlags -= kSurfaceMask_HasTexture;
166063
- }
166145
+ if (u_surfaceFlags[kSurfaceBitIndex_HasNormalMap])
166146
+ surfaceFlags -= kSurfaceMask_HasNormalMap;
166064
166147
 
166065
166148
  surfaceFlags += kSurfaceMask_IgnoreMaterial;
166066
166149
  }
@@ -166098,6 +166181,39 @@ function getComputeNormal(quantized) {
166098
166181
  return normalize(MAT_NORM * octDecodeNormal(normal));
166099
166182
  `;
166100
166183
  }
166184
+ const finalizeNormalPrelude = `
166185
+ vec3 normal = normalize(v_n) * (2.0 * float(gl_FrontFacing) - 1.0);
166186
+ `;
166187
+ const finalizeNormalNormalMap = `
166188
+ if (isSurfaceBitSet(kSurfaceBit_HasNormalMap)) {
166189
+ // Modify the normal with the normal map texture.
166190
+ // First calculate the tangent.
166191
+ vec3 dp1 = dFdx(v_eyeSpace);
166192
+ vec3 dp2 = dFdy(v_eyeSpace);
166193
+ vec2 duv1 = dFdx(v_texCoord);
166194
+ vec2 duv2 = dFdy(v_texCoord);
166195
+ vec3 tangent = normalize(duv2.y * dp1 - duv1.y * dp2);
166196
+ tangent = normalize (tangent - normal * dot (normal, tangent)); // re-orthogonalize with normal
166197
+ bool flip = (duv1.x * duv2.y - duv2.x * duv1.y) < 0.0;
166198
+ if (flip)
166199
+ tangent = -tangent;
166200
+ vec3 biTangent = cross (normal, tangent);
166201
+ if (flip)
166202
+ biTangent = -biTangent;
166203
+ vec3 normM = TEXTURE(s_normalMap, v_texCoord).xyz;
166204
+ if (length (normM) > 0.0001) { // check for empty normal texture
166205
+ normM = (normM - 0.5) * 2.0;
166206
+ normM = normalize (normM);
166207
+ normM.x *= abs(u_normalMapScale);
166208
+ normM.y *= u_normalMapScale;
166209
+ normM = normalize (normM);
166210
+ normal = normalize (normM.x * tangent + normM.y * biTangent + normM.z * normal);
166211
+ }
166212
+ }
166213
+ `;
166214
+ const finalizeNormalPostlude = `
166215
+ return normal;
166216
+ `;
166101
166217
  function getComputeAnimatedNormal(quantized) {
166102
166218
  return `
166103
166219
  if (u_animNormalParams.x >= 0.0)
@@ -166113,7 +166229,7 @@ function getComputeTexCoord(quantized) {
166113
166229
  return `
166114
166230
  vec4 rgba = ${vertData};
166115
166231
  vec2 qcoords = vec2(decodeUInt16(rgba.xy), decodeUInt16(rgba.zw));
166116
- return chooseVec2WithBitFlag(vec2(0.0), unquantize2d(qcoords, u_qTexCoordParams), surfaceFlags, kSurfaceBit_HasTexture);
166232
+ return chooseVec2With2BitFlags(vec2(0.0), unquantize2d(qcoords, u_qTexCoordParams), surfaceFlags, kSurfaceBit_HasTexture, kSurfaceBit_HasNormalMap);
166117
166233
  `;
166118
166234
  }
166119
166235
  function getComputeAnimatedTexCoord(quantized) {
@@ -166175,9 +166291,29 @@ function addNormal(builder, instanced, animated) {
166175
166291
  (0,_Vertex__WEBPACK_IMPORTED_MODULE_20__.addNormalMatrix)(builder.vert, instanced);
166176
166292
  const quantized = "quantized" === builder.vert.positionType;
166177
166293
  builder.vert.addFunction(octDecodeNormal);
166178
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.vert);
166179
166294
  builder.vert.addFunction("vec3 computeSurfaceNormal()", getComputeNormal(quantized));
166180
166295
  builder.addFunctionComputedVarying("v_n", 4 /* Vec3 */, "computeLightingNormal", animated ? getComputeAnimatedNormal(quantized) : "return computeSurfaceNormal();");
166296
+ builder.frag.addGlobal("g_normal", 4 /* Vec3 */);
166297
+ let finalizeNormal = finalizeNormalPrelude;
166298
+ if (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
166299
+ finalizeNormal += finalizeNormalNormalMap;
166300
+ builder.frag.addUniform("u_normalMapScale", 2 /* Float */, (prog) => {
166301
+ prog.addGraphicUniform("u_normalMapScale", (uniform, params) => {
166302
+ var _a;
166303
+ let normalMapScale = 1.0;
166304
+ if (undefined !== params.geometry.materialInfo && !params.geometry.materialInfo.isAtlas &&
166305
+ undefined !== params.geometry.materialInfo.textureMapping &&
166306
+ undefined !== params.geometry.materialInfo.textureMapping.normalMapParams) {
166307
+ normalMapScale = (_a = params.geometry.materialInfo.textureMapping.normalMapParams.scale) !== null && _a !== void 0 ? _a : 1.0;
166308
+ if (!params.geometry.materialInfo.textureMapping.normalMapParams.greenDown)
166309
+ normalMapScale = -normalMapScale;
166310
+ }
166311
+ uniform.setUniform1f(normalMapScale);
166312
+ });
166313
+ });
166314
+ }
166315
+ finalizeNormal += finalizeNormalPostlude;
166316
+ builder.frag.set(21 /* FinalizeNormal */, finalizeNormal);
166181
166317
  // Set to true to colorize surfaces based on normals (in world space).
166182
166318
  // You must also set checkMaxVarying to false in ProgramBuilder.buildProgram to avoid assertions, if using a non-optimized build.
166183
166319
  const debugNormals = false;
@@ -166187,19 +166323,21 @@ function addNormal(builder, instanced, animated) {
166187
166323
  }
166188
166324
  }
166189
166325
  /** @internal */
166190
- function addTexture(builder, animated, isThematic, isPointCloud = false) {
166326
+ function addTexture(builder, animated, isThematic, isPointCloud, isHilite) {
166191
166327
  if (isThematic) {
166192
166328
  builder.addInlineComputedVarying("v_thematicIndex", 2 /* Float */, (0,_Thematic__WEBPACK_IMPORTED_MODULE_18__.getComputeThematicIndex)(builder.vert.usesInstancedGeometry, isPointCloud, true));
166193
166329
  }
166194
- else {
166330
+ // Point clouds do not need to compute texture coordinates since the only texture they use is the thematic gradient.
166331
+ // Surfaces now need texture coordinates even for thematic in case they have a normal map (except for webgl1 which does not have normal maps).
166332
+ if (!isPointCloud && (_System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2 || !isThematic)) {
166195
166333
  builder.vert.addFunction(_Decode__WEBPACK_IMPORTED_MODULE_10__.unquantize2d);
166196
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.vert);
166334
+ (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseVec2WithBitFlagsFunction)(builder.vert);
166197
166335
  const quantized = "quantized" === builder.vert.positionType;
166198
166336
  builder.addFunctionComputedVarying("v_texCoord", 3 /* Vec2 */, "computeTexCoord", animated ? getComputeAnimatedTexCoord(quantized) : getComputeTexCoord(quantized));
166199
166337
  builder.vert.addUniform("u_qTexCoordParams", 5 /* Vec4 */, (prog) => {
166200
166338
  prog.addGraphicUniform("u_qTexCoordParams", (uniform, params) => {
166201
166339
  const surfGeom = params.geometry.asSurface;
166202
- if (surfGeom.useTexture(params.programParams)) {
166340
+ if (surfGeom.useTexture(params.programParams) || (surfGeom.useNormalMap(params.programParams) && !isPointCloud)) {
166203
166341
  const uvQParams = surfGeom.lut.uvQParams;
166204
166342
  if (undefined !== uvQParams) {
166205
166343
  uniform.setUniform4fv(uvQParams);
@@ -166225,6 +166363,21 @@ function addTexture(builder, animated, isThematic, isPointCloud = false) {
166225
166363
  }
166226
166364
  });
166227
166365
  });
166366
+ if (!isHilite && !isPointCloud && _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.capabilities.isWebGL2) {
166367
+ builder.frag.addUniform("s_normalMap", 8 /* Sampler2D */, (prog) => {
166368
+ prog.addGraphicUniform("s_normalMap", (uniform, params) => {
166369
+ const surfGeom = params.geometry.asSurface;
166370
+ if (surfGeom.useNormalMap(params.programParams)) {
166371
+ const normalMap = surfGeom.normalMap;
166372
+ (0,_itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.assert)(undefined !== normalMap);
166373
+ normalMap.texture.bindSampler(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.NormalMap);
166374
+ }
166375
+ else {
166376
+ _System__WEBPACK_IMPORTED_MODULE_5__.System.instance.ensureSamplerBound(uniform, _RenderFlags__WEBPACK_IMPORTED_MODULE_3__.TextureUnit.NormalMap);
166377
+ }
166378
+ });
166379
+ });
166380
+ }
166228
166381
  }
166229
166382
  const discardClassifiedByAlpha = `
166230
166383
  if (u_no_classifier_discard)
@@ -166278,14 +166431,13 @@ function createSurfaceBuilder(flags) {
166278
166431
  (0,_FeatureSymbology__WEBPACK_IMPORTED_MODULE_11__.addSurfaceDiscard)(builder, flags);
166279
166432
  addNormal(builder, flags.isInstanced, flags.isAnimated);
166280
166433
  // 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).
166281
- (0,_Common__WEBPACK_IMPORTED_MODULE_9__.addChooseWithBitFlagFunctions)(builder.frag);
166282
166434
  builder.frag.set(3 /* FinalizeBaseColor */, applyBackgroundColor);
166283
166435
  builder.frag.addUniform("u_bgColor", 4 /* Vec3 */, (prog) => {
166284
166436
  prog.addProgramUniform("u_bgColor", (uniform, params) => {
166285
166437
  params.target.uniforms.style.bindBackgroundRgb(uniform);
166286
166438
  });
166287
166439
  });
166288
- addTexture(builder, flags.isAnimated, flags.isThematic);
166440
+ addTexture(builder, flags.isAnimated, flags.isThematic, false, false);
166289
166441
  builder.frag.addUniform("u_applyGlyphTex", 0 /* Boolean */, (prog) => {
166290
166442
  prog.addGraphicUniform("u_applyGlyphTex", (uniform, params) => {
166291
166443
  const surfGeom = params.geometry.asSurface;
@@ -166430,7 +166582,7 @@ vec3 getIsoLineColor(float ndx, float stepCount) {
166430
166582
  const fwidthWhenAvailable = `\nfloat _universal_fwidth(float coord) { return fwidth(coord); }\n`;
166431
166583
  const fwidthWhenNotAvailable = `\nfloat _universal_fwidth(float coord) { return coord; }\n`; // ###TODO: can we do something reasonable in this case?
166432
166584
  const slopeAndHillShadeShader = ` else if (kThematicDisplayMode_Slope == u_thematicDisplayMode) {
166433
- float d = dot(v_n, u_thematicAxis);
166585
+ float d = dot(g_normal, u_thematicAxis);
166434
166586
  if (d < 0.0)
166435
166587
  d = -d;
166436
166588
 
@@ -166448,11 +166600,7 @@ const slopeAndHillShadeShader = ` else if (kThematicDisplayMode_Slope == u_thema
166448
166600
 
166449
166601
  ndx = d;
166450
166602
  } else if (kThematicDisplayMode_HillShade == u_thematicDisplayMode) {
166451
- float d = dot(v_n, u_thematicSunDirection);
166452
-
166453
- // In the case of HillShade, v_thematicIndex contains the normal's z in world space.
166454
- if (!gl_FrontFacing && v_thematicIndex < 0.0)
166455
- d = -d;
166603
+ float d = dot(g_normal, u_thematicSunDirection);
166456
166604
 
166457
166605
  ndx = max(0.0, d);
166458
166606
  }`;
@@ -169420,23 +169568,23 @@ class GltfReader {
169420
169568
  return undefined !== view ? view.toBufferData(type) : undefined;
169421
169569
  }
169422
169570
  readFeatureIndices(_json) { return undefined; }
169571
+ extractId(value) {
169572
+ switch (typeof value) {
169573
+ case "string":
169574
+ return value;
169575
+ case "number":
169576
+ return value.toString();
169577
+ default:
169578
+ return undefined;
169579
+ }
169580
+ }
169423
169581
  extractTextureId(material) {
169424
169582
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
169425
169583
  if (typeof material !== "object")
169426
169584
  return undefined;
169427
- const extractId = (value) => {
169428
- switch (typeof value) {
169429
- case "string":
169430
- return value;
169431
- case "number":
169432
- return value.toString();
169433
- default:
169434
- return undefined;
169435
- }
169436
- };
169437
169585
  // Bimium's shader value...almost certainly obsolete at this point.
169438
169586
  if (isGltf1Material(material))
169439
- return (_a = material.diffuse) !== null && _a !== void 0 ? _a : extractId((_b = material.values) === null || _b === void 0 ? void 0 : _b.tex);
169587
+ return (_a = material.diffuse) !== null && _a !== void 0 ? _a : this.extractId((_b = material.values) === null || _b === void 0 ? void 0 : _b.tex);
169440
169588
  // KHR_techniques_webgl extension
169441
169589
  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;
169442
169590
  const ext = Array.isArray(techniques) ? (_e = material.extensions) === null || _e === void 0 ? void 0 : _e.KHR_techniques_webgl : undefined;
@@ -169446,12 +169594,20 @@ class GltfReader {
169446
169594
  for (const uniformName of Object.keys(uniforms)) {
169447
169595
  const uniform = uniforms[uniformName];
169448
169596
  if (typeof uniform === "object" && uniform.type === GltfDataType.Sampler2d)
169449
- return extractId((_f = ext.values[uniformName]) === null || _f === void 0 ? void 0 : _f.index);
169597
+ return this.extractId((_f = ext.values[uniformName]) === null || _f === void 0 ? void 0 : _f.index);
169450
169598
  }
169451
169599
  }
169452
169600
  }
169453
- const id = extractId((_h = (_g = material.pbrMetallicRoughness) === null || _g === void 0 ? void 0 : _g.baseColorTexture) === null || _h === void 0 ? void 0 : _h.index);
169454
- return id !== null && id !== void 0 ? id : extractId((_j = material.emissiveTexture) === null || _j === void 0 ? void 0 : _j.index);
169601
+ const id = this.extractId((_h = (_g = material.pbrMetallicRoughness) === null || _g === void 0 ? void 0 : _g.baseColorTexture) === null || _h === void 0 ? void 0 : _h.index);
169602
+ return id !== null && id !== void 0 ? id : this.extractId((_j = material.emissiveTexture) === null || _j === void 0 ? void 0 : _j.index);
169603
+ }
169604
+ extractNormalMapId(material) {
169605
+ var _a;
169606
+ if (typeof material !== "object")
169607
+ return undefined;
169608
+ if (isGltf1Material(material))
169609
+ return undefined;
169610
+ return this.extractId((_a = material.normalTexture) === null || _a === void 0 ? void 0 : _a.index);
169455
169611
  }
169456
169612
  isMaterialTransparent(material) {
169457
169613
  var _a, _b;
@@ -169472,9 +169628,15 @@ class GltfReader {
169472
169628
  createDisplayParams(material, hasBakedLighting) {
169473
169629
  const isTransparent = this.isMaterialTransparent(material);
169474
169630
  const textureId = this.extractTextureId(material);
169475
- const textureMapping = undefined !== textureId ? this.findTextureMapping(textureId, isTransparent) : undefined;
169631
+ const normalMapId = this.extractNormalMapId(material);
169632
+ const textureMapping = (undefined !== textureId || undefined !== normalMapId) ? this.findTextureMapping(textureId, isTransparent, normalMapId) : undefined;
169476
169633
  const color = colorFromMaterial(material, isTransparent);
169477
- 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);
169634
+ let renderMaterial;
169635
+ if (undefined !== textureMapping && undefined !== textureMapping.normalMapParams) {
169636
+ const args = { diffuse: { color }, specular: { color: _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.ColorDef.white }, textureMapping };
169637
+ renderMaterial = _IModelApp__WEBPACK_IMPORTED_MODULE_5__.IModelApp.renderSystem.createRenderMaterial(args);
169638
+ }
169639
+ 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);
169478
169640
  }
169479
169641
  readMeshPrimitives(node, featureTable, thisTransform, thisBias) {
169480
169642
  const meshes = [];
@@ -170051,11 +170213,38 @@ class GltfReader {
170051
170213
  });
170052
170214
  return renderTexture !== null && renderTexture !== void 0 ? renderTexture : false;
170053
170215
  }
170054
- findTextureMapping(id, isTransparent) {
170055
- let texture = this._resolvedTextures.get({ id, isTransparent });
170056
- if (undefined === texture)
170057
- this._resolvedTextures.set({ id, isTransparent }, texture = this.resolveTexture(id, isTransparent));
170058
- return texture ? new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params()) : undefined;
170216
+ findTextureMapping(id, isTransparent, normalMapId) {
170217
+ if (undefined === id && undefined === normalMapId)
170218
+ return undefined;
170219
+ let texture;
170220
+ if (undefined !== id) {
170221
+ texture = this._resolvedTextures.get({ id, isTransparent });
170222
+ if (undefined === texture)
170223
+ this._resolvedTextures.set({ id, isTransparent }, texture = this.resolveTexture(id, isTransparent));
170224
+ }
170225
+ let normalMap;
170226
+ if (undefined !== normalMapId) {
170227
+ normalMap = this._resolvedTextures.get({ id: normalMapId, isTransparent: false });
170228
+ if (undefined === normalMap)
170229
+ this._resolvedTextures.set({ id: normalMapId, isTransparent: false }, normalMap = this.resolveTexture(normalMapId, false));
170230
+ }
170231
+ let nMap;
170232
+ if (normalMap) {
170233
+ if (texture) {
170234
+ nMap = {
170235
+ normalMap,
170236
+ };
170237
+ }
170238
+ else {
170239
+ texture = normalMap;
170240
+ nMap = {};
170241
+ }
170242
+ }
170243
+ if (!texture)
170244
+ return undefined;
170245
+ const textureMapping = new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params());
170246
+ textureMapping.normalMapParams = nMap;
170247
+ return textureMapping;
170059
170248
  }
170060
170249
  }
170061
170250
  /** Produce a [[RenderGraphic]] from a [glTF](https://www.khronos.org/gltf/) asset suitable for use in [view decorations]($docs/learning/frontend/ViewDecorations).
@@ -171427,6 +171616,7 @@ class ImdlReader {
171427
171616
  mapMode: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asInt(paramsJson.mode),
171428
171617
  worldMapping: _itwin_core_bentley__WEBPACK_IMPORTED_MODULE_0__.JsonUtils.asBool(paramsJson.worldMapping),
171429
171618
  };
171619
+ // TODO: Need to extract normal map properties from json once they're sent by the backend.
171430
171620
  return new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping(texture, new _itwin_core_common__WEBPACK_IMPORTED_MODULE_2__.TextureMapping.Params(paramProps));
171431
171621
  }
171432
171622
  async loadNamedTextures() {
@@ -311298,7 +311488,7 @@ module.exports = JSON.parse('{"name":"axios","version":"0.21.4","description":"P
311298
311488
  /***/ ((module) => {
311299
311489
 
311300
311490
  "use strict";
311301
- 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"}}]}}');
311491
+ 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"}}]}}');
311302
311492
 
311303
311493
  /***/ })
311304
311494