@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.
@@ -327,6 +327,7 @@ class ContextMenu {
327
327
  * @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}.
328
328
  * @param {Boolean} [cfg.enabled=true] Whether this ````ContextMenu```` is initially enabled. {@link ContextMenu#show} does nothing while this is ````false````.
329
329
  * @param {Boolean} [cfg.hideOnMouseDown=true] Whether this ````ContextMenu```` automatically hides whenever we mouse-down or tap anywhere in the page.
330
+ * @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.
330
331
  */
331
332
  constructor(cfg = {}) {
332
333
 
@@ -365,6 +366,8 @@ class ContextMenu {
365
366
  this.items = cfg.items;
366
367
  }
367
368
 
369
+ this._hideOnMouseSelect = (cfg.hideOnMouseSelect !== false);
370
+
368
371
  this.context = cfg.context;
369
372
  this.enabled = cfg.enabled !== false;
370
373
  this.hide();
@@ -793,7 +796,6 @@ class ContextMenu {
793
796
 
794
797
  item.itemElement.addEventListener("click", (event) => {
795
798
  event.preventDefault();
796
- self.hide();
797
799
  if (!self._context) {
798
800
  return;
799
801
  }
@@ -803,9 +805,13 @@ class ContextMenu {
803
805
  if (item.doAction) {
804
806
  item.doAction(self._context);
805
807
  }
808
+ if (this._hideOnMouseSelect) {
809
+ self.hide();
810
+ } else {
811
+ self._updateItemsTitles();
812
+ self._updateItemsEnabledStatus();
813
+ }
806
814
  });
807
-
808
-
809
815
  item.itemElement.addEventListener("mouseenter", (event) => {
810
816
  event.preventDefault();
811
817
  if (item.enabled === false) {
@@ -7443,7 +7449,6 @@ class Component {
7443
7449
  throw "Invalid param: owner must be a Component"
7444
7450
  }
7445
7451
  this._owner = owner;
7446
- this._renderer = this.scene._renderer;
7447
7452
  }
7448
7453
 
7449
7454
  this._dontClear = !!cfg.dontClear; // Prevent Scene#clear from destroying this component
@@ -8939,7 +8944,7 @@ class VBOSceneModelNode {
8939
8944
 
8940
8945
  }
8941
8946
 
8942
- const tempVec3a$1h = math.vec3();
8947
+ const tempVec3a$1i = math.vec3();
8943
8948
 
8944
8949
  /**
8945
8950
  * Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
@@ -9019,7 +9024,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
9019
9024
  */
9020
9025
  function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) {
9021
9026
 
9022
- const center = math.getPositionsCenter(worldPositions, tempVec3a$1h);
9027
+ const center = math.getPositionsCenter(worldPositions, tempVec3a$1i);
9023
9028
 
9024
9029
  const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
9025
9030
  const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
@@ -9055,7 +9060,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize =
9055
9060
  */
9056
9061
  function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
9057
9062
  const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
9058
- const dirNormalized = math.normalizeVec3(dir, tempVec3a$1h);
9063
+ const dirNormalized = math.normalizeVec3(dir, tempVec3a$1i);
9059
9064
  math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
9060
9065
  return rtcPlanePos;
9061
9066
  }
@@ -11520,12 +11525,12 @@ class Annotation extends Marker {
11520
11525
  const canvasPos = this.canvasPos;
11521
11526
  this._marker.style.left = (Math.floor(left + canvasPos[0]) - 12) + "px";
11522
11527
  this._marker.style.top = (Math.floor(top + canvasPos[1]) - 12) + "px";
11523
- this._marker.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11528
+ this._marker.style["z-index"] = cfg._markerZIndex;
11524
11529
  const offsetX = 20;
11525
11530
  const offsetY = -17;
11526
11531
  this._label.style.left = 20 + Math.floor(left + canvasPos[0] + offsetX) + "px";
11527
11532
  this._label.style.top = Math.floor(top + canvasPos[1] + offsetY) + "px";
11528
- this._label.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11533
+ this._label.style["z-index"] = cfg._labelZIndex;
11529
11534
  }
11530
11535
 
11531
11536
  /**
@@ -11686,8 +11691,8 @@ class Annotation extends Marker {
11686
11691
  }
11687
11692
  }
11688
11693
 
11689
- const tempVec3a$1g = math.vec3();
11690
- const tempVec3b$c = math.vec3();
11694
+ const tempVec3a$1h = math.vec3();
11695
+ const tempVec3b$d = math.vec3();
11691
11696
  const tempVec3c$9 = math.vec3();
11692
11697
 
11693
11698
  /**
@@ -12062,6 +12067,8 @@ class AnnotationsPlugin extends Plugin {
12062
12067
  * @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
12063
12068
  * @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
12064
12069
  * @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
12070
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12071
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12065
12072
  * @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
12066
12073
  * @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
12067
12074
  * @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
@@ -12070,10 +12077,12 @@ class AnnotationsPlugin extends Plugin {
12070
12077
  constructor(viewer, cfg) {
12071
12078
 
12072
12079
  super("Annotations", viewer);
12073
-
12080
+ const randomZIndex = 90005 + Math.floor(this._viewPos[2]) + 1;
12074
12081
  this._labelHTML = cfg.labelHTML || "<div></div>";
12075
12082
  this._markerHTML = cfg.markerHTML || "<div></div>";
12076
12083
  this._container = cfg.container || document.body;
12084
+ this._markerZIndex = cfg.markerZIndex || randomZIndex;
12085
+ this._labelZIndex = cfg.labelZIndex || randomZIndex;
12077
12086
  this._values = cfg.values || {};
12078
12087
 
12079
12088
  /**
@@ -12149,6 +12158,8 @@ class AnnotationsPlugin extends Plugin {
12149
12158
  * @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
12150
12159
  * @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
12151
12160
  * @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
12161
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12162
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12152
12163
  * @returns {Annotation} The new {@link Annotation}.
12153
12164
  */
12154
12165
  createAnnotation(params) {
@@ -12164,8 +12175,8 @@ class AnnotationsPlugin extends Plugin {
12164
12175
  if (!pickResult.worldPos || !pickResult.worldNormal) {
12165
12176
  this.error("Param 'pickResult' does not have both worldPos and worldNormal");
12166
12177
  } else {
12167
- const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1g);
12168
- const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$c);
12178
+ const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1h);
12179
+ const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$d);
12169
12180
  const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$9);
12170
12181
  worldPos = offsetWorldPos;
12171
12182
  entity = pickResult.entity;
@@ -12200,7 +12211,9 @@ class AnnotationsPlugin extends Plugin {
12200
12211
  markerElement: markerElement,
12201
12212
  labelElement: labelElement,
12202
12213
  markerHTML: params.markerHTML || this._markerHTML,
12214
+ markerZIndex : params.markerZIndex || this._markerZIndex,
12203
12215
  labelHTML: params.labelHTML || this._labelHTML,
12216
+ labelZIndex : params.labelZIndex || this._labelZIndex,
12204
12217
  occludable: params.occludable,
12205
12218
  values: utils.apply(params.values, utils.apply(this._values, {})),
12206
12219
  markerShown: params.markerShown,
@@ -14361,7 +14374,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]);
14361
14374
  const POINT_SIZE = 20;
14362
14375
  const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces
14363
14376
 
14364
- const tempVec3a$1f = math.vec3();
14377
+ const tempVec3a$1g = math.vec3();
14365
14378
 
14366
14379
  /**
14367
14380
  * Manages occlusion testing. Private member of a Renderer.
@@ -14698,7 +14711,7 @@ class OcclusionTester {
14698
14711
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
14699
14712
  if (active) {
14700
14713
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
14701
- gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f));
14714
+ gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1g));
14702
14715
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
14703
14716
  }
14704
14717
  }
@@ -18703,7 +18716,7 @@ class CustomProjection extends Component {
18703
18716
  }
18704
18717
 
18705
18718
  const tempVec3$6 = math.vec3();
18706
- const tempVec3b$b = math.vec3();
18719
+ const tempVec3b$c = math.vec3();
18707
18720
  const tempVec3c$8 = math.vec3();
18708
18721
  const tempVec3d$4 = math.vec3();
18709
18722
  const tempVec3e$3 = math.vec3();
@@ -19013,7 +19026,7 @@ class Camera extends Component {
19013
19026
  orbitYaw(angleInc) {
19014
19027
  let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
19015
19028
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19016
- lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$b);
19029
+ lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$c);
19017
19030
  this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$8); // Set eye position as 'look' plus 'eye' vector
19018
19031
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4); // Rotate 'up' vector
19019
19032
  }
@@ -19031,7 +19044,7 @@ class Camera extends Component {
19031
19044
  }
19032
19045
  }
19033
19046
  let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
19034
- const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
19047
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19035
19048
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19036
19049
  eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$4);
19037
19050
  this.up = math.transformPoint3(tempMat, this._up, tempVec3e$3);
@@ -19046,7 +19059,7 @@ class Camera extends Component {
19046
19059
  yaw(angleInc) {
19047
19060
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
19048
19061
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19049
- look2 = math.transformPoint3(tempMat, look2, tempVec3b$b);
19062
+ look2 = math.transformPoint3(tempMat, look2, tempVec3b$c);
19050
19063
  this.look = math.addVec3(look2, this._eye, tempVec3c$8);
19051
19064
  if (this._gimbalLock) {
19052
19065
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4);
@@ -19066,7 +19079,7 @@ class Camera extends Component {
19066
19079
  }
19067
19080
  }
19068
19081
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
19069
- const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$b), math.normalizeVec3(this._up, tempVec3c$8));
19082
+ const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19070
19083
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19071
19084
  this.up = math.transformPoint3(tempMat, this._up, tempVec3f$3);
19072
19085
  look2 = math.transformPoint3(tempMat, look2, tempVec3d$4);
@@ -19083,7 +19096,7 @@ class Camera extends Component {
19083
19096
  const vec = [0, 0, 0];
19084
19097
  let v;
19085
19098
  if (pan[0] !== 0) {
19086
- const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$b));
19099
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$c));
19087
19100
  v = math.mulVec3Scalar(left, pan[0]);
19088
19101
  vec[0] += v[0];
19089
19102
  vec[1] += v[1];
@@ -19112,7 +19125,7 @@ class Camera extends Component {
19112
19125
  */
19113
19126
  zoom(delta) {
19114
19127
  const vec = math.subVec3(this._eye, this._look, tempVec3$6);
19115
- const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$b));
19128
+ const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$c));
19116
19129
  const newLenLook = Math.abs(lenLook + delta);
