@xeokit/xeokit-sdk 2.4.0-alpha-13 → 2.4.0-alpha-15

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.
@@ -323,6 +323,7 @@ class ContextMenu {
323
323
  * @param {Object} [cfg.context] The context, which is passed into the item callbacks. This can also be dynamically set on {@link ContextMenu#context}. This must be set before calling {@link ContextMenu#show}.
324
324
  * @param {Boolean} [cfg.enabled=true] Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu#show} does nothing while this is ````false````.
325
325
  * @param {Boolean} [cfg.hideOnMouseDown=true] Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page.
326
+ * @param {Boolean} [cfg.hideOnMouseSelect=true] Whether this ````ContextMenu```` automatically hides after we select a menu item. Se false if we want the menu to remain shown and show any updates to its item titles, after we've selected an item.
326
327
  */
327
328
  constructor(cfg = {}) {
328
329
 
@@ -361,6 +362,8 @@ class ContextMenu {
361
362
  this.items = cfg.items;
362
363
  }
363
364
 
365
+ this._hideOnMouseSelect = (cfg.hideOnMouseSelect !== false);
366
+
364
367
  this.context = cfg.context;
365
368
  this.enabled = cfg.enabled !== false;
366
369
  this.hide();
@@ -789,7 +792,6 @@ class ContextMenu {
789
792
 
790
793
  item.itemElement.addEventListener("click", (event) => {
791
794
  event.preventDefault();
792
- self.hide();
793
795
  if (!self._context) {
794
796
  return;
795
797
  }
@@ -799,9 +801,13 @@ class ContextMenu {
799
801
  if (item.doAction) {
800
802
  item.doAction(self._context);
801
803
  }
804
+ if (this._hideOnMouseSelect) {
805
+ self.hide();
806
+ } else {
807
+ self._updateItemsTitles();
808
+ self._updateItemsEnabledStatus();
809
+ }
802
810
  });
803
-
804
-
805
811
  item.itemElement.addEventListener("mouseenter", (event) => {
806
812
  event.preventDefault();
807
813
  if (item.enabled === false) {
@@ -7439,7 +7445,6 @@ class Component {
7439
7445
  throw "Invalid param: owner must be a Component"
7440
7446
  }
7441
7447
  this._owner = owner;
7442
- this._renderer = this.scene._renderer;
7443
7448
  }
7444
7449
 
7445
7450
  this._dontClear = !!cfg.dontClear; // Prevent Scene#clear from destroying this component
@@ -8935,7 +8940,7 @@ class VBOSceneModelNode {
8935
8940
 
8936
8941
  }
8937
8942
 
8938
- const tempVec3a$1h = math.vec3();
8943
+ const tempVec3a$1i = math.vec3();
8939
8944
 
8940
8945
  /**
8941
8946
  * Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
@@ -9015,7 +9020,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
9015
9020
  */
9016
9021
  function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) {
9017
9022
 
9018
- const center = math.getPositionsCenter(worldPositions, tempVec3a$1h);
9023
+ const center = math.getPositionsCenter(worldPositions, tempVec3a$1i);
9019
9024
 
9020
9025
  const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
9021
9026
  const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
@@ -9051,7 +9056,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize =
9051
9056
  */
9052
9057
  function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
9053
9058
  const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
9054
- const dirNormalized = math.normalizeVec3(dir, tempVec3a$1h);
9059
+ const dirNormalized = math.normalizeVec3(dir, tempVec3a$1i);
9055
9060
  math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
9056
9061
  return rtcPlanePos;
9057
9062
  }
@@ -11516,12 +11521,12 @@ class Annotation extends Marker {
11516
11521
  const canvasPos = this.canvasPos;
11517
11522
  this._marker.style.left = (Math.floor(left + canvasPos[0]) - 12) + "px";
11518
11523
  this._marker.style.top = (Math.floor(top + canvasPos[1]) - 12) + "px";
11519
- this._marker.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11524
+ this._marker.style["z-index"] = cfg._markerZIndex;
11520
11525
  const offsetX = 20;
11521
11526
  const offsetY = -17;
11522
11527
  this._label.style.left = 20 + Math.floor(left + canvasPos[0] + offsetX) + "px";
11523
11528
  this._label.style.top = Math.floor(top + canvasPos[1] + offsetY) + "px";
11524
- this._label.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11529
+ this._label.style["z-index"] = cfg._labelZIndex;
11525
11530
  }
11526
11531
 
11527
11532
  /**
@@ -11682,8 +11687,8 @@ class Annotation extends Marker {
11682
11687
  }
11683
11688
  }
11684
11689
 
11685
- const tempVec3a$1g = math.vec3();
11686
- const tempVec3b$c = math.vec3();
11690
+ const tempVec3a$1h = math.vec3();
11691
+ const tempVec3b$d = math.vec3();
11687
11692
  const tempVec3c$9 = math.vec3();
11688
11693
 
11689
11694
  /**
@@ -12058,6 +12063,8 @@ class AnnotationsPlugin extends Plugin {
12058
12063
  * @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
12059
12064
  * @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
12060
12065
  * @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
12066
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12067
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12061
12068
  * @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
12062
12069
  * @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
12063
12070
  * @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
@@ -12066,10 +12073,12 @@ class AnnotationsPlugin extends Plugin {
12066
12073
  constructor(viewer, cfg) {
12067
12074
 
12068
12075
  super("Annotations", viewer);
12069
-
12076
+ const randomZIndex = 90005 + Math.floor(this._viewPos[2]) + 1;
12070
12077
  this._labelHTML = cfg.labelHTML || "<div></div>";
12071
12078
  this._markerHTML = cfg.markerHTML || "<div></div>";
12072
12079
  this._container = cfg.container || document.body;
12080
+ this._markerZIndex = cfg.markerZIndex || randomZIndex;
12081
+ this._labelZIndex = cfg.labelZIndex || randomZIndex;
12073
12082
  this._values = cfg.values || {};
12074
12083
 
12075
12084
  /**
@@ -12145,6 +12154,8 @@ class AnnotationsPlugin extends Plugin {
12145
12154
  * @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
12146
12155
  * @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
12147
12156
  * @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
12157
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12158
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12148
12159
  * @returns {Annotation} The new {@link Annotation}.
12149
12160
  */
12150
12161
  createAnnotation(params) {
@@ -12160,8 +12171,8 @@ class AnnotationsPlugin extends Plugin {
12160
12171
  if (!pickResult.worldPos || !pickResult.worldNormal) {
12161
12172
  this.error("Param 'pickResult' does not have both worldPos and worldNormal");
12162
12173
  } else {
12163
- const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1g);
12164
- const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$c);
12174
+ const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1h);
12175
+ const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$d);
12165
12176
  const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$9);
12166
12177
  worldPos = offsetWorldPos;
12167
12178
  entity = pickResult.entity;
@@ -12196,7 +12207,9 @@ class AnnotationsPlugin extends Plugin {
12196
12207
  markerElement: markerElement,
12197
12208
  labelElement: labelElement,
12198
12209
  markerHTML: params.markerHTML || this._markerHTML,
12210
+ markerZIndex : params.markerZIndex || this._markerZIndex,
12199
12211
  labelHTML: params.labelHTML || this._labelHTML,
12212
+ labelZIndex : params.labelZIndex || this._labelZIndex,
12200
12213
  occludable: params.occludable,
12201
12214
  values: utils.apply(params.values, utils.apply(this._values, {})),
12202
12215
  markerShown: params.markerShown,
@@ -14357,7 +14370,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]);
14357
14370
  const POINT_SIZE = 20;
14358
14371
  const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces
14359
14372
 
14360
- const tempVec3a$1f = math.vec3();
14373
+ const tempVec3a$1g = math.vec3();
14361
14374
 
14362
14375
  /**
14363
14376
  * Manages occlusion testing. Private member of a Renderer.
@@ -14694,7 +14707,7 @@ class OcclusionTester {
14694
14707
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
14695
14708
  if (active) {
14696
14709
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
14697
- gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f));
14710
+ gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1g));
14698
14711
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
14699
14712
  }
14700
14713
  }
@@ -18699,7 +18712,7 @@ class CustomProjection extends Component {
18699
18712
  }
18700
18713
 
18701
18714
  const tempVec3$6 = math.vec3();
18702
- const tempVec3b$b = math.vec3();
18715
+ const tempVec3b$c = math.vec3();
18703
18716
  const tempVec3c$8 = math.vec3();
18704
18717
  const tempVec3d$4 = math.vec3();
18705
18718
  const tempVec3e$3 = math.vec3();
@@ -19009,7 +19022,7 @@ class Camera extends Component {
19009
19022
  orbitYaw(angleInc) {
19010
19023
  let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
19011
19024
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19012
- lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$b);
19025
+ lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$c);
19013
19026
  this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$8); // Set eye position as 'look' plus 'eye' vector
19014
19027
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4); // Rotate 'up' vector
19015
19028
  }
@@ -19027,7 +19040,7 @@ class Camera extends Component {
19027
19040
  }
19028
19041
  }
19029
19042
  let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
19030
- const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
19043
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19031
19044
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19032
19045
  eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$4);
19033
19046
  this.up = math.transformPoint3(tempMat, this._up, tempVec3e$3);
@@ -19042,7 +19055,7 @@ class Camera extends Component {
19042
19055
  yaw(angleInc) {
19043
19056
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
19044
19057
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19045
- look2 = math.transformPoint3(tempMat, look2, tempVec3b$b);
19058
+ look2 = math.transformPoint3(tempMat, look2, tempVec3b$c);
19046
19059
  this.look = math.addVec3(look2, this._eye, tempVec3c$8);
19047
19060
  if (this._gimbalLock) {
19048
19061
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4);
@@ -19062,7 +19075,7 @@ class Camera extends Component {
19062
19075
  }
19063
19076
  }
19064
19077
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
19065
- const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
19078
+ const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19066
19079
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19067
19080
  this.up = math.transformPoint3(tempMat, this._up, tempVec3f$3);
19068
19081
  look2 = math.transformPoint3(tempMat, look2, tempVec3d$4);
@@ -19079,7 +19092,7 @@ class Camera extends Component {
19079
19092
  const vec = [0, 0, 0];
19080
19093
  let v;
19081
19094
  if (pan[0] !== 0) {
19082
- const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$b));
19095
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$c));
19083
19096
  v = math.mulVec3Scalar(left, pan[0]);
19084
19097
  vec[0] += v[0];
19085
19098
  vec[1] += v[1];
@@ -19108,7 +19121,7 @@ class Camera extends Component {
19108
19121
  */
19109
19122
  zoom(delta) {
19110
19123
  const vec = math.subVec3(this._eye, this._look, tempVec3$6);
19111
- const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$b));
19124
+ const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$c));
19112
19125
  const newLenLook = Math.abs(lenLook + delta);