19117
19130
  if (newLenLook < 0.5) {
19118
19131
  return;
@@ -19574,7 +19587,7 @@ class Camera extends Component {
19574
19587
  }
19575
19588
 
19576
19589
  const tempVec4$9 = math.vec4();
19577
- const tempVec3a$1e = math.vec3();
19590
+ const tempVec3a$1f = math.vec3();
19578
19591
 
19579
19592
  /**
19580
19593
  * @private
@@ -19661,7 +19674,7 @@ class TrianglesDataTextureColorRenderer {
19661
19674
  if (active) {
19662
19675
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
19663
19676
  if (origin) {
19664
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
19677
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f);
19665
19678
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
19666
19679
  } else {
19667
19680
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20188,7 +20201,7 @@ class TrianglesDataTextureColorRenderer {
20188
20201
 
20189
20202
  const defaultColor$6 = new Float32Array([1, 1, 1]);
20190
20203
  math.vec4();
20191
- const tempVec3a$1d = math.vec3();
20204
+ const tempVec3a$1e = math.vec3();
20192
20205
 
20193
20206
  /**
20194
20207
  * @private
@@ -20296,7 +20309,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20296
20309
  if (active) {
20297
20310
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20298
20311
  if (origin) {
20299
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20312
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
20300
20313
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20301
20314
  } else {
20302
20315
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20652,7 +20665,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20652
20665
  }
20653
20666
  }
20654
20667
 
20655
- const tempVec3a$1c = math.vec3();
20668
+ const tempVec3a$1d = math.vec3();
20656
20669
  const defaultColor$5 = new Float32Array([0,0,0,1]);
20657
20670
 
20658
20671
  /**
@@ -20752,7 +20765,7 @@ class TrianglesDataTextureEdgesRenderer {
20752
20765
  if (active) {
20753
20766
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20754
20767
  if (origin) {
20755
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
20768
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20756
20769
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20757
20770
  } else {
20758
20771
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21071,7 +21084,7 @@ class TrianglesDataTextureEdgesRenderer {
21071
21084
  }
21072
21085
  }
21073
21086
 
21074
- const tempVec3a$1b = math.vec3();
21087
+ const tempVec3a$1c = math.vec3();
21075
21088
 
21076
21089
  /**
21077
21090
  * @private
@@ -21145,7 +21158,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21145
21158
  if (active) {
21146
21159
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21147
21160
  if (origin) {
21148
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21161
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
21149
21162
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21150
21163
  } else {
21151
21164
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21473,7 +21486,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21473
21486
  }
21474
21487
  }
21475
21488
 
21476
- const tempVec3a$1a = math.vec3();
21489
+ const tempVec3a$1b = math.vec3();
21477
21490
 
21478
21491
  /**
21479
21492
  * @private
@@ -21560,7 +21573,7 @@ class TrianglesDataTexturePickMeshRenderer {
21560
21573
  if (active) {
21561
21574
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21562
21575
  if (origin) {
21563
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
21576
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21564
21577
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21565
21578
  } else {
21566
21579
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21916,7 +21929,7 @@ class TrianglesDataTexturePickMeshRenderer {
21916
21929
  }
21917
21930
  }
21918
21931
 
21919
- const tempVec3a$19 = math.vec3();
21932
+ const tempVec3a$1a = math.vec3();
21920
21933
 
21921
21934
  /**
21922
21935
  * @private
@@ -22008,7 +22021,7 @@ class TrianglesDataTexturePickDepthRenderer {
22008
22021
  if (active) {
22009
22022
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22010
22023
  if (origin) {
22011
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22024
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
22012
22025
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22013
22026
  } else {
22014
22027
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -22367,7 +22380,7 @@ class TrianglesDataTexturePickDepthRenderer {
22367
22380
  }
22368
22381
  }
22369
22382
 
22370
- const tempVec3a$18 = math.vec3();
22383
+ const tempVec3a$19 = math.vec3();
22371
22384
 
22372
22385
  /**
22373
22386
  * @private
@@ -22459,7 +22472,7 @@ class TrianglesDataTexturePickNormalsRenderer {
22459
22472
  if (active) {
22460
22473
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22461
22474
  if (origin) {
22462
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
22475
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22463
22476
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22464
22477
  } else {
22465
22478
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23023,7 +23036,7 @@ class TrianglesDataTextureOcclusionRenderer {
23023
23036
  }
23024
23037
 
23025
23038
  math.vec4();
23026
- const tempVec3a$17 = math.vec3();
23039
+ const tempVec3a$18 = math.vec3();
23027
23040
 
23028
23041
  /**
23029
23042
  * @private
@@ -23108,7 +23121,7 @@ class TrianglesDataTextureDepthRenderer {
23108
23121
  if (active) {
23109
23122
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23110
23123
  if (origin) {
23111
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23124
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
23112
23125
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23113
23126
  } else {
23114
23127
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23479,7 +23492,7 @@ class TrianglesDataTextureDepthRenderer {
23479
23492
  }
23480
23493
  }
23481
23494
 
23482
- const tempVec3a$16 = math.vec3();
23495
+ const tempVec3a$17 = math.vec3();
23483
23496
 
23484
23497
  /**
23485
23498
  * @private
@@ -23542,7 +23555,7 @@ class TrianglesDataTextureNormalsRenderer {
23542
23555
  if (active) {
23543
23556
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23544
23557
  if (origin) {
23545
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
23558
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23546
23559
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23547
23560
  } else {
23548
23561
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23972,7 +23985,7 @@ class TrianglesDataTextureShadowRenderer {
23972
23985
  }
23973
23986
 
23974
23987
  const tempVec4$8 = math.vec4();
23975
- const tempVec3a$15 = math.vec3();
23988
+ const tempVec3a$16 = math.vec3();
23976
23989
 
23977
23990
  const TEXTURE_DECODE_FUNCS$2 = {
23978
23991
  "linear": "linearToLinear",
@@ -24043,7 +24056,7 @@ class TrianglesDataTextureColorQualityRenderer {
24043
24056
  if (active) {
24044
24057
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24045
24058
  if (origin) {
24046
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24059
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
24047
24060
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24048
24061
  } else {
24049
24062
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -24782,7 +24795,7 @@ class TrianglesDataTextureColorQualityRenderer {
24782
24795
  }
24783
24796
  }
24784
24797
 
24785
- const tempVec3a$14 = math.vec3();
24798
+ const tempVec3a$15 = math.vec3();
24786
24799
 
24787
24800
  /**
24788
24801
  * @private
@@ -24896,7 +24909,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
24896
24909
  if (active) {
24897
24910
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24898
24911
  if (origin) {
24899
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$14);
24912
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24900
24913
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24901
24914
  } else {
24902
24915
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -27615,6 +27628,12 @@ const MAX_DATA_TEXTURE_HEIGHT = (1 << 12);
27615
27628
  */
27616
27629
  const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
27617
27630
 
27631
+ /**
27632
+ * Number of maximum allowed per-object flags update per render frame
27633
+ * before switching to batch update mode.
27634
+ */
27635
+ const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
27636
+
27618
27637
  const identityMatrix = math.identityMat4();
27619
27638
  math.mat4();
27620
27639
  math.mat4();
@@ -27627,8 +27646,8 @@ const tempUint8Array4 = new Uint8Array (4);
27627
27646
 
27628
27647
  const tempFloat32Array3 = new Float32Array (3);
27629
27648
 
27630
- const tempVec3a$13 = math.vec3();
27631
- const tempVec3b$a = math.vec3();
27649
+ const tempVec3a$14 = math.vec3();
27650
+ const tempVec3b$b = math.vec3();
27632
27651
  const tempVec3c$7 = math.vec3();
27633
27652
  const tempVec3d$3 = math.vec3();
27634
27653
  const tempVec3e$2 = math.vec3();
@@ -27642,7 +27661,7 @@ let _numberOfLayers = 0;
27642
27661
  */
27643
27662
  class TrianglesDataTextureLayer {
27644
27663
  /**
27645
- * @param model
27664
+ * @param {DataTextureSceneModel} model
27646
27665
  * @param cfg
27647
27666
  * @param cfg.layerIndex
27648
27667
  * @param cfg.positionsDecodeMatrix
@@ -27732,6 +27751,12 @@ class TrianglesDataTextureLayer {
27732
27751
  * @type {*|Float64Array}
27733
27752
  */
27734
27753
  this.aabb = math.collapseAABB3();
27754
+
27755
+ /**
27756
+ * The number of updates in the current frame;
27757
+ * @type {number}
27758
+ */
27759
+ this.numUpdatesInFrame = 0;
27735
27760
  }
27736
27761
 
27737
27762
  /**
@@ -28443,6 +28468,18 @@ class TrianglesDataTextureLayer {
28443
28468
 
28444
28469
  this._finalized = true;
28445
28470
  }
28471
+
28472
+ attachToRenderingEvent() {
28473
+ const self = this;
28474
+
28475
+ this.model.scene.on ("rendering", function () {
28476
+ if (self._deferredSetFlagsDirty)
28477
+ {
28478
+ self.commitDeferredFlags();
28479
+ }
28480
+ self.numUpdatesInFrame = 0;
28481
+ });
28482
+ }
28446
28483
 
28447
28484
  isEmpty() {
28448
28485
  return this._numPortions == 0;
@@ -28593,6 +28630,8 @@ class TrianglesDataTextureLayer {
28593
28630
  * In massive "set-flags" scenarios like VFC or LOD mechanisms, the combina-
28594
28631
  * tion of `beginDeferredFlags` + `commitDeferredFlags`brings a speed-up of
28595
28632
  * up to 80x when e.g. objects are massively (un)culled 🚀.
28633
+ *
28634
+ * @private
28596
28635
  */
28597
28636
  beginDeferredFlags ()
28598
28637
  {
@@ -28604,6 +28643,8 @@ class TrianglesDataTextureLayer {
28604
28643
  *
28605
28644
  * Invoking this method will update the colors+flags texture data with new
28606
28645
  * flags/flags2 set since the previous invocation of `beginDeferredFlags`.
28646
+ *
28647
+ * @private
28607
28648
  */
28608
28649
  commitDeferredFlags ()
28609
28650
  {
@@ -28719,6 +28760,11 @@ class TrianglesDataTextureLayer {
28719
28760
  this._deferredSetFlagsDirty = true;
28720
28761
  return;
28721
28762
  }
28763
+
28764
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28765
+ {
28766
+ this.beginDeferredFlags();
28767
+ }
28722
28768
 
28723
28769
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28724
28770
 
@@ -28845,6 +28891,11 @@ class TrianglesDataTextureLayer {
28845
28891
  return;
28846
28892
  }
28847
28893
 
28894
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28895
+ {
28896
+ this.beginDeferredFlags();
28897
+ }
28898
+
28848
28899
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28849
28900
 
28850
28901
  gl.texSubImage2D(
@@ -28899,6 +28950,11 @@ class TrianglesDataTextureLayer {
28899
28950
  this._deferredSetFlagsDirty = true;
28900
28951
  return;
28901
28952
  }
28953
+
28954
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28955
+ {
28956
+ this.beginDeferredFlags();
28957
+ }
28902
28958
 
28903
28959
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28904
28960
 
@@ -28956,6 +29012,11 @@ class TrianglesDataTextureLayer {
28956
29012
  this._deferredSetFlagsDirty = true;
28957
29013
  return;
28958
29014
  }
29015
+
29016
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
29017
+ {
29018
+ this.beginDeferredFlags();
29019
+ }
28959
29020
 
28960
29021
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdOffsets._texture);
28961
29022
 
@@ -29211,8 +29272,8 @@ class TrianglesDataTextureLayer {
29211
29272
  const origin = state.origin;
29212
29273
  const offset = portion.offset;
29213
29274
 
29214
- const rtcRayOrigin = tempVec3a$13;
29215
- const rtcRayDir = tempVec3b$a;
29275
+ const rtcRayOrigin = tempVec3a$14;
29276
+ const rtcRayDir = tempVec3b$b;
29216
29277
 
29217
29278
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$7) : worldRayOrigin); // World -> RTC
29218
29279
  rtcRayDir.set(worldRayDir);
@@ -29910,10 +29971,8 @@ class LodCullingManager {
29910
29971
  applyLodCulling (currentFPS)
29911
29972
  {
29912
29973
  let lodState = this.lodState;
29913
- const model = this.model;
29974
+ this.model;
29914
29975
 
29915
- model.beginDeferredFlagsInAllLayers ();
29916
-
29917
29976
  let retVal = false;
29918
29977
 
29919
29978
  if (currentFPS < lodState.targetFps)
@@ -29933,8 +29992,6 @@ class LodCullingManager {
29933
29992
  }
29934
29993
  }
29935
29994
 
29936
- model.commitDeferredFlagsInAllLayers ();
29937
-
29938
29995
  if (retVal) {
29939
29996
  console.log ("LOD level = " + lodState.lodLevelIndex);
29940
29997
  }
@@ -29944,10 +30001,8 @@ class LodCullingManager {
29944
30001
 
29945
30002
  resetLodCulling ()
29946
30003
  {
29947
- const model = this.model;
30004
+ this.model;
29948
30005
 
29949
- model.beginDeferredFlagsInAllLayers ();
29950
-
29951
30006
  let retVal = false;
29952
30007
 
29953
30008
  let decreasedLevel = false;
@@ -29956,8 +30011,6 @@ class LodCullingManager {
29956
30011
  retVal |= (decreasedLevel = this._decreaseLODLevelIndex());
29957
30012
  } while (decreasedLevel);
29958
30013
 
29959
- model.commitDeferredFlagsInAllLayers ();
29960
-
29961
30014
  if (retVal) {
29962
30015
  console.log ("LOD resetted");
29963
30016
  }
@@ -31675,16 +31728,12 @@ const VISIBILITY_CHECK_ENVOLVES_V = (1 << 14);
31675
31728
  const internalNodesList = this._internalNodesList;
31676
31729
  const lastVisibleFrameOfNodes = this._lastVisibleFrameOfNodes;
31677
31730
 
31678
- model.beginDeferredFlagsInAllLayers ();
31679
-
31680
31731
  for (let i = 0, len = internalNodesList.length; i < len; i++)
31681
31732
  {
31682
31733
  if (internalNodesList[i]) {
31683
31734
  internalNodesList[i].culledVFC = lastVisibleFrameOfNodes[i] !== cullFrame;
31684
31735
  }
31685
31736
  }
31686
-
31687
- model.commitDeferredFlagsInAllLayers ();
31688
31737
  }
31689
31738
 
31690
31739
  /**
@@ -32073,7 +32122,7 @@ class ViewFrustumCullingManager {
32073
32122
 
32074
32123
  WEBGL_INFO.SUPPORTED_EXTENSIONS["ANGLE_instanced_arrays"];
32075
32124
 
32076
- const tempVec3a$12 = math.vec3();
32125
+ const tempVec3a$13 = math.vec3();
32077
32126
  const tempMat4$3 = math.mat4();
32078
32127
 
32079
32128
  const defaultScale$1 = math.vec3([1, 1, 1]);
@@ -33045,7 +33094,7 @@ class DataTextureSceneModel extends Component {
33045
33094
  }
33046
33095
 
33047
33096
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
33048
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$12) : this._origin;
33097
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$13) : this._origin;
33049
33098
 
33050
33099
  switch (primitive) {
33051
33100
  case "triangles":
@@ -33309,7 +33358,7 @@ class DataTextureSceneModel extends Component {
33309
33358
  if (!origin) {
33310
33359
  origin = cfgOrigin;
33311
33360
  } else {
33312
- origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$12);
33361
+ origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$13);
33313
33362
  }
33314
33363
  } else {
33315
33364
  origin = this._origin;
@@ -33501,8 +33550,6 @@ class DataTextureSceneModel extends Component {
33501
33550
  return;
33502
33551
  }
33503
33552
 
33504
- this.beginDeferredFlagsInAllLayers ();
33505
-
33506
33553
  if (this._vfcManager) {
33507
33554
  this._vfcManager.finalize (
33508
33555
  function () {
@@ -33531,9 +33578,7 @@ class DataTextureSceneModel extends Component {
33531
33578
  node._finalize2();
33532
33579
  }
33533
33580
 
33534
-
33535
33581
  // Sort layers to reduce WebGL shader switching when rendering them
33536
-
33537
33582
  this._layerList.sort((a, b) => {
33538
33583
  if (a.sortId < b.sortId) {
33539
33584
  return -1;
@@ -33549,8 +33594,6 @@ class DataTextureSceneModel extends Component {
33549
33594
  layer.layerIndex = i;
33550
33595
  }
33551
33596
 
33552
- this.commitDeferredFlagsInAllLayers ();
33553
-
33554
33597
  this.glRedraw();
33555
33598
 
33556
33599
  this.scene._aabbDirty = true;
@@ -33565,6 +33608,11 @@ class DataTextureSceneModel extends Component {
33565
33608
  this._targetLodFps
33566
33609
  );
33567
33610
  }
33611
+
33612
+ for (let i = 0, len = this._layerList.length; i < len; i++) {
33613
+ const layer = this._layerList[i];
33614
+ layer.attachToRenderingEvent();
33615
+ }
33568
33616
  }
33569
33617
 
33570
33618
  _rebuildAABB() {
@@ -33607,33 +33655,6 @@ class DataTextureSceneModel extends Component {
33607
33655
  }
33608
33656
  }
33609
33657
 
33610
- /**
33611
- * This will start a "set-flags transaction" in all Layers of this Model.
33612
- */
33613
- beginDeferredFlagsInAllLayers ()
33614
- {
33615
- for (let i = 0, len = this._layerList.length; i < len; i++)
33616
- {
33617
- const layer = this._layerList[i];
33618
-
33619
- layer.beginDeferredFlags ();
33620
- }
33621
- }
33622
-
33623
- /**
33624
- * This will commit any previously started "set-flags transaction" in all
33625
- * Layers of this Model.
33626
- */
33627
- commitDeferredFlagsInAllLayers ()
33628
- {
33629
- for (let i = 0, len = this._layerList.length; i < len; i++)
33630
- {
33631
- const layer = this._layerList[i];
33632
-
33633
- layer.commitDeferredFlags ();
33634
- }
33635
- }
33636
-
33637
33658
  /** @private */
33638
33659
  _getActiveSectionPlanesForLayer(layer) {
33639
33660
 
@@ -45966,7 +45987,7 @@ function buildFragmentDraw(mesh) {
45966
45987
  * @author xeolabs / https://github.com/xeolabs
45967
45988
  */
45968
45989
 
45969
- const tempVec3a$11 = math.vec3();
45990
+ const tempVec3a$12 = math.vec3();
45970
45991
 
45971
45992
  const ids$2 = new Map$1({});
45972
45993
 
@@ -46065,7 +46086,7 @@ DrawRenderer.prototype.drawMesh = function (frameCtx, mesh) {
46065
46086
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
46066
46087
  if (active) {
46067
46088
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
46068
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
46089
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$12) : sectionPlane.pos);
46069
46090
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
46070
46091
  }
46071
46092
  }
@@ -47203,7 +47224,7 @@ function buildFragment$5(mesh) {
47203
47224
 
47204
47225
  const ids$1 = new Map$1({});
47205
47226
 
47206
- const tempVec3a$10 = math.vec3();
47227
+ const tempVec3a$11 = math.vec3();
47207
47228
 
47208
47229
  /**
47209
47230
  * @private
@@ -47287,7 +47308,7 @@ EmphasisFillRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47287
47308
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47288
47309
  if (active) {
47289
47310
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47290
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47311
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
47291
47312
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47292
47313
  }
47293
47314
  }
@@ -47623,7 +47644,7 @@ function buildFragment$4(mesh) {
47623
47644
 
47624
47645
  const ids = new Map$1({});
47625
47646
 
47626
- const tempVec3a$$ = math.vec3();
47647
+ const tempVec3a$10 = math.vec3();
47627
47648
 
47628
47649
  /**
47629
47650
  * @private
@@ -47706,7 +47727,7 @@ EmphasisEdgesRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47706
47727
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47707
47728
  if (active) {
47708
47729
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47709
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
47730
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47710
47731
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47711
47732
  }
47712
47733
  }
@@ -48001,7 +48022,7 @@ function buildFragment$3(mesh) {
48001
48022
  * @author xeolabs / https://github.com/xeolabs
48002
48023
  */
48003
48024
 
48004
- const tempVec3a$_ = math.vec3();
48025
+ const tempVec3a$$ = math.vec3();
48005
48026
 
48006
48027
  // No ID, because there is exactly one PickMeshRenderer per scene
48007
48028
 
@@ -48085,7 +48106,7 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48085
48106
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48086
48107
  if (active) {
48087
48108
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48088
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48109
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
48089
48110
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48090
48111
  }
48091
48112
  }
@@ -48318,7 +48339,7 @@ function buildFragment$2(mesh) {
48318
48339
  * @author xeolabs / https://github.com/xeolabs
48319
48340
  */
48320
48341
 
48321
- const tempVec3a$Z = math.vec3();
48342
+ const tempVec3a$_ = math.vec3();
48322
48343
 
48323
48344
  /**
48324
48345
  * @private
@@ -48410,7 +48431,7 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48410
48431
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48411
48432
  if (active) {
48412
48433
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48413
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48434
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48414
48435
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48415
48436
  }
48416
48437
  }
@@ -48647,7 +48668,7 @@ function buildFragment$1(mesh) {
48647
48668
  * @author xeolabs / https://github.com/xeolabs
48648
48669
  */
48649
48670
 
48650
- const tempVec3a$Y = math.vec3();
48671
+ const tempVec3a$Z = math.vec3();
48651
48672
 
48652
48673
  // No ID, because there is exactly one PickMeshRenderer per scene
48653
48674
 
@@ -48755,7 +48776,7 @@ OcclusionRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48755
48776
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48756
48777
  if (active) {
48757
48778
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48758
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Y) : sectionPlane.pos);
48779
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48759
48780
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48760
48781
  }
48761
48782
  }
@@ -61357,8 +61378,8 @@ class LineSet extends Component {
61357
61378
  }
61358
61379
 
61359
61380
  const tempVec3$4 = math.vec3();
61360
- const tempVec3a$X = math.vec3();
61361
- const tempVec3b$9 = math.vec3();
61381
+ const tempVec3a$Y = math.vec3();
61382
+ const tempVec3b$a = math.vec3();
61362
61383
  const tempVec3c$6 = math.vec3();
61363
61384
 
61364
61385
  /**
@@ -62038,8 +62059,8 @@ class BCFViewpointsPlugin extends Plugin {
62038
62059
  bcfViewpoint.bitmaps.forEach(function (e) {
62039
62060
  const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
62040
62061
  const bitmap_data = e.bitmap_data; // base64
62041
- let location = xyzObjectToArray(e.location, tempVec3a$X);
62042
- let normal = xyzObjectToArray(e.normal, tempVec3b$9);
62062
+ let location = xyzObjectToArray(e.location, tempVec3a$Y);
62063
+ let normal = xyzObjectToArray(e.normal, tempVec3b$a);
62043
62064
  let up = xyzObjectToArray(e.up, tempVec3c$6);
62044
62065
  let height = e.height || 1;
62045
62066
  if (!bitmap_type) {
@@ -63928,7 +63949,7 @@ class SplineCurve extends Curve {
63928
63949
  }
63929
63950
  }
63930
63951
 
63931
- const tempVec3a$W = math.vec3();
63952
+ const tempVec3a$X = math.vec3();
63932
63953
 
63933
63954
  /**
63934
63955
  * @desc Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
@@ -64060,9 +64081,9 @@ class CameraPath extends Component {
64060
64081
  t = t / (this._frames[this._frames.length - 1].t - this._frames[0].t);
64061
64082
  t = t < 0.0 ? 0.0 : (t > 1.0 ? 1.0 : t);
64062
64083
 
64063
- camera.eye = this._eyeCurve.getPoint(t, tempVec3a$W);
64064
- camera.look = this._lookCurve.getPoint(t, tempVec3a$W);
64065
- camera.up = this._upCurve.getPoint(t, tempVec3a$W);
64084
+ camera.eye = this._eyeCurve.getPoint(t, tempVec3a$X);
64085
+ camera.look = this._lookCurve.getPoint(t, tempVec3a$X);
64086
+ camera.up = this._upCurve.getPoint(t, tempVec3a$X);
64066
64087
  }
64067
64088
 
64068
64089
  /**
@@ -65101,7 +65122,7 @@ CameraPathAnimation.PLAYING = 2;
65101
65122
  CameraPathAnimation.PLAYING_TO = 3;
65102
65123
 
65103
65124
  const tempVec3$2 = math.vec3();
65104
- const tempVec3b$8 = math.vec3();
65125
+ const tempVec3b$9 = math.vec3();
65105
65126
  math.vec3();
65106
65127
  const zeroVec$1 = math.vec3([0, -1, 0]);
65107
65128
  const tempQuat = math.vec4([0, 0, 0, 1]);
@@ -65529,7 +65550,7 @@ class ImagePlane extends Component {
65529
65550
  const dist = -math.dotVec3(negDir, tempVec3$2);
65530
65551
 
65531
65552
  math.normalizeVec3(negDir);
65532
- math.mulVec3Scalar(negDir, dist, tempVec3b$8);
65553
+ math.mulVec3Scalar(negDir, dist, tempVec3b$9);
65533
65554
  math.vec3PairToQuaternion(zeroVec$1, dir, tempQuat);
65534
65555
 
65535
65556
  this._node.quaternion = tempQuat;
@@ -66695,8 +66716,8 @@ class SpriteMarker extends Marker {
66695
66716
  }
66696
66717
  }
66697
66718
 
66698
- const tempVec3a$V = math.vec3();
66699
- const tempVec3b$7 = math.vec3();
66719
+ const tempVec3a$W = math.vec3();
66720
+ const tempVec3b$8 = math.vec3();
66700
66721
  const tempMat4a = math.mat4();
66701
66722
 
66702
66723
  /**
@@ -66773,8 +66794,8 @@ function frustumIntersectsAABB3(frustum, aabb) {
66773
66794
 
66774
66795
  let ret = Frustum.INSIDE;
66775
66796
 
66776
- const min = tempVec3a$V;
66777
- const max = tempVec3b$7;
66797
+ const min = tempVec3a$W;
66798
+ const max = tempVec3b$8;
66778
66799
 
66779
66800
  min[0] = aabb[0];
66780
66801
  min[1] = aabb[1];
@@ -69355,7 +69376,7 @@ const RENDER_PASSES = {
69355
69376
  };
69356
69377
 
69357
69378
  const tempVec4$7 = math.vec4();
69358
- const tempVec3a$U = math.vec3();
69379
+ const tempVec3a$V = math.vec3();
69359
69380
 
69360
69381
  /**
69361
69382
  * @private
@@ -69420,7 +69441,7 @@ class TrianglesBatchingColorRenderer {
69420
69441
  if (active) {
69421
69442
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69422
69443
  if (origin) {
69423
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69444
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$V);
69424
69445
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69425
69446
  } else {
69426
69447
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -69848,7 +69869,7 @@ class TrianglesBatchingColorRenderer {
69848
69869
  }
69849
69870
 
69850
69871
  const tempVec4$6 = math.vec4();
69851
- const tempVec3a$T = math.vec3();
69872
+ const tempVec3a$U = math.vec3();
69852
69873
 
69853
69874
  /**
69854
69875
  * @private
@@ -69910,7 +69931,7 @@ class TrianglesBatchingFlatColorRenderer {
69910
69931
  if (active) {
69911
69932
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69912
69933
  if (origin) {
69913
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
69934
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69914
69935
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69915
69936
  } else {
69916
69937
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70327,7 +70348,7 @@ class TrianglesBatchingFlatColorRenderer {
70327
70348
  }
70328
70349
 
70329
70350
  const defaultColor$4 = new Float32Array([1, 1, 1]);
70330
- const tempVec3a$S = math.vec3();
70351
+ const tempVec3a$T = math.vec3();
70331
70352
 
70332
70353
  /**
70333
70354
  * @private
@@ -70411,7 +70432,7 @@ class TrianglesBatchingSilhouetteRenderer {
70411
70432
  if (active) {
70412
70433
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70413
70434
  if (origin) {
70414
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70435
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
70415
70436
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70416
70437
  } else {
70417
70438
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70648,7 +70669,7 @@ class TrianglesBatchingSilhouetteRenderer {
70648
70669
  }
70649
70670
  }
70650
70671
 
70651
- const tempVec3a$R = math.vec3();
70672
+ const tempVec3a$S = math.vec3();
70652
70673
  const defaultColor$3 = new Float32Array([0,0,0,1]);
70653
70674
 
70654
70675
  /**
@@ -70731,7 +70752,7 @@ class TrianglesBatchingEdgesRenderer {
70731
70752
  if (active) {
70732
70753
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70733
70754
  if (origin) {
70734
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
70755
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70735
70756
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70736
70757
  } else {
70737
70758
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70959,7 +70980,7 @@ class TrianglesBatchingEdgesRenderer {
70959
70980
  }
70960
70981
  }
70961
70982
 
70962
- const tempVec3a$Q = math.vec3();
70983
+ const tempVec3a$R = math.vec3();
70963
70984
 
70964
70985
  /**
70965
70986
  * @private
@@ -71019,7 +71040,7 @@ class TrianglesBatchingEdgesColorRenderer {
71019
71040
  if (active) {
71020
71041
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71021
71042
  if (origin) {
71022
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71043
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
71023
71044
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71024
71045
  } else {
71025
71046
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71247,7 +71268,7 @@ class TrianglesBatchingEdgesColorRenderer {
71247
71268
  }
71248
71269
  }
71249
71270
 
71250
- const tempVec3a$P = math.vec3();
71271
+ const tempVec3a$Q = math.vec3();
71251
71272
 
71252
71273
  /**
71253
71274
  * @private
@@ -71313,7 +71334,7 @@ class TrianglesBatchingPickMeshRenderer {
71313
71334
  if (active) {
71314
71335
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71315
71336
  if (origin) {
71316
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71337
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71317
71338
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71318
71339
  } else {
71319
71340
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71543,7 +71564,7 @@ class TrianglesBatchingPickMeshRenderer {
71543
71564
  }
71544
71565
  }
71545
71566
 
71546
- const tempVec3a$O = math.vec3();
71567
+ const tempVec3a$P = math.vec3();
71547
71568
 
71548
71569
  /**
71549
71570
  * @private
@@ -71614,7 +71635,7 @@ class TrianglesBatchingPickDepthRenderer {
71614
71635
  if (active) {
71615
71636
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71616
71637
  if (origin) {
71617
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71638
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71618
71639
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71619
71640
  } else {
71620
71641
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71852,7 +71873,7 @@ class TrianglesBatchingPickDepthRenderer {
71852
71873
  }
71853
71874
  }
71854
71875
 
71855
- const tempVec3a$N = math.vec3();
71876
+ const tempVec3a$O = math.vec3();
71856
71877
 
71857
71878
  /**
71858
71879
  * @private
@@ -71920,7 +71941,7 @@ class TrianglesBatchingPickNormalsRenderer {
71920
71941
  if (active) {
71921
71942
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71922
71943
  if (origin) {
71923
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
71944
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71924
71945
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71925
71946
  } else {
71926
71947
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72145,7 +72166,7 @@ class TrianglesBatchingPickNormalsRenderer {
72145
72166
  }
72146
72167
  }
72147
72168
 
72148
- const tempVec3a$M = math.vec3();
72169
+ const tempVec3a$N = math.vec3();
72149
72170
 
72150
72171
  /**
72151
72172
  * @private
@@ -72205,7 +72226,7 @@ class TrianglesBatchingOcclusionRenderer {
72205
72226
  if (active) {
72206
72227
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72207
72228
  if (origin) {
72208
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72229
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
72209
72230
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72210
72231
  } else {
72211
72232
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72428,7 +72449,7 @@ class TrianglesBatchingOcclusionRenderer {
72428
72449
  }
72429
72450
  }
72430
72451
 
72431
- const tempVec3a$L = math.vec3();
72452
+ const tempVec3a$M = math.vec3();
72432
72453
 
72433
72454
  /**
72434
72455
  * @private
@@ -72488,7 +72509,7 @@ class TrianglesBatchingDepthRenderer {
72488
72509
  if (active) {
72489
72510
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72490
72511
  if (origin) {
72491
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72512
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72492
72513
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72493
72514
  } else {
72494
72515
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72712,7 +72733,7 @@ class TrianglesBatchingDepthRenderer {
72712
72733
  }
72713
72734
  }
72714
72735
 
72715
- const tempVec3a$K = math.vec3();
72736
+ const tempVec3a$L = math.vec3();
72716
72737
 
72717
72738
  /**
72718
72739
  * @private
@@ -72775,7 +72796,7 @@ class TrianglesBatchingNormalsRenderer {
72775
72796
  if (active) {
72776
72797
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72777
72798
  if (origin) {
72778
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
72799
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72779
72800
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72780
72801
  } else {
72781
72802
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73015,7 +73036,7 @@ class TrianglesBatchingNormalsRenderer {
73015
73036
  }
73016
73037
  }
73017
73038
 
73018
- const tempVec3a$J = math.vec3();
73039
+ const tempVec3a$K = math.vec3();
73019
73040
 
73020
73041
  /**
73021
73042
  * Renders BatchingLayer fragment depths to a shadow map.
@@ -73084,7 +73105,7 @@ class TrianglesBatchingShadowRenderer {
73084
73105
  if (active) {
73085
73106
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73086
73107
  if (origin) {
73087
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73108
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
73088
73109
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73089
73110
  } else {
73090
73111
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73256,7 +73277,7 @@ class TrianglesBatchingShadowRenderer {
73256
73277
  }
73257
73278
 
73258
73279
  const tempVec4$5 = math.vec4();
73259
- const tempVec3a$I = math.vec3();
73280
+ const tempVec3a$J = math.vec3();
73260
73281
 
73261
73282
  // const TEXTURE_DECODE_FUNCS = {};
73262
73283
  // TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -73329,7 +73350,7 @@ class TrianglesBatchingPBRRenderer {
73329
73350
  if (active) {
73330
73351
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73331
73352
  if (origin) {
73332
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
73353
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73333
73354
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73334
73355
  } else {
73335
73356
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74134,7 +74155,7 @@ class TrianglesBatchingPBRRenderer {
74134
74155
  }
74135
74156
  }
74136
74157
 
74137
- const tempVec3a$H = math.vec3();
74158
+ const tempVec3a$I = math.vec3();
74138
74159
 
74139
74160
  /**
74140
74161
  * @private
@@ -74201,7 +74222,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74201
74222
  if (active) {
74202
74223
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74203
74224
  if (origin) {
74204
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74225
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
74205
74226
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74206
74227
  } else {
74207
74228
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74411,7 +74432,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74411
74432
  }
74412
74433
 
74413
74434
  const tempVec4$4 = math.vec4();
74414
- const tempVec3a$G = math.vec3();
74435
+ const tempVec3a$H = math.vec3();
74415
74436
 
74416
74437
  /**
74417
74438
  * @private
@@ -74476,7 +74497,7 @@ class TrianglesBatchingColorTextureRenderer {
74476
74497
  if (active) {
74477
74498
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74478
74499
  if (origin) {
74479
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$G);
74500
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74480
74501
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74481
74502
  } else {
74482
74503
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -75482,8 +75503,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
75482
75503
  const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
75483
75504
  const tempOBB3$2 = math.OBB3();
75484
75505
 
75485
- const tempVec3a$F = math.vec3();
75486
- const tempVec3b$6 = math.vec3();
75506
+ const tempVec3a$G = math.vec3();
75507
+ const tempVec3b$7 = math.vec3();
75487
75508
  const tempVec3c$5 = math.vec3();
75488
75509
  const tempVec3d$2 = math.vec3();
75489
75510
  const tempVec3e$1 = math.vec3();
@@ -76662,8 +76683,8 @@ class TrianglesBatchingLayer {
76662
76683
  const origin = state.origin;
76663
76684
  const offset = portion.offset;
76664
76685
 
76665
- const rtcRayOrigin = tempVec3a$F;
76666
- const rtcRayDir = tempVec3b$6;
76686
+ const rtcRayOrigin = tempVec3a$G;
76687
+ const rtcRayDir = tempVec3b$7;
76667
76688
 
76668
76689
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
76669
76690
  rtcRayDir.set(worldRayDir);
@@ -76786,7 +76807,7 @@ class TrianglesBatchingLayer {
76786
76807
  }
76787
76808
 
76788
76809
  const tempVec4$3 = math.vec4();
76789
- const tempVec3a$E = math.vec3();
76810
+ const tempVec3a$F = math.vec3();
76790
76811
 
76791
76812
  /**
76792
76813
  * @private
@@ -76852,7 +76873,7 @@ class TrianglesInstancingColorRenderer {
76852
76873
  if (active) {
76853
76874
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
76854
76875
  if (origin) {
76855
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
76876
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$F);
76856
76877
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76857
76878
  } else {
76858
76879
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77329,7 +77350,7 @@ class TrianglesInstancingColorRenderer {
77329
77350
  }
77330
77351
 
77331
77352
  const tempVec4$2 = math.vec4();
77332
- const tempVec3a$D = math.vec3();
77353
+ const tempVec3a$E = math.vec3();
77333
77354
 
77334
77355
  /**
77335
77356
  * @private
@@ -77391,7 +77412,7 @@ class TrianglesInstancingFlatColorRenderer {
77391
77412
  if (active) {
77392
77413
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77393
77414
  if (origin) {
77394
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77415
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
77395
77416
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77396
77417
  } else {
77397
77418
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77838,7 +77859,7 @@ class TrianglesInstancingFlatColorRenderer {
77838
77859
  }
77839
77860
  }
77840
77861
 
77841
- const tempVec3a$C = math.vec3();
77862
+ const tempVec3a$D = math.vec3();
77842
77863
 
77843
77864
  /**
77844
77865
  * @private
@@ -77921,7 +77942,7 @@ class TrianglesInstancingSilhouetteRenderer {
77921
77942
  if (active) {
77922
77943
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77923
77944
  if (origin) {
77924
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
77945
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77925
77946
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77926
77947
  } else {
77927
77948
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78193,7 +78214,7 @@ class TrianglesInstancingSilhouetteRenderer {
78193
78214
  }
78194
78215
  }
78195
78216
 
78196
- const tempVec3a$B = math.vec3();
78217
+ const tempVec3a$C = math.vec3();
78197
78218
  const defaultColor$2 = new Float32Array([0,0,0,1]);
78198
78219
 
78199
78220
  /**
@@ -78277,7 +78298,7 @@ class TrianglesInstancingEdgesRenderer {
78277
78298
  if (active) {
78278
78299
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78279
78300
  if (origin) {
78280
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78301
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
78281
78302
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78282
78303
  } else {
78283
78304
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78538,7 +78559,7 @@ class TrianglesInstancingEdgesRenderer {
78538
78559
  }
78539
78560
  }
78540
78561
 
78541
- const tempVec3a$A = math.vec3();
78562
+ const tempVec3a$B = math.vec3();
78542
78563
 
78543
78564
  /**
78544
78565
  * @private
@@ -78599,7 +78620,7 @@ class TrianglesInstancingEdgesColorRenderer {
78599
78620
  if (active) {
78600
78621
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78601
78622
  if (origin) {
78602
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78623
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78603
78624
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78604
78625
  } else {
78605
78626
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78865,7 +78886,7 @@ class TrianglesInstancingEdgesColorRenderer {
78865
78886
  }
78866
78887
  }
78867
78888
 
78868
- const tempVec3a$z = math.vec3();
78889
+ const tempVec3a$A = math.vec3();
78869
78890
 
78870
78891
  /**
78871
78892
  * @private
@@ -78968,7 +78989,7 @@ class TrianglesInstancingPickMeshRenderer {
78968
78989
  if (active) {
78969
78990
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78970
78991
  if (origin) {
78971
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
78992
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78972
78993
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78973
78994
  } else {
78974
78995
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79203,7 +79224,7 @@ class TrianglesInstancingPickMeshRenderer {
79203
79224
  }
79204
79225
  }
79205
79226
 
79206
- const tempVec3a$y = math.vec3();
79227
+ const tempVec3a$z = math.vec3();
79207
79228
 
79208
79229
  /**
79209
79230
  * @private
@@ -79280,7 +79301,7 @@ class TrianglesInstancingPickDepthRenderer {
79280
79301
  if (active) {
79281
79302
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79282
79303
  if (origin) {
79283
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79304
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
79284
79305
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79285
79306
  } else {
79286
79307
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79548,7 +79569,7 @@ class TrianglesInstancingPickDepthRenderer {
79548
79569
  }
79549
79570
  }
79550
79571
 
79551
- const tempVec3a$x = math.vec3();
79572
+ const tempVec3a$y = math.vec3();
79552
79573
 
79553
79574
  /**
79554
79575
  * @private
@@ -79625,7 +79646,7 @@ class TrianglesInstancingPickNormalsRenderer {
79625
79646
  if (active) {
79626
79647
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79627
79648
  if (origin) {
79628
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79649
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79629
79650
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79630
79651
  } else {
79631
79652
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79902,7 +79923,7 @@ class TrianglesInstancingPickNormalsRenderer {
79902
79923
  }
79903
79924
  }
79904
79925
 
79905
- const tempVec3a$w = math.vec3();
79926
+ const tempVec3a$x = math.vec3();
79906
79927
 
79907
79928
  /**
79908
79929
  * @private
@@ -79963,7 +79984,7 @@ class TrianglesInstancingOcclusionRenderer {
79963
79984
  if (active) {
79964
79985
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79965
79986
  if (origin) {
79966
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
79987
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79967
79988
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79968
79989
  } else {
79969
79990
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80221,7 +80242,7 @@ class TrianglesInstancingOcclusionRenderer {
80221
80242
  }
80222
80243
  }
80223
80244
 
80224
- const tempVec3a$v = math.vec3();
80245
+ const tempVec3a$w = math.vec3();
80225
80246
 
80226
80247
  /**
80227
80248
  * @private
@@ -80282,7 +80303,7 @@ class TrianglesInstancingDepthRenderer {
80282
80303
  if (active) {
80283
80304
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80284
80305
  if (origin) {
80285
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80306
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
80286
80307
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80287
80308
  } else {
80288
80309
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80532,7 +80553,7 @@ class TrianglesInstancingDepthRenderer {
80532
80553
  }
80533
80554
  }
80534
80555
 
80535
- const tempVec3a$u = math.vec3();
80556
+ const tempVec3a$v = math.vec3();
80536
80557
 
80537
80558
  /**
80538
80559
  * @private
@@ -80596,7 +80617,7 @@ class TrianglesInstancingNormalsRenderer {
80596
80617
  if (active) {
80597
80618
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80598
80619
  if (origin) {
80599
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80620
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80600
80621
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80601
80622
  } else {
80602
80623
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80876,7 +80897,7 @@ class TrianglesInstancingNormalsRenderer {
80876
80897
  }
80877
80898
  }
80878
80899
 
80879
- const tempVec3a$t = math.vec3();
80900
+ const tempVec3a$u = math.vec3();
80880
80901
 
80881
80902
  /**
80882
80903
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -80963,7 +80984,7 @@ class TrianglesInstancingShadowRenderer {
80963
80984
  if (active) {
80964
80985
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80965
80986
  if (origin) {
80966
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
80987
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80967
80988
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80968
80989
  } else {
80969
80990
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -81156,7 +81177,7 @@ class TrianglesInstancingShadowRenderer {
81156
81177
  }
81157
81178
 
81158
81179
  const tempVec4$1 = math.vec4();
81159
- const tempVec3a$s = math.vec3();
81180
+ const tempVec3a$t = math.vec3();
81160
81181
 
81161
81182
  const TEXTURE_DECODE_FUNCS = {};
81162
81183
  TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -81230,7 +81251,7 @@ class TrianglesInstancingPBRRenderer {
81230
81251
  if (active) {
81231
81252
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
81232
81253
  if (origin) {
81233
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
81254
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
81234
81255
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
81235
81256
  } else {
81236
81257
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82066,7 +82087,7 @@ class TrianglesInstancingPBRRenderer {
82066
82087
  }
82067
82088
  }
82068
82089
 
82069
- const tempVec3a$r = math.vec3();
82090
+ const tempVec3a$s = math.vec3();
82070
82091
 
82071
82092
  /**
82072
82093
  * @private
@@ -82141,7 +82162,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82141
82162
  if (active) {
82142
82163
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82143
82164
  if (origin) {
82144
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82165
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
82145
82166
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82146
82167
  } else {
82147
82168
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82381,7 +82402,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82381
82402
  }
82382
82403
 
82383
82404
  const tempVec4 = math.vec4();
82384
- const tempVec3a$q = math.vec3();
82405
+ const tempVec3a$r = math.vec3();
82385
82406
 
82386
82407
  /**
82387
82408
  * @private
@@ -82446,7 +82467,7 @@ class TrianglesInstancingColorTextureRenderer {
82446
82467
  if (active) {
82447
82468
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82448
82469
  if (origin) {
82449
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$q);
82470
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82450
82471
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82451
82472
  } else {
82452
82473
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -83257,8 +83278,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
83257
83278
  const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
83258
83279
  const tempVec3fa$2 = new Float32Array(3);
83259
83280
 
83260
- const tempVec3a$p = math.vec3();
83261
- const tempVec3b$5 = math.vec3();
83281
+ const tempVec3a$q = math.vec3();
83282
+ const tempVec3b$6 = math.vec3();
83262
83283
  const tempVec3c$4 = math.vec3();
83263
83284
  const tempVec3d$1 = math.vec3();
83264
83285
  const tempVec3e = math.vec3();
@@ -84186,8 +84207,8 @@ class TrianglesInstancingLayer {
84186
84207
  const origin = state.origin;
84187
84208
  const offset = portion.offset;
84188
84209
 
84189
- const rtcRayOrigin = tempVec3a$p;
84190
- const rtcRayDir = tempVec3b$5;
84210
+ const rtcRayOrigin = tempVec3a$q;
84211
+ const rtcRayDir = tempVec3b$6;
84191
84212
 
84192
84213
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
84193
84214
  rtcRayDir.set(worldRayDir);
@@ -84320,7 +84341,7 @@ class TrianglesInstancingLayer {
84320
84341
  }
84321
84342
  }
84322
84343
 
84323
- const tempVec3a$o = math.vec3();
84344
+ const tempVec3a$p = math.vec3();
84324
84345
 
84325
84346
  /**
84326
84347
  * @private
@@ -84383,7 +84404,7 @@ class LinesBatchingColorRenderer {
84383
84404
  if (active) {
84384
84405
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84385
84406
  if (origin) {
84386
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84407
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$p);
84387
84408
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84388
84409
  } else {
84389
84410
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -84603,7 +84624,7 @@ class LinesBatchingColorRenderer {
84603
84624
  }
84604
84625
 
84605
84626
  const defaultColor$1 = new Float32Array([1, 1, 1]);
84606
- const tempVec3a$n = math.vec3();
84627
+ const tempVec3a$o = math.vec3();
84607
84628
 
84608
84629
  /**
84609
84630
  * @private
@@ -84690,7 +84711,7 @@ class LinesBatchingSilhouetteRenderer {
84690
84711
  if (active) {
84691
84712
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84692
84713
  if (origin) {
84693
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
84714
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84694
84715
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84695
84716
  } else {
84696
84717
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -85787,7 +85808,7 @@ class LinesBatchingLayer {
85787
85808
  }
85788
85809
  }
85789
85810
 
85790
- const tempVec3a$m = math.vec3();
85811
+ const tempVec3a$n = math.vec3();
85791
85812
 
85792
85813
  /**
85793
85814
  * @private
@@ -85850,7 +85871,7 @@ class LinesInstancingColorRenderer {
85850
85871
  if (active) {
85851
85872
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
85852
85873
  if (origin) {
85853
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
85874
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
85854
85875
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
85855
85876
  } else {
85856
85877
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -86132,7 +86153,7 @@ class LinesInstancingColorRenderer {
86132
86153
  }
86133
86154
  }
86134
86155
 
86135
- const tempVec3a$l = math.vec3();
86156
+ const tempVec3a$m = math.vec3();
86136
86157
 
86137
86158
  /**
86138
86159
  * @private
@@ -86217,7 +86238,7 @@ class LinesInstancingSilhouetteRenderer {
86217
86238
  if (active) {
86218
86239
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
86219
86240
  if (origin) {
86220
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
86241
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
86221
86242
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
86222
86243
  } else {
86223
86244
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87199,7 +87220,7 @@ class LinesInstancingLayer {
87199
87220
  }
87200
87221
  }
87201
87222
 
87202
- const tempVec3a$k = math.vec3();
87223
+ const tempVec3a$l = math.vec3();
87203
87224
 
87204
87225
  /**
87205
87226
  * @private
@@ -87260,7 +87281,7 @@ class PointsBatchingColorRenderer {
87260
87281
  if (active) {
87261
87282
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87262
87283
  if (origin) {
87263
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87284
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
87264
87285
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87265
87286
  } else {
87266
87287
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87545,7 +87566,7 @@ class PointsBatchingColorRenderer {
87545
87566
  }
87546
87567
 
87547
87568
  const defaultColor = new Float32Array([1, 1, 1]);
87548
- const tempVec3a$j = math.vec3();
87569
+ const tempVec3a$k = math.vec3();
87549
87570
 
87550
87571
  /**
87551
87572
  * @private
@@ -87630,7 +87651,7 @@ class PointsBatchingSilhouetteRenderer {
87630
87651
  if (active) {
87631
87652
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87632
87653
  if (origin) {
87633
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87654
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87634
87655
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87635
87656
  } else {
87636
87657
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87874,7 +87895,7 @@ class PointsBatchingSilhouetteRenderer {
87874
87895
  }
87875
87896
  }
87876
87897
 
87877
- const tempVec3a$i = math.vec3();
87898
+ const tempVec3a$j = math.vec3();
87878
87899
 
87879
87900
  /**
87880
87901
  * @private
@@ -87941,7 +87962,7 @@ class PointsBatchingPickMeshRenderer {
87941
87962
  if (active) {
87942
87963
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87943
87964
  if (origin) {
87944
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
87965
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87945
87966
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87946
87967
  } else {
87947
87968
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88186,7 +88207,7 @@ class PointsBatchingPickMeshRenderer {
88186
88207
  }
88187
88208
  }
88188
88209
 
88189
- const tempVec3a$h = math.vec3();
88210
+ const tempVec3a$i = math.vec3();
88190
88211
 
88191
88212
  /**
88192
88213
  * @private
@@ -88258,7 +88279,7 @@ class PointsBatchingPickDepthRenderer {
88258
88279
  if (active) {
88259
88280
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88260
88281
  if (origin) {
88261
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88282
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
88262
88283
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88263
88284
  } else {
88264
88285
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88509,7 +88530,7 @@ class PointsBatchingPickDepthRenderer {
88509
88530
  }
88510
88531
  }
88511
88532
 
88512
- const tempVec3a$g = math.vec3();
88533
+ const tempVec3a$h = math.vec3();
88513
88534
 
88514
88535
  /**
88515
88536
  * @private
@@ -88570,7 +88591,7 @@ class PointsBatchingOcclusionRenderer {
88570
88591
  if (active) {
88571
88592
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88572
88593
  if (origin) {
88573
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
88594
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88574
88595
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88575
88596
  } else {
88576
88597
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88936,8 +88957,8 @@ class PointsBatchingBuffer {
88936
88957
  }
88937
88958
  }
88938
88959
 
88939
- const tempVec3a$f = math.vec4();
88940
- const tempVec3b$4 = math.vec4();
88960
+ const tempVec3a$g = math.vec4();
88961
+ const tempVec3b$5 = math.vec4();
88941
88962
  const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
88942
88963
  const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
88943
88964
  const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
@@ -89089,8 +89110,8 @@ class PointsBatchingLayer {
89089
89110
 
89090
89111
  const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
89091
89112
 
89092
- const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$f);
89093
- const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$4);
89113
+ const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$g);
89114
+ const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$5);
89094
89115
 
89095
89116
  worldAABB[0] = min[0];
89096
89117
  worldAABB[1] = min[1];
@@ -89728,7 +89749,7 @@ class PointsBatchingLayer {
89728
89749
  }
89729
89750
  }
89730
89751
 
89731
- const tempVec3a$e = math.vec3();
89752
+ const tempVec3a$f = math.vec3();
89732
89753
 
89733
89754
  /**
89734
89755
  * @private
@@ -89797,7 +89818,7 @@ class PointsInstancingColorRenderer {
89797
89818
  if (active) {
89798
89819
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
89799
89820
  if (origin) {
89800
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
89821
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
89801
89822
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
89802
89823
  } else {
89803
89824
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90107,7 +90128,7 @@ class PointsInstancingColorRenderer {
90107
90128
  }
90108
90129
  }
90109
90130
 
90110
- const tempVec3a$d = math.vec3();
90131
+ const tempVec3a$e = math.vec3();
90111
90132
 
90112
90133
  /**
90113
90134
  * @private
@@ -90191,7 +90212,7 @@ class PointsInstancingSilhouetteRenderer {
90191
90212
  if (active) {
90192
90213
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90193
90214
  if (origin) {
90194
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90215
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
90195
90216
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90196
90217
  } else {
90197
90218
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90472,7 +90493,7 @@ class PointsInstancingSilhouetteRenderer {
90472
90493
  }
90473
90494
  }
90474
90495
 
90475
- const tempVec3a$c = math.vec3();
90496
+ const tempVec3a$d = math.vec3();
90476
90497
 
90477
90498
  /**
90478
90499
  * @private
@@ -90578,7 +90599,7 @@ class PointsInstancingPickMeshRenderer {
90578
90599
  if (active) {
90579
90600
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90580
90601
  if (origin) {
90581
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90602
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90582
90603
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90583
90604
  } else {
90584
90605
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90829,7 +90850,7 @@ class PointsInstancingPickMeshRenderer {
90829
90850
  }
90830
90851
  }
90831
90852
 
90832
- const tempVec3a$b = math.vec3();
90853
+ const tempVec3a$c = math.vec3();
90833
90854
 
90834
90855
  /**
90835
90856
  * @private
@@ -90907,7 +90928,7 @@ class PointsInstancingPickDepthRenderer {
90907
90928
  if (active) {
90908
90929
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90909
90930
  if (origin) {
90910
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
90931
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90911
90932
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90912
90933
  } else {
90913
90934
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91195,7 +91216,7 @@ class PointsInstancingPickDepthRenderer {
91195
91216
  }
91196
91217
  }
91197
91218
 
91198
- const tempVec3a$a = math.vec3();
91219
+ const tempVec3a$b = math.vec3();
91199
91220
 
91200
91221
  /**
91201
91222
  * @private
@@ -91257,7 +91278,7 @@ class PointsInstancingOcclusionRenderer {
91257
91278
  if (active) {
91258
91279
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91259
91280
  if (origin) {
91260
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91281
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
91261
91282
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91262
91283
  } else {
91263
91284
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91546,7 +91567,7 @@ class PointsInstancingOcclusionRenderer {
91546
91567
  }
91547
91568
  }
91548
91569
 
91549
- const tempVec3a$9 = math.vec3();
91570
+ const tempVec3a$a = math.vec3();
91550
91571
 
91551
91572
  /**
91552
91573
  * @private
@@ -91608,7 +91629,7 @@ class PointsInstancingDepthRenderer {
91608
91629
  if (active) {
91609
91630
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91610
91631
  if (origin) {
91611
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91632
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91612
91633
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91613
91634
  } else {
91614
91635
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91892,7 +91913,7 @@ class PointsInstancingDepthRenderer {
91892
91913
  }
91893
91914
  }
91894
91915
 
91895
- const tempVec3a$8 = math.vec3();
91916
+ const tempVec3a$9 = math.vec3();
91896
91917
 
91897
91918
  /**
91898
91919
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -91979,7 +92000,7 @@ class PointsInstancingShadowRenderer {
91979
92000
  if (active) {
91980
92001
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91981
92002
  if (origin) {
91982
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$8);
92003
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91983
92004
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91984
92005
  } else {
91985
92006
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -94320,7 +94341,7 @@ function getKTX2TextureTranscoder(viewer) {
94320
94341
  return transcoder;
94321
94342
  }
94322
94343
 
94323
- const tempVec3a$7 = math.vec3();
94344
+ const tempVec3a$8 = math.vec3();
94324
94345
  const tempMat4$1 = math.mat4();
94325
94346
 
94326
94347
  const defaultScale = math.vec3([1, 1, 1]);
@@ -96701,7 +96722,7 @@ class VBOSceneModel extends Component {
96701
96722
  }
96702
96723
 
96703
96724
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
96704
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$7) : this._origin;
96725
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$8) : this._origin;
96705
96726
 
96706
96727
  const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
96707
96728
 
@@ -96763,7 +96784,7 @@ class VBOSceneModel extends Component {
96763
96784
 
96764
96785
  let indices = cfg.indices;
96765
96786
  let edgeIndices = cfg.edgeIndices;
96766
- let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$7) : this._origin;
96787
+ let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$8) : this._origin;
96767
96788
  let positions = cfg.positions;
96768
96789
 
96769
96790
  if (positions) {
@@ -97777,8 +97798,8 @@ class TextureTranscoder {
97777
97798
  const screenPos = math.vec4();
97778
97799
  const viewPos = math.vec4();
97779
97800
 
97780
- const tempVec3a$6 = math.vec3();
97781
- const tempVec3b$3 = math.vec3();
97801
+ const tempVec3a$7 = math.vec3();
97802
+ const tempVec3b$4 = math.vec3();
97782
97803
  const tempVec3c$3 = math.vec3();
97783
97804
 
97784
97805
  const tempVec4a$4 = math.vec4();
@@ -97812,7 +97833,7 @@ class PanController {
97812
97833
  const camera = this._scene.camera;
97813
97834
 
97814
97835
  if (optionalTargetWorldPos) {
97815
- const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97836
+ const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97816
97837
  const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
97817
97838
  dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
97818
97839
  }
@@ -97836,9 +97857,9 @@ class PanController {
97836
97857
  // suddenly a lot closer than the point we pivoted about on the surface of the last object
97837
97858
  // that we click-drag-pivoted on.
97838
97859
 
97839
- const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97860
+ const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97840
97861
  const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
97841
- const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$3)), lenEyeTargetVec);
97862
+ const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$4)), lenEyeTargetVec);
97842
97863
  camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
97843
97864
  }
97844
97865
 
@@ -97855,7 +97876,7 @@ class PanController {
97855
97876
 
97856
97877
  const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
97857
97878
  const offset = math.subVec3(worldPos2, worldPos1, tempVec4c$1);
97858
- const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6)), -dollyDelta, tempVec3b$3);
97879
+ const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$7)), -dollyDelta, tempVec3b$4);
97859
97880
  const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
97860
97881
 
97861
97882
  camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
@@ -97883,8 +97904,8 @@ class PanController {
97883
97904
  }
97884
97905
  }
97885
97906
 
97886
- const tempVec3a$5 = math.vec3();
97887
- const tempVec3b$2 = math.vec3();
97907
+ const tempVec3a$6 = math.vec3();
97908
+ const tempVec3b$3 = math.vec3();
97888
97909
  const tempVec3c$2 = math.vec3();
97889
97910
 
97890
97911
  const tempVec4a$3 = math.vec4();
@@ -98016,10 +98037,10 @@ class PivotController {
98016
98037
 
98017
98038
  _cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
98018
98039
  const camera = this._scene.camera;
98019
- const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$5));
98020
- const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$2);
98040
+ const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6));
98041
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$3);
98021
98042
  let rightAxisLen = math.sqLenVec3(rightAxis);
98022
- return (rightAxisLen <= 0.0001);
98043
+ return (Math.abs(rightAxisLen) <= 0.1);
98023
98044
  }
98024
98045
 
98025
98046
  /**
@@ -98057,8 +98078,8 @@ class PivotController {
98057
98078
  const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
98058
98079
  const worldPos = tempVec4a$3;
98059
98080
  camera.project.unproject(canvasPos, screenZ, tempVec4b$3, tempVec4c, worldPos);
98060
- const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$5));
98061
- const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$2), tempVec3c$2);
98081
+ const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$6));
98082
+ const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$3), tempVec3c$2);
98062
98083
  this.setPivotPos(posOnSphere);
98063
98084
  }
98064
98085
 
@@ -98080,6 +98101,10 @@ class PivotController {
98080
98101
  if (!this._pivoting) {
98081
98102
  return;
98082
98103
  }
98104
+ if (this._cameraLookingDownwards()) {
98105
+ this._pivoting = false;
98106
+ return;
98107
+ }
98083
98108
  if (yawInc === 0 && pitchInc === 0) {
98084
98109
  return;
98085
98110
  }
@@ -98689,8 +98714,8 @@ class MousePanRotateDollyHandler {
98689
98714
  }
98690
98715
 
98691
98716
  const center = math.vec3();
98692
- const tempVec3a$4 = math.vec3();
98693
- const tempVec3b$1 = math.vec3();
98717
+ const tempVec3a$5 = math.vec3();
98718
+ const tempVec3b$2 = math.vec3();
98694
98719
  const tempVec3c$1 = math.vec3();
98695
98720
  const tempVec3d = math.vec3();
98696
98721
 
@@ -98744,39 +98769,39 @@ class KeyboardAxisViewHandler {
98744
98769
 
98745
98770
  if (axisViewRight) {
98746
98771
 
98747
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$4), tempVec3d));
98772
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$5), tempVec3d));
98748
98773
  tempCameraTarget.look.set(center);
98749
98774
  tempCameraTarget.up.set(camera.worldUp);
98750
98775
 
98751
98776
  } else if (axisViewBack) {
98752
98777
 
98753
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$4), tempVec3d));
98778
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$5), tempVec3d));
98754
98779
  tempCameraTarget.look.set(center);
98755
98780
  tempCameraTarget.up.set(camera.worldUp);
98756
98781
 
98757
98782
  } else if (axisViewLeft) {
98758
98783
 
98759
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$4), tempVec3d));
98784
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$5), tempVec3d));
98760
98785
  tempCameraTarget.look.set(center);
98761
98786
  tempCameraTarget.up.set(camera.worldUp);
98762
98787
 
98763
98788
  } else if (axisViewFront) {
98764
98789
 
98765
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$4), tempVec3d));
98790
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$5), tempVec3d));
98766
98791
  tempCameraTarget.look.set(center);
98767
98792
  tempCameraTarget.up.set(camera.worldUp);
98768
98793
 
98769
98794
  } else if (axisViewTop) {
98770
98795
 
98771
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$4), tempVec3d));
98796
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$5), tempVec3d));
98772
98797
  tempCameraTarget.look.set(center);
98773
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$1), tempVec3c$1));
98798
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$2), tempVec3c$1));
98774
98799
 
98775
98800
  } else if (axisViewBottom) {
98776
98801
 
98777
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$4), tempVec3d));
98802
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$5), tempVec3d));
98778
98803
  tempCameraTarget.look.set(center);
98779
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$1)));
98804
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$2)));
98780
98805
  }
98781
98806
 
98782
98807
  if ((!configs.firstPerson) && configs.followPointer) {
@@ -99350,6 +99375,8 @@ class KeyboardPanRotateDollyHandler {
99350
99375
  const SCALE_DOLLY_EACH_FRAME = 1; // Recalculate dolly speed for eye->target distance on each Nth frame
99351
99376
  const EPSILON = 0.001;
99352
99377
  const tempVec3$1 = math.vec3();
99378
+ const tempVec3a$4 = math.vec3();
99379
+ const tempVec3b$1 = math.vec3();
99353
99380
 
99354
99381
  /**
99355
99382
  * Handles camera updates on each "tick" that were scheduled by the various controllers.
@@ -99369,7 +99396,7 @@ class CameraUpdater {
99369
99396
  let countDown = SCALE_DOLLY_EACH_FRAME; // Decrements on each tick
99370
99397
  let dollyDistFactor = 1.0; // Calculated when countDown is zero
99371
99398
  let followPointerWorldPos = null; // Holds the pointer's World position when configs.followPointer is true
99372
-
99399
+
99373
99400
  this._onTick = scene.on("tick", () => {
99374
99401
 
99375
99402
  if (!(configs.active && configs.pointerEnabled)) {
@@ -99430,7 +99457,7 @@ class CameraUpdater {
99430
99457
 
99431
99458
  if (pickController.pickResult && pickController.pickResult.worldPos) {
99432
99459
  followPointerWorldPos = pickController.pickResult.worldPos;
99433
-
99460
+
99434
99461
  } else {
99435
99462
  dollyDistFactor = 1.0;
99436
99463
  followPointerWorldPos = null;
@@ -99650,6 +99677,13 @@ class CameraUpdater {
99650
99677
  });
99651
99678
  }
99652
99679
 
99680
+ isLookingDownwards(look, eye) {
99681
+ const camera = this._scene.camera;
99682
+ const forwardAxis = math.normalizeVec3(math.subVec3(look, eye, tempVec3a$4));
99683
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$1);
99684
+ let rightAxisLen = math.sqLenVec3(rightAxis);
99685
+ return (Math.abs(rightAxisLen) <= 0.1);
99686
+ }
99653
99687
 
99654
99688
  destroy() {
99655
99689
  this._scene.off(this._onTick);
@@ -113379,6 +113413,8 @@ class NavCubePlugin extends Plugin {
113379
113413
  * @param {Boolean} [cfg.fitVisible=false] Sets whether the axis, corner and edge-aligned views will fit the
113380
113414
  * 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````.
113381
113415
  * @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.
113416
+ * @param {Boolean} [cfg.isProjectNorth] sets whether the NavCube switches between true north and project north - using the project north offset angle.
113417
+ * @param {number} [cfg.projectNorthOffsetAngle] sets the NavCube project north offset angle - when the {@link isProjectNorth} is true.
113382
113418
  */
113383
113419
  constructor(viewer, cfg = {}) {
113384
113420
 
@@ -113424,6 +113460,9 @@ class NavCubePlugin extends Plugin {
113424
113460
 
113425
113461
  var self = this;
113426
113462
 
113463
+ this.setIsProjectNorth(cfg.isProjectNorth);
113464
+ this.setProjectNorthOffsetAngle(cfg.projectNorthOffsetAngle);
113465
+
113427
113466
  this._synchCamera = (function () {
113428
113467
  var matrix = math.rotationMat4c(-90 * math.DEGTORAD, 1, 0, 0);
113429
113468
  var eyeLookVec = math.vec3();
@@ -113445,6 +113484,9 @@ class NavCubePlugin extends Plugin {
113445
113484
  self._navCubeCamera.eye = eyeLookVec;
113446
113485
  self._navCubeCamera.up = up;
113447
113486
  }
113487
+ if (self._isProjectNorth && self._projectNorthOffsetAngle) {
113488
+ self._navCubeCamera.orbitYaw(self._projectNorthOffsetAngle);
113489
+ }
113448
113490
  };
113449
113491
  }());
113450
113492
 
@@ -113914,6 +113956,42 @@ class NavCubePlugin extends Plugin {
113914
113956
  return this._synchProjection;
113915
113957
  }
113916
113958
 
113959
+ /**
113960
+ * Sets whether the NavCube switches between project north and true north
113961
+ *
113962
+ * @param {Boolean} isProjectNorth Set ````true```` to use project north offset
113963
+ */
113964
+ setIsProjectNorth(isProjectNorth = false) {
113965
+ this._isProjectNorth = isProjectNorth;
113966
+ }
113967
+
113968
+ /**
113969
+ * Gets whether the NavCube switches between project north and true north
113970
+ *
113971
+ * @return {Boolean} isProjectNorth when ````true```` - use project north offset
113972
+ */
113973
+ getIsProjectNorth() {
113974
+ return this._isProjectNorth;
113975
+ }
113976
+
113977
+ /**
113978
+ * Sets the NavCube project north offset angle (used when {@link isProjectNorth} is ````true````
113979
+ *
113980
+ * @param {number} projectNorthOffsetAngle Set the vector offset for project north
113981
+ */
113982
+ setProjectNorthOffsetAngle(projectNorthOffsetAngle) {
113983
+ this._projectNorthOffsetAngle = projectNorthOffsetAngle;
113984
+ }
113985
+
113986
+ /**
113987
+ * Gets the offset angle between project north and true north
113988
+ *
113989
+ * @return {number} projectNorthOffsetAngle
113990
+ */
113991
+ getProjectNorthOffsetAngle() {
113992
+ return this._projectNorthOffsetAngle;
113993
+ }
113994
+
113917
113995
  /**
113918
113996
  * Destroys this NavCubePlugin.
113919
113997
  *