19113
19126
  if (newLenLook < 0.5) {
19114
19127
  return;
@@ -19570,7 +19583,7 @@ class Camera extends Component {
19570
19583
  }
19571
19584
 
19572
19585
  const tempVec4$9 = math.vec4();
19573
- const tempVec3a$1e = math.vec3();
19586
+ const tempVec3a$1f = math.vec3();
19574
19587
 
19575
19588
  /**
19576
19589
  * @private
@@ -19657,7 +19670,7 @@ class TrianglesDataTextureColorRenderer {
19657
19670
  if (active) {
19658
19671
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
19659
19672
  if (origin) {
19660
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
19673
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f);
19661
19674
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
19662
19675
  } else {
19663
19676
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20184,7 +20197,7 @@ class TrianglesDataTextureColorRenderer {
20184
20197
 
20185
20198
  const defaultColor$6 = new Float32Array([1, 1, 1]);
20186
20199
  math.vec4();
20187
- const tempVec3a$1d = math.vec3();
20200
+ const tempVec3a$1e = math.vec3();
20188
20201
 
20189
20202
  /**
20190
20203
  * @private
@@ -20292,7 +20305,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20292
20305
  if (active) {
20293
20306
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20294
20307
  if (origin) {
20295
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20308
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
20296
20309
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20297
20310
  } else {
20298
20311
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20648,7 +20661,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20648
20661
  }
20649
20662
  }
20650
20663
 
20651
- const tempVec3a$1c = math.vec3();
20664
+ const tempVec3a$1d = math.vec3();
20652
20665
  const defaultColor$5 = new Float32Array([0,0,0,1]);
20653
20666
 
20654
20667
  /**
@@ -20748,7 +20761,7 @@ class TrianglesDataTextureEdgesRenderer {
20748
20761
  if (active) {
20749
20762
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20750
20763
  if (origin) {
20751
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
20764
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20752
20765
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20753
20766
  } else {
20754
20767
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21067,7 +21080,7 @@ class TrianglesDataTextureEdgesRenderer {
21067
21080
  }
21068
21081
  }
21069
21082
 
21070
- const tempVec3a$1b = math.vec3();
21083
+ const tempVec3a$1c = math.vec3();
21071
21084
 
21072
21085
  /**
21073
21086
  * @private
@@ -21141,7 +21154,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21141
21154
  if (active) {
21142
21155
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21143
21156
  if (origin) {
21144
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21157
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
21145
21158
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21146
21159
  } else {
21147
21160
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21469,7 +21482,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21469
21482
  }
21470
21483
  }
21471
21484
 
21472
- const tempVec3a$1a = math.vec3();
21485
+ const tempVec3a$1b = math.vec3();
21473
21486
 
21474
21487
  /**
21475
21488
  * @private
@@ -21556,7 +21569,7 @@ class TrianglesDataTexturePickMeshRenderer {
21556
21569
  if (active) {
21557
21570
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21558
21571
  if (origin) {
21559
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
21572
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21560
21573
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21561
21574
  } else {
21562
21575
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21912,7 +21925,7 @@ class TrianglesDataTexturePickMeshRenderer {
21912
21925
  }
21913
21926
  }
21914
21927
 
21915
- const tempVec3a$19 = math.vec3();
21928
+ const tempVec3a$1a = math.vec3();
21916
21929
 
21917
21930
  /**
21918
21931
  * @private
@@ -22004,7 +22017,7 @@ class TrianglesDataTexturePickDepthRenderer {
22004
22017
  if (active) {
22005
22018
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22006
22019
  if (origin) {
22007
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22020
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
22008
22021
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22009
22022
  } else {
22010
22023
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -22363,7 +22376,7 @@ class TrianglesDataTexturePickDepthRenderer {
22363
22376
  }
22364
22377
  }
22365
22378
 
22366
- const tempVec3a$18 = math.vec3();
22379
+ const tempVec3a$19 = math.vec3();
22367
22380
 
22368
22381
  /**
22369
22382
  * @private
@@ -22455,7 +22468,7 @@ class TrianglesDataTexturePickNormalsRenderer {
22455
22468
  if (active) {
22456
22469
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22457
22470
  if (origin) {
22458
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
22471
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22459
22472
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22460
22473
  } else {
22461
22474
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23019,7 +23032,7 @@ class TrianglesDataTextureOcclusionRenderer {
23019
23032
  }
23020
23033
 
23021
23034
  math.vec4();
23022
- const tempVec3a$17 = math.vec3();
23035
+ const tempVec3a$18 = math.vec3();
23023
23036
 
23024
23037
  /**
23025
23038
  * @private
@@ -23104,7 +23117,7 @@ class TrianglesDataTextureDepthRenderer {
23104
23117
  if (active) {
23105
23118
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23106
23119
  if (origin) {
23107
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23120
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
23108
23121
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23109
23122
  } else {
23110
23123
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23475,7 +23488,7 @@ class TrianglesDataTextureDepthRenderer {
23475
23488
  }
23476
23489
  }
23477
23490
 
23478
- const tempVec3a$16 = math.vec3();
23491
+ const tempVec3a$17 = math.vec3();
23479
23492
 
23480
23493
  /**
23481
23494
  * @private
@@ -23538,7 +23551,7 @@ class TrianglesDataTextureNormalsRenderer {
23538
23551
  if (active) {
23539
23552
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23540
23553
  if (origin) {
23541
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
23554
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23542
23555
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23543
23556
  } else {
23544
23557
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23968,7 +23981,7 @@ class TrianglesDataTextureShadowRenderer {
23968
23981
  }
23969
23982
 
23970
23983
  const tempVec4$8 = math.vec4();
23971
- const tempVec3a$15 = math.vec3();
23984
+ const tempVec3a$16 = math.vec3();
23972
23985
 
23973
23986
  const TEXTURE_DECODE_FUNCS$2 = {
23974
23987
  "linear": "linearToLinear",
@@ -24039,7 +24052,7 @@ class TrianglesDataTextureColorQualityRenderer {
24039
24052
  if (active) {
24040
24053
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24041
24054
  if (origin) {
24042
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24055
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
24043
24056
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24044
24057
  } else {
24045
24058
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -24778,7 +24791,7 @@ class TrianglesDataTextureColorQualityRenderer {
24778
24791
  }
24779
24792
  }
24780
24793
 
24781
- const tempVec3a$14 = math.vec3();
24794
+ const tempVec3a$15 = math.vec3();
24782
24795
 
24783
24796
  /**
24784
24797
  * @private
@@ -24892,7 +24905,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
24892
24905
  if (active) {
24893
24906
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24894
24907
  if (origin) {
24895
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$14);
24908
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24896
24909
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24897
24910
  } else {
24898
24911
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -27611,6 +27624,12 @@ const MAX_DATA_TEXTURE_HEIGHT = (1 << 12);
27611
27624
  */
27612
27625
  const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
27613
27626
 
27627
+ /**
27628
+ * Number of maximum allowed per-object flags update per render frame
27629
+ * before switching to batch update mode.
27630
+ */
27631
+ const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
27632
+
27614
27633
  const identityMatrix = math.identityMat4();
27615
27634
  math.mat4();
27616
27635
  math.mat4();
@@ -27623,8 +27642,8 @@ const tempUint8Array4 = new Uint8Array (4);
27623
27642
 
27624
27643
  const tempFloat32Array3 = new Float32Array (3);
27625
27644
 
27626
- const tempVec3a$13 = math.vec3();
27627
- const tempVec3b$a = math.vec3();
27645
+ const tempVec3a$14 = math.vec3();
27646
+ const tempVec3b$b = math.vec3();
27628
27647
  const tempVec3c$7 = math.vec3();
27629
27648
  const tempVec3d$3 = math.vec3();
27630
27649
  const tempVec3e$2 = math.vec3();
@@ -27638,7 +27657,7 @@ let _numberOfLayers = 0;
27638
27657
  */
27639
27658
  class TrianglesDataTextureLayer {
27640
27659
  /**
27641
- * @param model
27660
+ * @param {DataTextureSceneModel} model
27642
27661
  * @param cfg
27643
27662
  * @param cfg.layerIndex
27644
27663
  * @param cfg.positionsDecodeMatrix
@@ -27728,6 +27747,12 @@ class TrianglesDataTextureLayer {
27728
27747
  * @type {*|Float64Array}
27729
27748
  */
27730
27749
  this.aabb = math.collapseAABB3();
27750
+
27751
+ /**
27752
+ * The number of updates in the current frame;
27753
+ * @type {number}
27754
+ */
27755
+ this.numUpdatesInFrame = 0;
27731
27756
  }
27732
27757
 
27733
27758
  /**
@@ -28439,6 +28464,18 @@ class TrianglesDataTextureLayer {
28439
28464
 
28440
28465
  this._finalized = true;
28441
28466
  }
28467
+
28468
+ attachToRenderingEvent() {
28469
+ const self = this;
28470
+
28471
+ this.model.scene.on ("rendering", function () {
28472
+ if (self._deferredSetFlagsDirty)
28473
+ {
28474
+ self.commitDeferredFlags();
28475
+ }
28476
+ self.numUpdatesInFrame = 0;
28477
+ });
28478
+ }
28442
28479
 
28443
28480
  isEmpty() {
28444
28481
  return this._numPortions == 0;
@@ -28589,6 +28626,8 @@ class TrianglesDataTextureLayer {
28589
28626
  * In massive "set-flags" scenarios like VFC or LOD mechanisms, the combina-
28590
28627
  * tion of `beginDeferredFlags` + `commitDeferredFlags`brings a speed-up of
28591
28628
  * up to 80x when e.g. objects are massively (un)culled 🚀.
28629
+ *
28630
+ * @private
28592
28631
  */
28593
28632
  beginDeferredFlags ()
28594
28633
  {
@@ -28600,6 +28639,8 @@ class TrianglesDataTextureLayer {
28600
28639
  *
28601
28640
  * Invoking this method will update the colors+flags texture data with new
28602
28641
  * flags/flags2 set since the previous invocation of `beginDeferredFlags`.
28642
+ *
28643
+ * @private
28603
28644
  */
28604
28645
  commitDeferredFlags ()
28605
28646
  {
@@ -28715,6 +28756,11 @@ class TrianglesDataTextureLayer {
28715
28756
  this._deferredSetFlagsDirty = true;
28716
28757
  return;
28717
28758
  }
28759
+
28760
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28761
+ {
28762
+ this.beginDeferredFlags();
28763
+ }
28718
28764
 
28719
28765
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28720
28766
 
@@ -28841,6 +28887,11 @@ class TrianglesDataTextureLayer {
28841
28887
  return;
28842
28888
  }
28843
28889
 
28890
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28891
+ {
28892
+ this.beginDeferredFlags();
28893
+ }
28894
+
28844
28895
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28845
28896
 
28846
28897
  gl.texSubImage2D(
@@ -28895,6 +28946,11 @@ class TrianglesDataTextureLayer {
28895
28946
  this._deferredSetFlagsDirty = true;
28896
28947
  return;
28897
28948
  }
28949
+
28950
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28951
+ {
28952
+ this.beginDeferredFlags();
28953
+ }
28898
28954
 
28899
28955
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28900
28956
 
@@ -28952,6 +29008,11 @@ class TrianglesDataTextureLayer {
28952
29008
  this._deferredSetFlagsDirty = true;
28953
29009
  return;
28954
29010
  }
29011
+
29012
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
29013
+ {
29014
+ this.beginDeferredFlags();
29015
+ }
28955
29016
 
28956
29017
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdOffsets._texture);
28957
29018
 
@@ -29207,8 +29268,8 @@ class TrianglesDataTextureLayer {
29207
29268
  const origin = state.origin;
29208
29269
  const offset = portion.offset;
29209
29270
 
29210
- const rtcRayOrigin = tempVec3a$13;
29211
- const rtcRayDir = tempVec3b$a;
29271
+ const rtcRayOrigin = tempVec3a$14;
29272
+ const rtcRayDir = tempVec3b$b;
29212
29273
 
29213
29274
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$7) : worldRayOrigin); // World -> RTC
29214
29275
  rtcRayDir.set(worldRayDir);
@@ -29906,10 +29967,8 @@ class LodCullingManager {
29906
29967
  applyLodCulling (currentFPS)
29907
29968
  {
29908
29969
  let lodState = this.lodState;
29909
- const model = this.model;
29970
+ this.model;
29910
29971
 
29911
- model.beginDeferredFlagsInAllLayers ();
29912
-
29913
29972
  let retVal = false;
29914
29973
 
29915
29974
  if (currentFPS < lodState.targetFps)
@@ -29929,8 +29988,6 @@ class LodCullingManager {
29929
29988
  }
29930
29989
  }
29931
29990
 
29932
- model.commitDeferredFlagsInAllLayers ();
29933
-
29934
29991
  if (retVal) {
29935
29992
  console.log ("LOD level = " + lodState.lodLevelIndex);
29936
29993
  }
@@ -29940,10 +29997,8 @@ class LodCullingManager {
29940
29997
 
29941
29998
  resetLodCulling ()
29942
29999
  {
29943
- const model = this.model;
30000
+ this.model;
29944
30001
 
29945
- model.beginDeferredFlagsInAllLayers ();
29946
-
29947
30002
  let retVal = false;
29948
30003
 
29949
30004
  let decreasedLevel = false;
@@ -29952,8 +30007,6 @@ class LodCullingManager {
29952
30007
  retVal |= (decreasedLevel = this._decreaseLODLevelIndex());
29953
30008
  } while (decreasedLevel);
29954
30009
 
29955
- model.commitDeferredFlagsInAllLayers ();
29956
-
29957
30010
  if (retVal) {
29958
30011
  console.log ("LOD resetted");
29959
30012
  }
@@ -31671,16 +31724,12 @@ const VISIBILITY_CHECK_ENVOLVES_V = (1 << 14);
31671
31724
  const internalNodesList = this._internalNodesList;
31672
31725
  const lastVisibleFrameOfNodes = this._lastVisibleFrameOfNodes;
31673
31726
 
31674
- model.beginDeferredFlagsInAllLayers ();
31675
-
31676
31727
  for (let i = 0, len = internalNodesList.length; i < len; i++)
31677
31728
  {
31678
31729
  if (internalNodesList[i]) {
31679
31730
  internalNodesList[i].culledVFC = lastVisibleFrameOfNodes[i] !== cullFrame;
31680
31731
  }
31681
31732
  }
31682
-
31683
- model.commitDeferredFlagsInAllLayers ();
31684
31733
  }
31685
31734
 
31686
31735
  /**
@@ -32069,7 +32118,7 @@ class ViewFrustumCullingManager {
32069
32118
 
32070
32119
  WEBGL_INFO.SUPPORTED_EXTENSIONS["ANGLE_instanced_arrays"];
32071
32120
 
32072
- const tempVec3a$12 = math.vec3();
32121
+ const tempVec3a$13 = math.vec3();
32073
32122
  const tempMat4$3 = math.mat4();
32074
32123
 
32075
32124
  const defaultScale$1 = math.vec3([1, 1, 1]);
@@ -33041,7 +33090,7 @@ class DataTextureSceneModel extends Component {
33041
33090
  }
33042
33091
 
33043
33092
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
33044
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$12) : this._origin;
33093
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$13) : this._origin;
33045
33094
 
33046
33095
  switch (primitive) {
33047
33096
  case "triangles":
@@ -33305,7 +33354,7 @@ class DataTextureSceneModel extends Component {
33305
33354
  if (!origin) {
33306
33355
  origin = cfgOrigin;
33307
33356
  } else {
33308
- origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$12);
33357
+ origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$13);
33309
33358
  }
33310
33359
  } else {
33311
33360
  origin = this._origin;
@@ -33497,8 +33546,6 @@ class DataTextureSceneModel extends Component {
33497
33546
  return;
33498
33547
  }
33499
33548
 
33500
- this.beginDeferredFlagsInAllLayers ();
33501
-
33502
33549
  if (this._vfcManager) {
33503
33550
  this._vfcManager.finalize (
33504
33551
  function () {
@@ -33527,9 +33574,7 @@ class DataTextureSceneModel extends Component {
33527
33574
  node._finalize2();
33528
33575
  }
33529
33576
 
33530
-
33531
33577
  // Sort layers to reduce WebGL shader switching when rendering them
33532
-
33533
33578
  this._layerList.sort((a, b) => {
33534
33579
  if (a.sortId < b.sortId) {
33535
33580
  return -1;
@@ -33545,8 +33590,6 @@ class DataTextureSceneModel extends Component {
33545
33590
  layer.layerIndex = i;
33546
33591
  }
33547
33592
 
33548
- this.commitDeferredFlagsInAllLayers ();
33549
-
33550
33593
  this.glRedraw();
33551
33594
 
33552
33595
  this.scene._aabbDirty = true;
@@ -33561,6 +33604,11 @@ class DataTextureSceneModel extends Component {
33561
33604
  this._targetLodFps
33562
33605
  );
33563
33606
  }
33607
+
33608
+ for (let i = 0, len = this._layerList.length; i < len; i++) {
33609
+ const layer = this._layerList[i];
33610
+ layer.attachToRenderingEvent();
33611
+ }
33564
33612
  }
33565
33613
 
33566
33614
  _rebuildAABB() {
@@ -33603,33 +33651,6 @@ class DataTextureSceneModel extends Component {
33603
33651
  }
33604
33652
  }
33605
33653
 
33606
- /**
33607
- * This will start a "set-flags transaction" in all Layers of this Model.
33608
- */
33609
- beginDeferredFlagsInAllLayers ()
33610
- {
33611
- for (let i = 0, len = this._layerList.length; i < len; i++)
33612
- {
33613
- const layer = this._layerList[i];
33614
-
33615
- layer.beginDeferredFlags ();
33616
- }
33617
- }
33618
-
33619
- /**
33620
- * This will commit any previously started "set-flags transaction" in all
33621
- * Layers of this Model.
33622
- */
33623
- commitDeferredFlagsInAllLayers ()
33624
- {
33625
- for (let i = 0, len = this._layerList.length; i < len; i++)
33626
- {
33627
- const layer = this._layerList[i];
33628
-
33629
- layer.commitDeferredFlags ();
33630
- }
33631
- }
33632
-
33633
33654
  /** @private */
33634
33655
  _getActiveSectionPlanesForLayer(layer) {
33635
33656
 
@@ -45962,7 +45983,7 @@ function buildFragmentDraw(mesh) {
45962
45983
  * @author xeolabs / https://github.com/xeolabs
45963
45984
  */
45964
45985
 
45965
- const tempVec3a$11 = math.vec3();
45986
+ const tempVec3a$12 = math.vec3();
45966
45987
 
45967
45988
  const ids$2 = new Map$1({});
45968
45989
 
@@ -46061,7 +46082,7 @@ DrawRenderer.prototype.drawMesh = function (frameCtx, mesh) {
46061
46082
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
46062
46083
  if (active) {
46063
46084
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
46064
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
46085
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$12) : sectionPlane.pos);
46065
46086
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
46066
46087
  }
46067
46088
  }
@@ -47199,7 +47220,7 @@ function buildFragment$5(mesh) {
47199
47220
 
47200
47221
  const ids$1 = new Map$1({});
47201
47222
 
47202
- const tempVec3a$10 = math.vec3();
47223
+ const tempVec3a$11 = math.vec3();
47203
47224
 
47204
47225
  /**
47205
47226
  * @private
@@ -47283,7 +47304,7 @@ EmphasisFillRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47283
47304
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47284
47305
  if (active) {
47285
47306
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47286
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47307
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
47287
47308
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47288
47309
  }
47289
47310
  }
@@ -47619,7 +47640,7 @@ function buildFragment$4(mesh) {
47619
47640
 
47620
47641
  const ids = new Map$1({});
47621
47642
 
47622
- const tempVec3a$$ = math.vec3();
47643
+ const tempVec3a$10 = math.vec3();
47623
47644
 
47624
47645
  /**
47625
47646
  * @private
@@ -47702,7 +47723,7 @@ EmphasisEdgesRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47702
47723
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47703
47724
  if (active) {
47704
47725
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47705
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
47726
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47706
47727
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47707
47728
  }
47708
47729
  }
@@ -47997,7 +48018,7 @@ function buildFragment$3(mesh) {
47997
48018
  * @author xeolabs / https://github.com/xeolabs
47998
48019
  */
47999
48020
 
48000
- const tempVec3a$_ = math.vec3();
48021
+ const tempVec3a$$ = math.vec3();
48001
48022
 
48002
48023
  // No ID, because there is exactly one PickMeshRenderer per scene
48003
48024
 
@@ -48081,7 +48102,7 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48081
48102
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48082
48103
  if (active) {
48083
48104
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48084
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48105
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
48085
48106
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48086
48107
  }
48087
48108
  }
@@ -48314,7 +48335,7 @@ function buildFragment$2(mesh) {
48314
48335
  * @author xeolabs / https://github.com/xeolabs
48315
48336
  */
48316
48337
 
48317
- const tempVec3a$Z = math.vec3();
48338
+ const tempVec3a$_ = math.vec3();
48318
48339
 
48319
48340
  /**
48320
48341
  * @private
@@ -48406,7 +48427,7 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48406
48427
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48407
48428
  if (active) {
48408
48429
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48409
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48430
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48410
48431
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48411
48432
  }
48412
48433
  }
@@ -48643,7 +48664,7 @@ function buildFragment$1(mesh) {
48643
48664
  * @author xeolabs / https://github.com/xeolabs
48644
48665
  */
48645
48666
 
48646
- const tempVec3a$Y = math.vec3();
48667
+ const tempVec3a$Z = math.vec3();
48647
48668
 
48648
48669
  // No ID, because there is exactly one PickMeshRenderer per scene
48649
48670
 
@@ -48751,7 +48772,7 @@ OcclusionRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48751
48772
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48752
48773
  if (active) {
48753
48774
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48754
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Y) : sectionPlane.pos);
48775
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48755
48776
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48756
48777
  }
48757
48778
  }
@@ -61353,8 +61374,8 @@ class LineSet extends Component {
61353
61374
  }
61354
61375
 
61355
61376
  const tempVec3$4 = math.vec3();
61356
- const tempVec3a$X = math.vec3();
61357
- const tempVec3b$9 = math.vec3();
61377
+ const tempVec3a$Y = math.vec3();
61378
+ const tempVec3b$a = math.vec3();
61358
61379
  const tempVec3c$6 = math.vec3();
61359
61380
 
61360
61381
  /**
@@ -62034,8 +62055,8 @@ class BCFViewpointsPlugin extends Plugin {
62034
62055
  bcfViewpoint.bitmaps.forEach(function (e) {
62035
62056
  const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
62036
62057
  const bitmap_data = e.bitmap_data; // base64
62037
- let location = xyzObjectToArray(e.location, tempVec3a$X);
62038
- let normal = xyzObjectToArray(e.normal, tempVec3b$9);
62058
+ let location = xyzObjectToArray(e.location, tempVec3a$Y);
62059
+ let normal = xyzObjectToArray(e.normal, tempVec3b$a);
62039
62060
  let up = xyzObjectToArray(e.up, tempVec3c$6);
62040
62061
  let height = e.height || 1;
62041
62062
  if (!bitmap_type) {
@@ -63924,7 +63945,7 @@ class SplineCurve extends Curve {
63924
63945
  }
63925
63946
  }
63926
63947
 
63927
- const tempVec3a$W = math.vec3();
63948
+ const tempVec3a$X = math.vec3();
63928
63949
 
63929
63950
  /**
63930
63951
  * @desc Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
@@ -64056,9 +64077,9 @@ class CameraPath extends Component {
64056
64077
  t = t / (this._frames[this._frames.length - 1].t - this._frames[0].t);
64057
64078
  t = t < 0.0 ? 0.0 : (t > 1.0 ? 1.0 : t);
64058
64079
 
64059
- camera.eye = this._eyeCurve.getPoint(t, tempVec3a$W);
64060
- camera.look = this._lookCurve.getPoint(t, tempVec3a$W);
64061
- camera.up = this._upCurve.getPoint(t, tempVec3a$W);
64080
+ camera.eye = this._eyeCurve.getPoint(t, tempVec3a$X);
64081
+ camera.look = this._lookCurve.getPoint(t, tempVec3a$X);
64082
+ camera.up = this._upCurve.getPoint(t, tempVec3a$X);
64062
64083
  }
64063
64084
 
64064
64085
  /**
@@ -65097,7 +65118,7 @@ CameraPathAnimation.PLAYING = 2;
65097
65118
  CameraPathAnimation.PLAYING_TO = 3;
65098
65119
 
65099
65120
  const tempVec3$2 = math.vec3();
65100
- const tempVec3b$8 = math.vec3();
65121
+ const tempVec3b$9 = math.vec3();
65101
65122
  math.vec3();
65102
65123
  const zeroVec$1 = math.vec3([0, -1, 0]);
65103
65124
  const tempQuat = math.vec4([0, 0, 0, 1]);
@@ -65525,7 +65546,7 @@ class ImagePlane extends Component {
65525
65546
  const dist = -math.dotVec3(negDir, tempVec3$2);
65526
65547
 
65527
65548
  math.normalizeVec3(negDir);
65528
- math.mulVec3Scalar(negDir, dist, tempVec3b$8);
65549
+ math.mulVec3Scalar(negDir, dist, tempVec3b$9);
65529
65550
  math.vec3PairToQuaternion(zeroVec$1, dir, tempQuat);
65530
65551
 
65531
65552
  this._node.quaternion = tempQuat;
@@ -66691,8 +66712,8 @@ class SpriteMarker extends Marker {
66691
66712
  }
66692
66713
  }
66693
66714
 
66694
- const tempVec3a$V = math.vec3();
66695
- const tempVec3b$7 = math.vec3();
66715
+ const tempVec3a$W = math.vec3();
66716
+ const tempVec3b$8 = math.vec3();
66696
66717
  const tempMat4a = math.mat4();
66697
66718
 
66698
66719
  /**
@@ -66769,8 +66790,8 @@ function frustumIntersectsAABB3(frustum, aabb) {
66769
66790
 
66770
66791
  let ret = Frustum.INSIDE;
66771
66792
 
66772
- const min = tempVec3a$V;
66773
- const max = tempVec3b$7;
66793
+ const min = tempVec3a$W;
66794
+ const max = tempVec3b$8;
66774
66795
 
66775
66796
  min[0] = aabb[0];
66776
66797
  min[1] = aabb[1];
@@ -69351,7 +69372,7 @@ const RENDER_PASSES = {
69351
69372
  };
69352
69373
 
69353
69374
  const tempVec4$7 = math.vec4();
69354
- const tempVec3a$U = math.vec3();
69375
+ const tempVec3a$V = math.vec3();
69355
69376
 
69356
69377
  /**
69357
69378
  * @private
@@ -69416,7 +69437,7 @@ class TrianglesBatchingColorRenderer {
69416
69437
  if (active) {
69417
69438
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69418
69439
  if (origin) {
69419
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69440
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$V);
69420
69441
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69421
69442
  } else {
69422
69443
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -69844,7 +69865,7 @@ class TrianglesBatchingColorRenderer {
69844
69865
  }
69845
69866
 
69846
69867
  const tempVec4$6 = math.vec4();
69847
- const tempVec3a$T = math.vec3();
69868
+ const tempVec3a$U = math.vec3();
69848
69869
 
69849
69870
  /**
69850
69871
  * @private
@@ -69906,7 +69927,7 @@ class TrianglesBatchingFlatColorRenderer {
69906
69927
  if (active) {
69907
69928
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69908
69929
  if (origin) {
69909
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
69930
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69910
69931
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69911
69932
  } else {
69912
69933
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70323,7 +70344,7 @@ class TrianglesBatchingFlatColorRenderer {
70323
70344
  }
70324
70345
 
70325
70346
  const defaultColor$4 = new Float32Array([1, 1, 1]);
70326
- const tempVec3a$S = math.vec3();
70347
+ const tempVec3a$T = math.vec3();
70327
70348
 
70328
70349
  /**
70329
70350
  * @private
@@ -70407,7 +70428,7 @@ class TrianglesBatchingSilhouetteRenderer {
70407
70428
  if (active) {
70408
70429
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70409
70430
  if (origin) {
70410
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70431
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
70411
70432
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70412
70433
  } else {
70413
70434
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70644,7 +70665,7 @@ class TrianglesBatchingSilhouetteRenderer {
70644
70665
  }
70645
70666
  }
70646
70667
 
70647
- const tempVec3a$R = math.vec3();
70668
+ const tempVec3a$S = math.vec3();
70648
70669
  const defaultColor$3 = new Float32Array([0,0,0,1]);
70649
70670
 
70650
70671
  /**
@@ -70727,7 +70748,7 @@ class TrianglesBatchingEdgesRenderer {
70727
70748
  if (active) {
70728
70749
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70729
70750
  if (origin) {
70730
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
70751
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70731
70752
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70732
70753
  } else {
70733
70754
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70955,7 +70976,7 @@ class TrianglesBatchingEdgesRenderer {
70955
70976
  }
70956
70977
  }
70957
70978
 
70958
- const tempVec3a$Q = math.vec3();
70979
+ const tempVec3a$R = math.vec3();
70959
70980
 
70960
70981
  /**
70961
70982
  * @private
@@ -71015,7 +71036,7 @@ class TrianglesBatchingEdgesColorRenderer {
71015
71036
  if (active) {
71016
71037
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71017
71038
  if (origin) {
71018
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71039
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
71019
71040
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71020
71041
  } else {
71021
71042
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71243,7 +71264,7 @@ class TrianglesBatchingEdgesColorRenderer {
71243
71264
  }
71244
71265
  }
71245
71266
 
71246
- const tempVec3a$P = math.vec3();
71267
+ const tempVec3a$Q = math.vec3();
71247
71268
 
71248
71269
  /**
71249
71270
  * @private
@@ -71309,7 +71330,7 @@ class TrianglesBatchingPickMeshRenderer {
71309
71330
  if (active) {
71310
71331
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71311
71332
  if (origin) {
71312
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71333
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71313
71334
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71314
71335
  } else {
71315
71336
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71539,7 +71560,7 @@ class TrianglesBatchingPickMeshRenderer {
71539
71560
  }
71540
71561
  }
71541
71562
 
71542
- const tempVec3a$O = math.vec3();
71563
+ const tempVec3a$P = math.vec3();
71543
71564
 
71544
71565
  /**
71545
71566
  * @private
@@ -71610,7 +71631,7 @@ class TrianglesBatchingPickDepthRenderer {
71610
71631
  if (active) {
71611
71632
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71612
71633
  if (origin) {
71613
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71634
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71614
71635
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71615
71636
  } else {
71616
71637
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71848,7 +71869,7 @@ class TrianglesBatchingPickDepthRenderer {
71848
71869
  }
71849
71870
  }
71850
71871
 
71851
- const tempVec3a$N = math.vec3();
71872
+ const tempVec3a$O = math.vec3();
71852
71873
 
71853
71874
  /**
71854
71875
  * @private
@@ -71916,7 +71937,7 @@ class TrianglesBatchingPickNormalsRenderer {
71916
71937
  if (active) {
71917
71938
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71918
71939
  if (origin) {
71919
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
71940
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71920
71941
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71921
71942
  } else {
71922
71943
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72141,7 +72162,7 @@ class TrianglesBatchingPickNormalsRenderer {
72141
72162
  }
72142
72163
  }
72143
72164
 
72144
- const tempVec3a$M = math.vec3();
72165
+ const tempVec3a$N = math.vec3();
72145
72166
 
72146
72167
  /**
72147
72168
  * @private
@@ -72201,7 +72222,7 @@ class TrianglesBatchingOcclusionRenderer {
72201
72222
  if (active) {
72202
72223
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72203
72224
  if (origin) {
72204
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72225
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
72205
72226
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72206
72227
  } else {
72207
72228
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72424,7 +72445,7 @@ class TrianglesBatchingOcclusionRenderer {
72424
72445
  }
72425
72446
  }
72426
72447
 
72427
- const tempVec3a$L = math.vec3();
72448
+ const tempVec3a$M = math.vec3();
72428
72449
 
72429
72450
  /**
72430
72451
  * @private
@@ -72484,7 +72505,7 @@ class TrianglesBatchingDepthRenderer {
72484
72505
  if (active) {
72485
72506
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72486
72507
  if (origin) {
72487
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72508
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72488
72509
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72489
72510
  } else {
72490
72511
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72708,7 +72729,7 @@ class TrianglesBatchingDepthRenderer {
72708
72729
  }
72709
72730
  }
72710
72731
 
72711
- const tempVec3a$K = math.vec3();
72732
+ const tempVec3a$L = math.vec3();
72712
72733
 
72713
72734
  /**
72714
72735
  * @private
@@ -72771,7 +72792,7 @@ class TrianglesBatchingNormalsRenderer {
72771
72792
  if (active) {
72772
72793
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72773
72794
  if (origin) {
72774
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
72795
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72775
72796
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72776
72797
  } else {
72777
72798
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73011,7 +73032,7 @@ class TrianglesBatchingNormalsRenderer {
73011
73032
  }
73012
73033
  }
73013
73034
 
73014
- const tempVec3a$J = math.vec3();
73035
+ const tempVec3a$K = math.vec3();
73015
73036
 
73016
73037
  /**
73017
73038
  * Renders BatchingLayer fragment depths to a shadow map.
@@ -73080,7 +73101,7 @@ class TrianglesBatchingShadowRenderer {
73080
73101
  if (active) {
73081
73102
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73082
73103
  if (origin) {
73083
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73104
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
73084
73105
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73085
73106
  } else {
73086
73107
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73252,7 +73273,7 @@ class TrianglesBatchingShadowRenderer {
73252
73273
  }
73253
73274
 
73254
73275
  const tempVec4$5 = math.vec4();
73255
- const tempVec3a$I = math.vec3();
73276
+ const tempVec3a$J = math.vec3();
73256
73277
 
73257
73278
  // const TEXTURE_DECODE_FUNCS = {};
73258
73279
  // TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -73325,7 +73346,7 @@ class TrianglesBatchingPBRRenderer {
73325
73346
  if (active) {
73326
73347
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73327
73348
  if (origin) {
73328
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
73349
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73329
73350
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73330
73351
  } else {
73331
73352
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74130,7 +74151,7 @@ class TrianglesBatchingPBRRenderer {
74130
74151
  }
74131
74152
  }
74132
74153
 
74133
- const tempVec3a$H = math.vec3();
74154
+ const tempVec3a$I = math.vec3();
74134
74155
 
74135
74156
  /**
74136
74157
  * @private
@@ -74197,7 +74218,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74197
74218
  if (active) {
74198
74219
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74199
74220
  if (origin) {
74200
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74221
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
74201
74222
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74202
74223
  } else {
74203
74224
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74407,7 +74428,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74407
74428
  }
74408
74429
 
74409
74430
  const tempVec4$4 = math.vec4();
74410
- const tempVec3a$G = math.vec3();
74431
+ const tempVec3a$H = math.vec3();
74411
74432
 
74412
74433
  /**
74413
74434
  * @private
@@ -74472,7 +74493,7 @@ class TrianglesBatchingColorTextureRenderer {
74472
74493
  if (active) {
74473
74494
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74474
74495
  if (origin) {
74475
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$G);
74496
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74476
74497
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74477
74498
  } else {
74478
74499
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -75478,8 +75499,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
75478
75499
  const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
75479
75500
  const tempOBB3$2 = math.OBB3();
75480
75501
 
75481
- const tempVec3a$F = math.vec3();
75482
- const tempVec3b$6 = math.vec3();
75502
+ const tempVec3a$G = math.vec3();
75503
+ const tempVec3b$7 = math.vec3();
75483
75504
  const tempVec3c$5 = math.vec3();
75484
75505
  const tempVec3d$2 = math.vec3();
75485
75506
  const tempVec3e$1 = math.vec3();
@@ -76658,8 +76679,8 @@ class TrianglesBatchingLayer {
76658
76679
  const origin = state.origin;
76659
76680
  const offset = portion.offset;
76660
76681
 
76661
- const rtcRayOrigin = tempVec3a$F;
76662
- const rtcRayDir = tempVec3b$6;
76682
+ const rtcRayOrigin = tempVec3a$G;
76683
+ const rtcRayDir = tempVec3b$7;
76663
76684
 
76664
76685
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
76665
76686
  rtcRayDir.set(worldRayDir);
@@ -76782,7 +76803,7 @@ class TrianglesBatchingLayer {
76782
76803
  }
76783
76804
 
76784
76805
  const tempVec4$3 = math.vec4();
76785
- const tempVec3a$E = math.vec3();
76806
+ const tempVec3a$F = math.vec3();
76786
76807
 
76787
76808
  /**
76788
76809
  * @private
@@ -76848,7 +76869,7 @@ class TrianglesInstancingColorRenderer {
76848
76869
  if (active) {
76849
76870
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
76850
76871
  if (origin) {
76851
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
76872
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$F);
76852
76873
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76853
76874
  } else {
76854
76875
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77325,7 +77346,7 @@ class TrianglesInstancingColorRenderer {
77325
77346
  }
77326
77347
 
77327
77348
  const tempVec4$2 = math.vec4();
77328
- const tempVec3a$D = math.vec3();
77349
+ const tempVec3a$E = math.vec3();
77329
77350
 
77330
77351
  /**
77331
77352
  * @private
@@ -77387,7 +77408,7 @@ class TrianglesInstancingFlatColorRenderer {
77387
77408
  if (active) {
77388
77409
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77389
77410
  if (origin) {
77390
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77411
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
77391
77412
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77392
77413
  } else {
77393
77414
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77834,7 +77855,7 @@ class TrianglesInstancingFlatColorRenderer {
77834
77855
  }
77835
77856
  }
77836
77857
 
77837
- const tempVec3a$C = math.vec3();
77858
+ const tempVec3a$D = math.vec3();
77838
77859
 
77839
77860
  /**
77840
77861
  * @private
@@ -77917,7 +77938,7 @@ class TrianglesInstancingSilhouetteRenderer {
77917
77938
  if (active) {
77918
77939
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77919
77940
  if (origin) {
77920
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
77941
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77921
77942
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77922
77943
  } else {
77923
77944
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78189,7 +78210,7 @@ class TrianglesInstancingSilhouetteRenderer {
78189
78210
  }
78190
78211
  }
78191
78212
 
78192
- const tempVec3a$B = math.vec3();
78213
+ const tempVec3a$C = math.vec3();
78193
78214
  const defaultColor$2 = new Float32Array([0,0,0,1]);
78194
78215
 
78195
78216
  /**
@@ -78273,7 +78294,7 @@ class TrianglesInstancingEdgesRenderer {
78273
78294
  if (active) {
78274
78295
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78275
78296
  if (origin) {
78276
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78297
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
78277
78298
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78278
78299
  } else {
78279
78300
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78534,7 +78555,7 @@ class TrianglesInstancingEdgesRenderer {
78534
78555
  }
78535
78556
  }
78536
78557
 
78537
- const tempVec3a$A = math.vec3();
78558
+ const tempVec3a$B = math.vec3();
78538
78559
 
78539
78560
  /**
78540
78561
  * @private
@@ -78595,7 +78616,7 @@ class TrianglesInstancingEdgesColorRenderer {
78595
78616
  if (active) {
78596
78617
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78597
78618
  if (origin) {
78598
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78619
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78599
78620
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78600
78621
  } else {
78601
78622
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78861,7 +78882,7 @@ class TrianglesInstancingEdgesColorRenderer {
78861
78882
  }
78862
78883
  }
78863
78884
 
78864
- const tempVec3a$z = math.vec3();
78885
+ const tempVec3a$A = math.vec3();
78865
78886
 
78866
78887
  /**
78867
78888
  * @private
@@ -78964,7 +78985,7 @@ class TrianglesInstancingPickMeshRenderer {
78964
78985
  if (active) {
78965
78986
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78966
78987
  if (origin) {
78967
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
78988
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78968
78989
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78969
78990
  } else {
78970
78991
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79199,7 +79220,7 @@ class TrianglesInstancingPickMeshRenderer {
79199
79220
  }
79200
79221
  }
79201
79222
 
79202
- const tempVec3a$y = math.vec3();
79223
+ const tempVec3a$z = math.vec3();
79203
79224
 
79204
79225
  /**
79205
79226
  * @private
@@ -79276,7 +79297,7 @@ class TrianglesInstancingPickDepthRenderer {
79276
79297
  if (active) {
79277
79298
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79278
79299
  if (origin) {
79279
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79300
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
79280
79301
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79281
79302
  } else {
79282
79303
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79544,7 +79565,7 @@ class TrianglesInstancingPickDepthRenderer {
79544
79565
  }
79545
79566
  }
79546
79567
 
79547
- const tempVec3a$x = math.vec3();
79568
+ const tempVec3a$y = math.vec3();
79548
79569
 
79549
79570
  /**
79550
79571
  * @private
@@ -79621,7 +79642,7 @@ class TrianglesInstancingPickNormalsRenderer {
79621
79642
  if (active) {
79622
79643
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79623
79644
  if (origin) {
79624
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79645
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79625
79646
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79626
79647
  } else {
79627
79648
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79898,7 +79919,7 @@ class TrianglesInstancingPickNormalsRenderer {
79898
79919
  }
79899
79920
  }
79900
79921
 
79901
- const tempVec3a$w = math.vec3();
79922
+ const tempVec3a$x = math.vec3();
79902
79923
 
79903
79924
  /**
79904
79925
  * @private
@@ -79959,7 +79980,7 @@ class TrianglesInstancingOcclusionRenderer {
79959
79980
  if (active) {
79960
79981
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79961
79982
  if (origin) {
79962
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
79983
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79963
79984
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79964
79985
  } else {
79965
79986
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80217,7 +80238,7 @@ class TrianglesInstancingOcclusionRenderer {
80217
80238
  }
80218
80239
  }
80219
80240
 
80220
- const tempVec3a$v = math.vec3();
80241
+ const tempVec3a$w = math.vec3();
80221
80242
 
80222
80243
  /**
80223
80244
  * @private
@@ -80278,7 +80299,7 @@ class TrianglesInstancingDepthRenderer {
80278
80299
  if (active) {
80279
80300
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80280
80301
  if (origin) {
80281
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80302
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
80282
80303
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80283
80304
  } else {
80284
80305
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80528,7 +80549,7 @@ class TrianglesInstancingDepthRenderer {
80528
80549
  }
80529
80550
  }
80530
80551
 
80531
- const tempVec3a$u = math.vec3();
80552
+ const tempVec3a$v = math.vec3();
80532
80553
 
80533
80554
  /**
80534
80555
  * @private
@@ -80592,7 +80613,7 @@ class TrianglesInstancingNormalsRenderer {
80592
80613
  if (active) {
80593
80614
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80594
80615
  if (origin) {
80595
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80616
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80596
80617
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80597
80618
  } else {
80598
80619
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80872,7 +80893,7 @@ class TrianglesInstancingNormalsRenderer {
80872
80893
  }
80873
80894
  }
80874
80895
 
80875
- const tempVec3a$t = math.vec3();
80896
+ const tempVec3a$u = math.vec3();
80876
80897
 
80877
80898
  /**
80878
80899
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -80959,7 +80980,7 @@ class TrianglesInstancingShadowRenderer {
80959
80980
  if (active) {
80960
80981
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80961
80982
  if (origin) {
80962
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
80983
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80963
80984
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80964
80985
  } else {
80965
80986
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -81152,7 +81173,7 @@ class TrianglesInstancingShadowRenderer {
81152
81173
  }
81153
81174
 
81154
81175
  const tempVec4$1 = math.vec4();
81155
- const tempVec3a$s = math.vec3();
81176
+ const tempVec3a$t = math.vec3();
81156
81177
 
81157
81178
  const TEXTURE_DECODE_FUNCS = {};
81158
81179
  TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -81226,7 +81247,7 @@ class TrianglesInstancingPBRRenderer {
81226
81247
  if (active) {
81227
81248
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
81228
81249
  if (origin) {
81229
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
81250
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
81230
81251
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
81231
81252
  } else {
81232
81253
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82062,7 +82083,7 @@ class TrianglesInstancingPBRRenderer {
82062
82083
  }
82063
82084
  }
82064
82085
 
82065
- const tempVec3a$r = math.vec3();
82086
+ const tempVec3a$s = math.vec3();
82066
82087
 
82067
82088
  /**
82068
82089
  * @private
@@ -82137,7 +82158,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82137
82158
  if (active) {
82138
82159
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82139
82160
  if (origin) {
82140
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82161
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
82141
82162
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82142
82163
  } else {
82143
82164
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82377,7 +82398,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82377
82398
  }
82378
82399
 
82379
82400
  const tempVec4 = math.vec4();
82380
- const tempVec3a$q = math.vec3();
82401
+ const tempVec3a$r = math.vec3();
82381
82402
 
82382
82403
  /**
82383
82404
  * @private
@@ -82442,7 +82463,7 @@ class TrianglesInstancingColorTextureRenderer {
82442
82463
  if (active) {
82443
82464
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82444
82465
  if (origin) {
82445
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$q);
82466
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82446
82467
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82447
82468
  } else {
82448
82469
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -83253,8 +83274,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
83253
83274
  const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
83254
83275
  const tempVec3fa$2 = new Float32Array(3);
83255
83276
 
83256
- const tempVec3a$p = math.vec3();
83257
- const tempVec3b$5 = math.vec3();
83277
+ const tempVec3a$q = math.vec3();
83278
+ const tempVec3b$6 = math.vec3();
83258
83279
  const tempVec3c$4 = math.vec3();
83259
83280
  const tempVec3d$1 = math.vec3();
83260
83281
  const tempVec3e = math.vec3();
@@ -84182,8 +84203,8 @@ class TrianglesInstancingLayer {
84182
84203
  const origin = state.origin;
84183
84204
  const offset = portion.offset;
84184
84205
 
84185
- const rtcRayOrigin = tempVec3a$p;
84186
- const rtcRayDir = tempVec3b$5;
84206
+ const rtcRayOrigin = tempVec3a$q;
84207
+ const rtcRayDir = tempVec3b$6;
84187
84208
 
84188
84209
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
84189
84210
  rtcRayDir.set(worldRayDir);
@@ -84316,7 +84337,7 @@ class TrianglesInstancingLayer {
84316
84337
  }
84317
84338
  }
84318
84339
 
84319
- const tempVec3a$o = math.vec3();
84340
+ const tempVec3a$p = math.vec3();
84320
84341
 
84321
84342
  /**
84322
84343
  * @private
@@ -84379,7 +84400,7 @@ class LinesBatchingColorRenderer {
84379
84400
  if (active) {
84380
84401
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84381
84402
  if (origin) {
84382
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84403
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$p);
84383
84404
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84384
84405
  } else {
84385
84406
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -84599,7 +84620,7 @@ class LinesBatchingColorRenderer {
84599
84620
  }
84600
84621
 
84601
84622
  const defaultColor$1 = new Float32Array([1, 1, 1]);
84602
- const tempVec3a$n = math.vec3();
84623
+ const tempVec3a$o = math.vec3();
84603
84624
 
84604
84625
  /**
84605
84626
  * @private
@@ -84686,7 +84707,7 @@ class LinesBatchingSilhouetteRenderer {
84686
84707
  if (active) {
84687
84708
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84688
84709
  if (origin) {
84689
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
84710
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84690
84711
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84691
84712
  } else {
84692
84713
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -85783,7 +85804,7 @@ class LinesBatchingLayer {
85783
85804
  }
85784
85805
  }
85785
85806
 
85786
- const tempVec3a$m = math.vec3();
85807
+ const tempVec3a$n = math.vec3();
85787
85808
 
85788
85809
  /**
85789
85810
  * @private
@@ -85846,7 +85867,7 @@ class LinesInstancingColorRenderer {
85846
85867
  if (active) {
85847
85868
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
85848
85869
  if (origin) {
85849
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
85870
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
85850
85871
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
85851
85872
  } else {
85852
85873
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -86128,7 +86149,7 @@ class LinesInstancingColorRenderer {
86128
86149
  }
86129
86150
  }
86130
86151
 
86131
- const tempVec3a$l = math.vec3();
86152
+ const tempVec3a$m = math.vec3();
86132
86153
 
86133
86154
  /**
86134
86155
  * @private
@@ -86213,7 +86234,7 @@ class LinesInstancingSilhouetteRenderer {
86213
86234
  if (active) {
86214
86235
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
86215
86236
  if (origin) {
86216
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
86237
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
86217
86238
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
86218
86239
  } else {
86219
86240
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87195,7 +87216,7 @@ class LinesInstancingLayer {
87195
87216
  }
87196
87217
  }
87197
87218
 
87198
- const tempVec3a$k = math.vec3();
87219
+ const tempVec3a$l = math.vec3();
87199
87220
 
87200
87221
  /**
87201
87222
  * @private
@@ -87256,7 +87277,7 @@ class PointsBatchingColorRenderer {
87256
87277
  if (active) {
87257
87278
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87258
87279
  if (origin) {
87259
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87280
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
87260
87281
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87261
87282
  } else {
87262
87283
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87541,7 +87562,7 @@ class PointsBatchingColorRenderer {
87541
87562
  }
87542
87563
 
87543
87564
  const defaultColor = new Float32Array([1, 1, 1]);
87544
- const tempVec3a$j = math.vec3();
87565
+ const tempVec3a$k = math.vec3();
87545
87566
 
87546
87567
  /**
87547
87568
  * @private
@@ -87626,7 +87647,7 @@ class PointsBatchingSilhouetteRenderer {
87626
87647
  if (active) {
87627
87648
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87628
87649
  if (origin) {
87629
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87650
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87630
87651
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87631
87652
  } else {
87632
87653
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87870,7 +87891,7 @@ class PointsBatchingSilhouetteRenderer {
87870
87891
  }
87871
87892
  }
87872
87893
 
87873
- const tempVec3a$i = math.vec3();
87894
+ const tempVec3a$j = math.vec3();
87874
87895
 
87875
87896
  /**
87876
87897
  * @private
@@ -87937,7 +87958,7 @@ class PointsBatchingPickMeshRenderer {
87937
87958
  if (active) {
87938
87959
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87939
87960
  if (origin) {
87940
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
87961
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87941
87962
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87942
87963
  } else {
87943
87964
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88182,7 +88203,7 @@ class PointsBatchingPickMeshRenderer {
88182
88203
  }
88183
88204
  }
88184
88205
 
88185
- const tempVec3a$h = math.vec3();
88206
+ const tempVec3a$i = math.vec3();
88186
88207
 
88187
88208
  /**
88188
88209
  * @private
@@ -88254,7 +88275,7 @@ class PointsBatchingPickDepthRenderer {
88254
88275
  if (active) {
88255
88276
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88256
88277
  if (origin) {
88257
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88278
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
88258
88279
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88259
88280
  } else {
88260
88281
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88505,7 +88526,7 @@ class PointsBatchingPickDepthRenderer {
88505
88526
  }
88506
88527
  }
88507
88528
 
88508
- const tempVec3a$g = math.vec3();
88529
+ const tempVec3a$h = math.vec3();
88509
88530
 
88510
88531
  /**
88511
88532
  * @private
@@ -88566,7 +88587,7 @@ class PointsBatchingOcclusionRenderer {
88566
88587
  if (active) {
88567
88588
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88568
88589
  if (origin) {
88569
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
88590
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88570
88591
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88571
88592
  } else {
88572
88593
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88932,8 +88953,8 @@ class PointsBatchingBuffer {
88932
88953
  }
88933
88954
  }
88934
88955
 
88935
- const tempVec3a$f = math.vec4();
88936
- const tempVec3b$4 = math.vec4();
88956
+ const tempVec3a$g = math.vec4();
88957
+ const tempVec3b$5 = math.vec4();
88937
88958
  const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
88938
88959
  const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
88939
88960
  const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
@@ -89085,8 +89106,8 @@ class PointsBatchingLayer {
89085
89106
 
89086
89107
  const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
89087
89108
 
89088
- const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$f);
89089
- const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$4);
89109
+ const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$g);
89110
+ const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$5);
89090
89111
 
89091
89112
  worldAABB[0] = min[0];
89092
89113
  worldAABB[1] = min[1];
@@ -89724,7 +89745,7 @@ class PointsBatchingLayer {
89724
89745
  }
89725
89746
  }
89726
89747
 
89727
- const tempVec3a$e = math.vec3();
89748
+ const tempVec3a$f = math.vec3();
89728
89749
 
89729
89750
  /**
89730
89751
  * @private
@@ -89793,7 +89814,7 @@ class PointsInstancingColorRenderer {
89793
89814
  if (active) {
89794
89815
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
89795
89816
  if (origin) {
89796
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
89817
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
89797
89818
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
89798
89819
  } else {
89799
89820
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90103,7 +90124,7 @@ class PointsInstancingColorRenderer {
90103
90124
  }
90104
90125
  }
90105
90126
 
90106
- const tempVec3a$d = math.vec3();
90127
+ const tempVec3a$e = math.vec3();
90107
90128
 
90108
90129
  /**
90109
90130
  * @private
@@ -90187,7 +90208,7 @@ class PointsInstancingSilhouetteRenderer {
90187
90208
  if (active) {
90188
90209
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90189
90210
  if (origin) {
90190
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90211
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
90191
90212
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90192
90213
  } else {
90193
90214
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90468,7 +90489,7 @@ class PointsInstancingSilhouetteRenderer {
90468
90489
  }
90469
90490
  }
90470
90491
 
90471
- const tempVec3a$c = math.vec3();
90492
+ const tempVec3a$d = math.vec3();
90472
90493
 
90473
90494
  /**
90474
90495
  * @private
@@ -90574,7 +90595,7 @@ class PointsInstancingPickMeshRenderer {
90574
90595
  if (active) {
90575
90596
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90576
90597
  if (origin) {
90577
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90598
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90578
90599
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90579
90600
  } else {
90580
90601
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90825,7 +90846,7 @@ class PointsInstancingPickMeshRenderer {
90825
90846
  }
90826
90847
  }
90827
90848
 
90828
- const tempVec3a$b = math.vec3();
90849
+ const tempVec3a$c = math.vec3();
90829
90850
 
90830
90851
  /**
90831
90852
  * @private
@@ -90903,7 +90924,7 @@ class PointsInstancingPickDepthRenderer {
90903
90924
  if (active) {
90904
90925
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90905
90926
  if (origin) {
90906
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
90927
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90907
90928
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90908
90929
  } else {
90909
90930
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91191,7 +91212,7 @@ class PointsInstancingPickDepthRenderer {
91191
91212
  }
91192
91213
  }
91193
91214
 
91194
- const tempVec3a$a = math.vec3();
91215
+ const tempVec3a$b = math.vec3();
91195
91216
 
91196
91217
  /**
91197
91218
  * @private
@@ -91253,7 +91274,7 @@ class PointsInstancingOcclusionRenderer {
91253
91274
  if (active) {
91254
91275
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91255
91276
  if (origin) {
91256
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91277
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
91257
91278
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91258
91279
  } else {
91259
91280
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91542,7 +91563,7 @@ class PointsInstancingOcclusionRenderer {
91542
91563
  }
91543
91564
  }
91544
91565
 
91545
- const tempVec3a$9 = math.vec3();
91566
+ const tempVec3a$a = math.vec3();
91546
91567
 
91547
91568
  /**
91548
91569
  * @private
@@ -91604,7 +91625,7 @@ class PointsInstancingDepthRenderer {
91604
91625
  if (active) {
91605
91626
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91606
91627
  if (origin) {
91607
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91628
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91608
91629
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91609
91630
  } else {
91610
91631
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91888,7 +91909,7 @@ class PointsInstancingDepthRenderer {
91888
91909
  }
91889
91910
  }
91890
91911
 
91891
- const tempVec3a$8 = math.vec3();
91912
+ const tempVec3a$9 = math.vec3();
91892
91913
 
91893
91914
  /**
91894
91915
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -91975,7 +91996,7 @@ class PointsInstancingShadowRenderer {
91975
91996
  if (active) {
91976
91997
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91977
91998
  if (origin) {
91978
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$8);
91999
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91979
92000
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91980
92001
  } else {
91981
92002
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -94316,7 +94337,7 @@ function getKTX2TextureTranscoder(viewer) {
94316
94337
  return transcoder;
94317
94338
  }
94318
94339
 
94319
- const tempVec3a$7 = math.vec3();
94340
+ const tempVec3a$8 = math.vec3();
94320
94341
  const tempMat4$1 = math.mat4();
94321
94342
 
94322
94343
  const defaultScale = math.vec3([1, 1, 1]);
@@ -96697,7 +96718,7 @@ class VBOSceneModel extends Component {
96697
96718
  }
96698
96719
 
96699
96720
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
96700
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$7) : this._origin;
96721
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$8) : this._origin;
96701
96722
 
96702
96723
  const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
96703
96724
 
@@ -96759,7 +96780,7 @@ class VBOSceneModel extends Component {
96759
96780
 
96760
96781
  let indices = cfg.indices;
96761
96782
  let edgeIndices = cfg.edgeIndices;
96762
- let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$7) : this._origin;
96783
+ let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$8) : this._origin;
96763
96784
  let positions = cfg.positions;
96764
96785
 
96765
96786
  if (positions) {
@@ -97773,8 +97794,8 @@ class TextureTranscoder {
97773
97794
  const screenPos = math.vec4();
97774
97795
  const viewPos = math.vec4();
97775
97796
 
97776
- const tempVec3a$6 = math.vec3();
97777
- const tempVec3b$3 = math.vec3();
97797
+ const tempVec3a$7 = math.vec3();
97798
+ const tempVec3b$4 = math.vec3();
97778
97799
  const tempVec3c$3 = math.vec3();
97779
97800
 
97780
97801
  const tempVec4a$4 = math.vec4();
@@ -97808,7 +97829,7 @@ class PanController {
97808
97829
  const camera = this._scene.camera;
97809
97830
 
97810
97831
  if (optionalTargetWorldPos) {
97811
- const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97832
+ const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97812
97833
  const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
97813
97834
  dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
97814
97835
  }
@@ -97832,9 +97853,9 @@ class PanController {
97832
97853
  // suddenly a lot closer than the point we pivoted about on the surface of the last object
97833
97854
  // that we click-drag-pivoted on.
97834
97855
 
97835
- const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97856
+ const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97836
97857
  const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
97837
- const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$3)), lenEyeTargetVec);
97858
+ const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$4)), lenEyeTargetVec);
97838
97859
  camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
97839
97860
  }
97840
97861
 
@@ -97851,7 +97872,7 @@ class PanController {
97851
97872
 
97852
97873
  const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
97853
97874
  const offset = math.subVec3(worldPos2, worldPos1, tempVec4c$1);
97854
- const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6)), -dollyDelta, tempVec3b$3);
97875
+ const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$7)), -dollyDelta, tempVec3b$4);
97855
97876
  const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
97856
97877
 
97857
97878
  camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
@@ -97879,8 +97900,8 @@ class PanController {
97879
97900
  }
97880
97901
  }
97881
97902
 
97882
- const tempVec3a$5 = math.vec3();
97883
- const tempVec3b$2 = math.vec3();
97903
+ const tempVec3a$6 = math.vec3();
97904
+ const tempVec3b$3 = math.vec3();
97884
97905
  const tempVec3c$2 = math.vec3();
97885
97906
 
97886
97907
  const tempVec4a$3 = math.vec4();
@@ -98012,10 +98033,10 @@ class PivotController {
98012
98033
 
98013
98034
  _cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
98014
98035
  const camera = this._scene.camera;
98015
- const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$5));
98016
- const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$2);
98036
+ const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6));
98037
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$3);
98017
98038
  let rightAxisLen = math.sqLenVec3(rightAxis);
98018
- return (rightAxisLen <= 0.0001);
98039
+ return (Math.abs(rightAxisLen) <= 0.1);
98019
98040
  }
98020
98041
 
98021
98042
  /**
@@ -98053,8 +98074,8 @@ class PivotController {
98053
98074
  const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
98054
98075
  const worldPos = tempVec4a$3;
98055
98076
  camera.project.unproject(canvasPos, screenZ, tempVec4b$3, tempVec4c, worldPos);
98056
- const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$5));
98057
- const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$2), tempVec3c$2);
98077
+ const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$6));
98078
+ const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$3), tempVec3c$2);
98058
98079
  this.setPivotPos(posOnSphere);
98059
98080
  }
98060
98081
 
@@ -98076,6 +98097,10 @@ class PivotController {
98076
98097
  if (!this._pivoting) {
98077
98098
  return;
98078
98099
  }
98100
+ if (this._cameraLookingDownwards()) {
98101
+ this._pivoting = false;
98102
+ return;
98103
+ }
98079
98104
  if (yawInc === 0 && pitchInc === 0) {
98080
98105
  return;
98081
98106
  }
@@ -98685,8 +98710,8 @@ class MousePanRotateDollyHandler {
98685
98710
  }
98686
98711
 
98687
98712
  const center = math.vec3();
98688
- const tempVec3a$4 = math.vec3();
98689
- const tempVec3b$1 = math.vec3();
98713
+ const tempVec3a$5 = math.vec3();
98714
+ const tempVec3b$2 = math.vec3();
98690
98715
  const tempVec3c$1 = math.vec3();
98691
98716
  const tempVec3d = math.vec3();
98692
98717
 
@@ -98740,39 +98765,39 @@ class KeyboardAxisViewHandler {
98740
98765
 
98741
98766
  if (axisViewRight) {
98742
98767
 
98743
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$4), tempVec3d));
98768
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$5), tempVec3d));
98744
98769
  tempCameraTarget.look.set(center);
98745
98770
  tempCameraTarget.up.set(camera.worldUp);
98746
98771
 
98747
98772
  } else if (axisViewBack) {
98748
98773
 
98749
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$4), tempVec3d));
98774
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$5), tempVec3d));
98750
98775
  tempCameraTarget.look.set(center);
98751
98776
  tempCameraTarget.up.set(camera.worldUp);
98752
98777
 
98753
98778
  } else if (axisViewLeft) {
98754
98779
 
98755
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$4), tempVec3d));
98780
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$5), tempVec3d));
98756
98781
  tempCameraTarget.look.set(center);
98757
98782
  tempCameraTarget.up.set(camera.worldUp);
98758
98783
 
98759
98784
  } else if (axisViewFront) {
98760
98785
 
98761
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$4), tempVec3d));
98786
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$5), tempVec3d));
98762
98787
  tempCameraTarget.look.set(center);
98763
98788
  tempCameraTarget.up.set(camera.worldUp);
98764
98789
 
98765
98790
  } else if (axisViewTop) {
98766
98791
 
98767
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$4), tempVec3d));
98792
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$5), tempVec3d));
98768
98793
  tempCameraTarget.look.set(center);
98769
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$1), tempVec3c$1));
98794
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$2), tempVec3c$1));
98770
98795
 
98771
98796
  } else if (axisViewBottom) {
98772
98797
 
98773
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$4), tempVec3d));
98798
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$5), tempVec3d));
98774
98799
  tempCameraTarget.look.set(center);
98775
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$1)));
98800
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$2)));
98776
98801
  }
98777
98802
 
98778
98803
  if ((!configs.firstPerson) && configs.followPointer) {
@@ -99346,6 +99371,8 @@ class KeyboardPanRotateDollyHandler {
99346
99371
  const SCALE_DOLLY_EACH_FRAME = 1; // Recalculate dolly speed for eye->target distance on each Nth frame
99347
99372
  const EPSILON = 0.001;
99348
99373
  const tempVec3$1 = math.vec3();
99374
+ const tempVec3a$4 = math.vec3();
99375
+ const tempVec3b$1 = math.vec3();
99349
99376
 
99350
99377
  /**
99351
99378
  * Handles camera updates on each "tick" that were scheduled by the various controllers.
@@ -99365,7 +99392,7 @@ class CameraUpdater {
99365
99392
  let countDown = SCALE_DOLLY_EACH_FRAME; // Decrements on each tick
99366
99393
  let dollyDistFactor = 1.0; // Calculated when countDown is zero
99367
99394
  let followPointerWorldPos = null; // Holds the pointer's World position when configs.followPointer is true
99368
-
99395
+
99369
99396
  this._onTick = scene.on("tick", () => {
99370
99397
 
99371
99398
  if (!(configs.active && configs.pointerEnabled)) {
@@ -99426,7 +99453,7 @@ class CameraUpdater {
99426
99453
 
99427
99454
  if (pickController.pickResult && pickController.pickResult.worldPos) {
99428
99455
  followPointerWorldPos = pickController.pickResult.worldPos;
99429
-
99456
+
99430
99457
  } else {
99431
99458
  dollyDistFactor = 1.0;
99432
99459
  followPointerWorldPos = null;
@@ -99646,6 +99673,13 @@ class CameraUpdater {
99646
99673
  });
99647
99674
  }
99648
99675
 
99676
+ isLookingDownwards(look, eye) {
99677
+ const camera = this._scene.camera;
99678
+ const forwardAxis = math.normalizeVec3(math.subVec3(look, eye, tempVec3a$4));
99679
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$1);
99680
+ let rightAxisLen = math.sqLenVec3(rightAxis);
99681
+ return (Math.abs(rightAxisLen) <= 0.1);
99682
+ }
99649
99683
 
99650
99684
  destroy() {
99651
99685
  this._scene.off(this._onTick);
@@ -113375,6 +113409,8 @@ class NavCubePlugin extends Plugin {
113375
113409
  * @param {Boolean} [cfg.fitVisible=false] Sets whether the axis, corner and edge-aligned views will fit the
113376
113410
  * view to the entire {@link Scene} or just to visible object-{@link Entity}s. Entitys are visible objects when {@link Entity#isObject} and {@link Entity#visible} are both ````true````.
113377
113411
  * @param {Boolean} [cfg.synchProjection=false] Sets whether the NavCube switches between perspective and orthographic projections in synchrony with the {@link Camera}. When ````false````, the NavCube will always be rendered with perspective projection.
113412
+ * @param {Boolean} [cfg.isProjectNorth] sets whether the NavCube switches between true north and project north - using the project north offset angle.
113413
+ * @param {number} [cfg.projectNorthOffsetAngle] sets the NavCube project north offset angle - when the {@link isProjectNorth} is true.
113378
113414
  */
113379
113415
  constructor(viewer, cfg = {}) {
113380
113416
 
@@ -113420,6 +113456,9 @@ class NavCubePlugin extends Plugin {
113420
113456
 
113421
113457
  var self = this;
113422
113458
 
113459
+ this.setIsProjectNorth(cfg.isProjectNorth);
113460
+ this.setProjectNorthOffsetAngle(cfg.projectNorthOffsetAngle);
113461
+
113423
113462
  this._synchCamera = (function () {
113424
113463
  var matrix = math.rotationMat4c(-90 * math.DEGTORAD, 1, 0, 0);
113425
113464
  var eyeLookVec = math.vec3();
@@ -113441,6 +113480,9 @@ class NavCubePlugin extends Plugin {
113441
113480
  self._navCubeCamera.eye = eyeLookVec;
113442
113481
  self._navCubeCamera.up = up;
113443
113482
  }
113483
+ if (self._isProjectNorth && self._projectNorthOffsetAngle) {
113484
+ self._navCubeCamera.orbitYaw(self._projectNorthOffsetAngle);
113485
+ }
113444
113486
  };
113445
113487
  }());
113446
113488
 
@@ -113910,6 +113952,42 @@ class NavCubePlugin extends Plugin {
113910
113952
  return this._synchProjection;
113911
113953
  }
113912
113954
 
113955
+ /**
113956
+ * Sets whether the NavCube switches between project north and true north
113957
+ *
113958
+ * @param {Boolean} isProjectNorth Set ````true```` to use project north offset
113959
+ */
113960
+ setIsProjectNorth(isProjectNorth = false) {
113961
+ this._isProjectNorth = isProjectNorth;
113962
+ }
113963
+
113964
+ /**
113965
+ * Gets whether the NavCube switches between project north and true north
113966
+ *
113967
+ * @return {Boolean} isProjectNorth when ````true```` - use project north offset
113968
+ */
113969
+ getIsProjectNorth() {
113970
+ return this._isProjectNorth;
113971
+ }
113972
+
113973
+ /**
113974
+ * Sets the NavCube project north offset angle (used when {@link isProjectNorth} is ````true````
113975
+ *
113976
+ * @param {number} projectNorthOffsetAngle Set the vector offset for project north
113977
+ */
113978
+ setProjectNorthOffsetAngle(projectNorthOffsetAngle) {
113979
+ this._projectNorthOffsetAngle = projectNorthOffsetAngle;
113980
+ }
113981
+
113982
+ /**
113983
+ * Gets the offset angle between project north and true north
113984
+ *
113985
+ * @return {number} projectNorthOffsetAngle
113986
+ */
113987
+ getProjectNorthOffsetAngle() {
113988
+ return this._projectNorthOffsetAngle;
113989
+ }
113990
+
113913
113991
  /**
113914
113992
  * Destroys this NavCubePlugin.
113915
113993
  *