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

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.
@@ -7443,7 +7443,6 @@ class Component {
7443
7443
  throw "Invalid param: owner must be a Component"
7444
7444
  }
7445
7445
  this._owner = owner;
7446
- this._renderer = this.scene._renderer;
7447
7446
  }
7448
7447
 
7449
7448
  this._dontClear = !!cfg.dontClear; // Prevent Scene#clear from destroying this component
@@ -8939,7 +8938,7 @@ class VBOSceneModelNode {
8939
8938
 
8940
8939
  }
8941
8940
 
8942
- const tempVec3a$1h = math.vec3();
8941
+ const tempVec3a$1i = math.vec3();
8943
8942
 
8944
8943
  /**
8945
8944
  * Given a view matrix and a relative-to-center (RTC) coordinate origin, returns a view matrix
@@ -9019,7 +9018,7 @@ function worldToRTCPos(worldPos, rtcCenter, rtcPos) {
9019
9018
  */
9020
9019
  function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize = 1000) {
9021
9020
 
9022
- const center = math.getPositionsCenter(worldPositions, tempVec3a$1h);
9021
+ const center = math.getPositionsCenter(worldPositions, tempVec3a$1i);
9023
9022
 
9024
9023
  const rtcCenterX = Math.round(center[0] / cellSize) * cellSize;
9025
9024
  const rtcCenterY = Math.round(center[1] / cellSize) * cellSize;
@@ -9055,7 +9054,7 @@ function worldToRTCPositions(worldPositions, rtcPositions, rtcCenter, cellSize =
9055
9054
  */
9056
9055
  function getPlaneRTCPos(dist, dir, rtcCenter, rtcPlanePos) {
9057
9056
  const rtcCenterToPlaneDist = math.dotVec3(dir, rtcCenter) + dist;
9058
- const dirNormalized = math.normalizeVec3(dir, tempVec3a$1h);
9057
+ const dirNormalized = math.normalizeVec3(dir, tempVec3a$1i);
9059
9058
  math.mulVec3Scalar(dirNormalized, -rtcCenterToPlaneDist, rtcPlanePos);
9060
9059
  return rtcPlanePos;
9061
9060
  }
@@ -11520,12 +11519,12 @@ class Annotation extends Marker {
11520
11519
  const canvasPos = this.canvasPos;
11521
11520
  this._marker.style.left = (Math.floor(left + canvasPos[0]) - 12) + "px";
11522
11521
  this._marker.style.top = (Math.floor(top + canvasPos[1]) - 12) + "px";
11523
- this._marker.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11522
+ this._marker.style["z-index"] = cfg._markerZIndex;
11524
11523
  const offsetX = 20;
11525
11524
  const offsetY = -17;
11526
11525
  this._label.style.left = 20 + Math.floor(left + canvasPos[0] + offsetX) + "px";
11527
11526
  this._label.style.top = Math.floor(top + canvasPos[1] + offsetY) + "px";
11528
- this._label.style["z-index"] = 90005 + Math.floor(this._viewPos[2]) + 1;
11527
+ this._label.style["z-index"] = cfg._labelZIndex;
11529
11528
  }
11530
11529
 
11531
11530
  /**
@@ -11686,8 +11685,8 @@ class Annotation extends Marker {
11686
11685
  }
11687
11686
  }
11688
11687
 
11689
- const tempVec3a$1g = math.vec3();
11690
- const tempVec3b$c = math.vec3();
11688
+ const tempVec3a$1h = math.vec3();
11689
+ const tempVec3b$d = math.vec3();
11691
11690
  const tempVec3c$9 = math.vec3();
11692
11691
 
11693
11692
  /**
@@ -12062,6 +12061,8 @@ class AnnotationsPlugin extends Plugin {
12062
12061
  * @param {String} [cfg.id="Annotations"] Optional ID for this plugin, so that we can find it within {@link Viewer#plugins}.
12063
12062
  * @param {String} [cfg.markerHTML] HTML text template for Annotation markers. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````markerElementId````.
12064
12063
  * @param {String} [cfg.labelHTML] HTML text template for Annotation labels. Defaults to ````<div></div>````. Ignored on {@link Annotation}s configured with a ````labelElementId````.
12064
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12065
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12065
12066
  * @param {HTMLElement} [cfg.container] Container DOM element for markers and labels. Defaults to ````document.body````.
12066
12067
  * @param {{String:(String|Number)}} [cfg.values={}] Map of default values to insert into the HTML templates for the marker and label.
12067
12068
  * @param {Number} [cfg.surfaceOffset=0.3] The amount by which each {@link Annotation} is offset from the surface of
@@ -12070,10 +12071,12 @@ class AnnotationsPlugin extends Plugin {
12070
12071
  constructor(viewer, cfg) {
12071
12072
 
12072
12073
  super("Annotations", viewer);
12073
-
12074
+ const randomZIndex = 90005 + Math.floor(this._viewPos[2]) + 1;
12074
12075
  this._labelHTML = cfg.labelHTML || "<div></div>";
12075
12076
  this._markerHTML = cfg.markerHTML || "<div></div>";
12076
12077
  this._container = cfg.container || document.body;
12078
+ this._markerZIndex = cfg.markerZIndex || randomZIndex;
12079
+ this._labelZIndex = cfg.labelZIndex || randomZIndex;
12077
12080
  this._values = cfg.values || {};
12078
12081
 
12079
12082
  /**
@@ -12149,6 +12152,8 @@ class AnnotationsPlugin extends Plugin {
12149
12152
  * @param {Number[]} [params.look] Optional World-space position for {@link Camera#look}, used when this Annotation is associated with a {@link Camera} position.
12150
12153
  * @param {Number[]} [params.up] Optional World-space position for {@link Camera#up}, used when this Annotation is associated with a {@link Camera} position.
12151
12154
  * @param {String} [params.projection] Optional projection type for {@link Camera#projection}, used when this Annotation is associated with a {@link Camera} position.
12155
+ * @param {Number} [cfg.markerZIndex] Custom value for Annotation markers z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12156
+ * @param {Number} [cfg.labelZIndex] Custom value for Annotation labels z-index. Defaults to ````90005 + Math.floor(this._viewPos[2]) + 1````.
12152
12157
  * @returns {Annotation} The new {@link Annotation}.
12153
12158
  */
12154
12159
  createAnnotation(params) {
@@ -12164,8 +12169,8 @@ class AnnotationsPlugin extends Plugin {
12164
12169
  if (!pickResult.worldPos || !pickResult.worldNormal) {
12165
12170
  this.error("Param 'pickResult' does not have both worldPos and worldNormal");
12166
12171
  } else {
12167
- const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1g);
12168
- const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$c);
12172
+ const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$1h);
12173
+ const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$d);
12169
12174
  const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$9);
12170
12175
  worldPos = offsetWorldPos;
12171
12176
  entity = pickResult.entity;
@@ -12200,7 +12205,9 @@ class AnnotationsPlugin extends Plugin {
12200
12205
  markerElement: markerElement,
12201
12206
  labelElement: labelElement,
12202
12207
  markerHTML: params.markerHTML || this._markerHTML,
12208
+ markerZIndex : params.markerZIndex || this._markerZIndex,
12203
12209
  labelHTML: params.labelHTML || this._labelHTML,
12210
+ labelZIndex : params.labelZIndex || this._labelZIndex,
12204
12211
  occludable: params.occludable,
12205
12212
  values: utils.apply(params.values, utils.apply(this._values, {})),
12206
12213
  markerShown: params.markerShown,
@@ -14361,7 +14368,7 @@ const MARKER_COLOR = math.vec3([1.0, 0.0, 0.0]);
14361
14368
  const POINT_SIZE = 20;
14362
14369
  const MARKER_SPRITE_CLIPZ_OFFSET = -0.001; // Amount that we offset sprite clip Z coords to raise them from surfaces
14363
14370
 
14364
- const tempVec3a$1f = math.vec3();
14371
+ const tempVec3a$1g = math.vec3();
14365
14372
 
14366
14373
  /**
14367
14374
  * Manages occlusion testing. Private member of a Renderer.
@@ -14698,7 +14705,7 @@ class OcclusionTester {
14698
14705
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
14699
14706
  if (active) {
14700
14707
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
14701
- gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f));
14708
+ gl.uniform3fv(sectionPlaneUniforms.pos, getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1g));
14702
14709
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
14703
14710
  }
14704
14711
  }
@@ -18703,7 +18710,7 @@ class CustomProjection extends Component {
18703
18710
  }
18704
18711
 
18705
18712
  const tempVec3$6 = math.vec3();
18706
- const tempVec3b$b = math.vec3();
18713
+ const tempVec3b$c = math.vec3();
18707
18714
  const tempVec3c$8 = math.vec3();
18708
18715
  const tempVec3d$4 = math.vec3();
18709
18716
  const tempVec3e$3 = math.vec3();
@@ -19013,7 +19020,7 @@ class Camera extends Component {
19013
19020
  orbitYaw(angleInc) {
19014
19021
  let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
19015
19022
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19016
- lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$b);
19023
+ lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$c);
19017
19024
  this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$8); // Set eye position as 'look' plus 'eye' vector
19018
19025
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4); // Rotate 'up' vector
19019
19026
  }
@@ -19031,7 +19038,7 @@ class Camera extends Component {
19031
19038
  }
19032
19039
  }
19033
19040
  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));
19041
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19035
19042
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19036
19043
  eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$4);
19037
19044
  this.up = math.transformPoint3(tempMat, this._up, tempVec3e$3);
@@ -19046,7 +19053,7 @@ class Camera extends Component {
19046
19053
  yaw(angleInc) {
19047
19054
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
19048
19055
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
19049
- look2 = math.transformPoint3(tempMat, look2, tempVec3b$b);
19056
+ look2 = math.transformPoint3(tempMat, look2, tempVec3b$c);
19050
19057
  this.look = math.addVec3(look2, this._eye, tempVec3c$8);
19051
19058
  if (this._gimbalLock) {
19052
19059
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$4);
@@ -19066,7 +19073,7 @@ class Camera extends Component {
19066
19073
  }
19067
19074
  }
19068
19075
  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));
19076
+ const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$c), math.normalizeVec3(this._up, tempVec3c$8));
19070
19077
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
19071
19078
  this.up = math.transformPoint3(tempMat, this._up, tempVec3f$3);
19072
19079
  look2 = math.transformPoint3(tempMat, look2, tempVec3d$4);
@@ -19083,7 +19090,7 @@ class Camera extends Component {
19083
19090
  const vec = [0, 0, 0];
19084
19091
  let v;
19085
19092
  if (pan[0] !== 0) {
19086
- const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$b));
19093
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, []), math.normalizeVec3(this._up, tempVec3b$c));
19087
19094
  v = math.mulVec3Scalar(left, pan[0]);
19088
19095
  vec[0] += v[0];
19089
19096
  vec[1] += v[1];
@@ -19112,7 +19119,7 @@ class Camera extends Component {
19112
19119
  */
19113
19120
  zoom(delta) {
19114
19121
  const vec = math.subVec3(this._eye, this._look, tempVec3$6);
19115
- const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$b));
19122
+ const lenLook = Math.abs(math.lenVec3(vec, tempVec3b$c));
19116
19123
  const newLenLook = Math.abs(lenLook + delta);
19117
19124
  if (newLenLook < 0.5) {
19118
19125
  return;
@@ -19574,7 +19581,7 @@ class Camera extends Component {
19574
19581
  }
19575
19582
 
19576
19583
  const tempVec4$9 = math.vec4();
19577
- const tempVec3a$1e = math.vec3();
19584
+ const tempVec3a$1f = math.vec3();
19578
19585
 
19579
19586
  /**
19580
19587
  * @private
@@ -19661,7 +19668,7 @@ class TrianglesDataTextureColorRenderer {
19661
19668
  if (active) {
19662
19669
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
19663
19670
  if (origin) {
19664
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
19671
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1f);
19665
19672
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
19666
19673
  } else {
19667
19674
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20188,7 +20195,7 @@ class TrianglesDataTextureColorRenderer {
20188
20195
 
20189
20196
  const defaultColor$6 = new Float32Array([1, 1, 1]);
20190
20197
  math.vec4();
20191
- const tempVec3a$1d = math.vec3();
20198
+ const tempVec3a$1e = math.vec3();
20192
20199
 
20193
20200
  /**
20194
20201
  * @private
@@ -20296,7 +20303,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20296
20303
  if (active) {
20297
20304
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20298
20305
  if (origin) {
20299
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20306
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1e);
20300
20307
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20301
20308
  } else {
20302
20309
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -20652,7 +20659,7 @@ class TrianglesDataTextureSilhouetteRenderer {
20652
20659
  }
20653
20660
  }
20654
20661
 
20655
- const tempVec3a$1c = math.vec3();
20662
+ const tempVec3a$1d = math.vec3();
20656
20663
  const defaultColor$5 = new Float32Array([0,0,0,1]);
20657
20664
 
20658
20665
  /**
@@ -20752,7 +20759,7 @@ class TrianglesDataTextureEdgesRenderer {
20752
20759
  if (active) {
20753
20760
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
20754
20761
  if (origin) {
20755
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
20762
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1d);
20756
20763
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
20757
20764
  } else {
20758
20765
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21071,7 +21078,7 @@ class TrianglesDataTextureEdgesRenderer {
21071
21078
  }
21072
21079
  }
21073
21080
 
21074
- const tempVec3a$1b = math.vec3();
21081
+ const tempVec3a$1c = math.vec3();
21075
21082
 
21076
21083
  /**
21077
21084
  * @private
@@ -21145,7 +21152,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21145
21152
  if (active) {
21146
21153
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21147
21154
  if (origin) {
21148
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21155
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1c);
21149
21156
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21150
21157
  } else {
21151
21158
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21473,7 +21480,7 @@ class TrianglesDataTextureEdgesColorRenderer {
21473
21480
  }
21474
21481
  }
21475
21482
 
21476
- const tempVec3a$1a = math.vec3();
21483
+ const tempVec3a$1b = math.vec3();
21477
21484
 
21478
21485
  /**
21479
21486
  * @private
@@ -21560,7 +21567,7 @@ class TrianglesDataTexturePickMeshRenderer {
21560
21567
  if (active) {
21561
21568
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
21562
21569
  if (origin) {
21563
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
21570
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1b);
21564
21571
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
21565
21572
  } else {
21566
21573
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -21916,7 +21923,7 @@ class TrianglesDataTexturePickMeshRenderer {
21916
21923
  }
21917
21924
  }
21918
21925
 
21919
- const tempVec3a$19 = math.vec3();
21926
+ const tempVec3a$1a = math.vec3();
21920
21927
 
21921
21928
  /**
21922
21929
  * @private
@@ -22008,7 +22015,7 @@ class TrianglesDataTexturePickDepthRenderer {
22008
22015
  if (active) {
22009
22016
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22010
22017
  if (origin) {
22011
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22018
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$1a);
22012
22019
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22013
22020
  } else {
22014
22021
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -22367,7 +22374,7 @@ class TrianglesDataTexturePickDepthRenderer {
22367
22374
  }
22368
22375
  }
22369
22376
 
22370
- const tempVec3a$18 = math.vec3();
22377
+ const tempVec3a$19 = math.vec3();
22371
22378
 
22372
22379
  /**
22373
22380
  * @private
@@ -22459,7 +22466,7 @@ class TrianglesDataTexturePickNormalsRenderer {
22459
22466
  if (active) {
22460
22467
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
22461
22468
  if (origin) {
22462
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
22469
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$19);
22463
22470
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
22464
22471
  } else {
22465
22472
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23023,7 +23030,7 @@ class TrianglesDataTextureOcclusionRenderer {
23023
23030
  }
23024
23031
 
23025
23032
  math.vec4();
23026
- const tempVec3a$17 = math.vec3();
23033
+ const tempVec3a$18 = math.vec3();
23027
23034
 
23028
23035
  /**
23029
23036
  * @private
@@ -23108,7 +23115,7 @@ class TrianglesDataTextureDepthRenderer {
23108
23115
  if (active) {
23109
23116
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23110
23117
  if (origin) {
23111
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23118
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$18);
23112
23119
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23113
23120
  } else {
23114
23121
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23479,7 +23486,7 @@ class TrianglesDataTextureDepthRenderer {
23479
23486
  }
23480
23487
  }
23481
23488
 
23482
- const tempVec3a$16 = math.vec3();
23489
+ const tempVec3a$17 = math.vec3();
23483
23490
 
23484
23491
  /**
23485
23492
  * @private
@@ -23542,7 +23549,7 @@ class TrianglesDataTextureNormalsRenderer {
23542
23549
  if (active) {
23543
23550
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
23544
23551
  if (origin) {
23545
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
23552
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$17);
23546
23553
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
23547
23554
  } else {
23548
23555
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -23972,7 +23979,7 @@ class TrianglesDataTextureShadowRenderer {
23972
23979
  }
23973
23980
 
23974
23981
  const tempVec4$8 = math.vec4();
23975
- const tempVec3a$15 = math.vec3();
23982
+ const tempVec3a$16 = math.vec3();
23976
23983
 
23977
23984
  const TEXTURE_DECODE_FUNCS$2 = {
23978
23985
  "linear": "linearToLinear",
@@ -24043,7 +24050,7 @@ class TrianglesDataTextureColorQualityRenderer {
24043
24050
  if (active) {
24044
24051
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24045
24052
  if (origin) {
24046
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24053
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$16);
24047
24054
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24048
24055
  } else {
24049
24056
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -24782,7 +24789,7 @@ class TrianglesDataTextureColorQualityRenderer {
24782
24789
  }
24783
24790
  }
24784
24791
 
24785
- const tempVec3a$14 = math.vec3();
24792
+ const tempVec3a$15 = math.vec3();
24786
24793
 
24787
24794
  /**
24788
24795
  * @private
@@ -24896,7 +24903,7 @@ class TrianglesDataTexturePickNormalsFlatRenderer {
24896
24903
  if (active) {
24897
24904
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
24898
24905
  if (origin) {
24899
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$14);
24906
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$15);
24900
24907
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
24901
24908
  } else {
24902
24909
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -27615,6 +27622,12 @@ const MAX_DATA_TEXTURE_HEIGHT = (1 << 12);
27615
27622
  */
27616
27623
  const INDICES_EDGE_INDICES_ALIGNEMENT_SIZE = 8;
27617
27624
 
27625
+ /**
27626
+ * Number of maximum allowed per-object flags update per render frame
27627
+ * before switching to batch update mode.
27628
+ */
27629
+ const MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE = 10;
27630
+
27618
27631
  const identityMatrix = math.identityMat4();
27619
27632
  math.mat4();
27620
27633
  math.mat4();
@@ -27627,8 +27640,8 @@ const tempUint8Array4 = new Uint8Array (4);
27627
27640
 
27628
27641
  const tempFloat32Array3 = new Float32Array (3);
27629
27642
 
27630
- const tempVec3a$13 = math.vec3();
27631
- const tempVec3b$a = math.vec3();
27643
+ const tempVec3a$14 = math.vec3();
27644
+ const tempVec3b$b = math.vec3();
27632
27645
  const tempVec3c$7 = math.vec3();
27633
27646
  const tempVec3d$3 = math.vec3();
27634
27647
  const tempVec3e$2 = math.vec3();
@@ -27642,7 +27655,7 @@ let _numberOfLayers = 0;
27642
27655
  */
27643
27656
  class TrianglesDataTextureLayer {
27644
27657
  /**
27645
- * @param model
27658
+ * @param {DataTextureSceneModel} model
27646
27659
  * @param cfg
27647
27660
  * @param cfg.layerIndex
27648
27661
  * @param cfg.positionsDecodeMatrix
@@ -27732,6 +27745,12 @@ class TrianglesDataTextureLayer {
27732
27745
  * @type {*|Float64Array}
27733
27746
  */
27734
27747
  this.aabb = math.collapseAABB3();
27748
+
27749
+ /**
27750
+ * The number of updates in the current frame;
27751
+ * @type {number}
27752
+ */
27753
+ this.numUpdatesInFrame = 0;
27735
27754
  }
27736
27755
 
27737
27756
  /**
@@ -28443,6 +28462,18 @@ class TrianglesDataTextureLayer {
28443
28462
 
28444
28463
  this._finalized = true;
28445
28464
  }
28465
+
28466
+ attachToRenderingEvent() {
28467
+ const self = this;
28468
+
28469
+ this.model.scene.on ("rendering", function () {
28470
+ if (self._deferredSetFlagsDirty)
28471
+ {
28472
+ self.commitDeferredFlags();
28473
+ }
28474
+ self.numUpdatesInFrame = 0;
28475
+ });
28476
+ }
28446
28477
 
28447
28478
  isEmpty() {
28448
28479
  return this._numPortions == 0;
@@ -28593,6 +28624,8 @@ class TrianglesDataTextureLayer {
28593
28624
  * In massive "set-flags" scenarios like VFC or LOD mechanisms, the combina-
28594
28625
  * tion of `beginDeferredFlags` + `commitDeferredFlags`brings a speed-up of
28595
28626
  * up to 80x when e.g. objects are massively (un)culled 🚀.
28627
+ *
28628
+ * @private
28596
28629
  */
28597
28630
  beginDeferredFlags ()
28598
28631
  {
@@ -28604,6 +28637,8 @@ class TrianglesDataTextureLayer {
28604
28637
  *
28605
28638
  * Invoking this method will update the colors+flags texture data with new
28606
28639
  * flags/flags2 set since the previous invocation of `beginDeferredFlags`.
28640
+ *
28641
+ * @private
28607
28642
  */
28608
28643
  commitDeferredFlags ()
28609
28644
  {
@@ -28719,6 +28754,11 @@ class TrianglesDataTextureLayer {
28719
28754
  this._deferredSetFlagsDirty = true;
28720
28755
  return;
28721
28756
  }
28757
+
28758
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28759
+ {
28760
+ this.beginDeferredFlags();
28761
+ }
28722
28762
 
28723
28763
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28724
28764
 
@@ -28845,6 +28885,11 @@ class TrianglesDataTextureLayer {
28845
28885
  return;
28846
28886
  }
28847
28887
 
28888
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28889
+ {
28890
+ this.beginDeferredFlags();
28891
+ }
28892
+
28848
28893
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28849
28894
 
28850
28895
  gl.texSubImage2D(
@@ -28899,6 +28944,11 @@ class TrianglesDataTextureLayer {
28899
28944
  this._deferredSetFlagsDirty = true;
28900
28945
  return;
28901
28946
  }
28947
+
28948
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
28949
+ {
28950
+ this.beginDeferredFlags();
28951
+ }
28902
28952
 
28903
28953
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdColorsAndFlags._texture);
28904
28954
 
@@ -28956,6 +29006,11 @@ class TrianglesDataTextureLayer {
28956
29006
  this._deferredSetFlagsDirty = true;
28957
29007
  return;
28958
29008
  }
29009
+
29010
+ if (++this.numUpdatesInFrame >= MAX_OBJECT_UPDATES_IN_FRAME_WITHOUT_BATCHED_UPDATE)
29011
+ {
29012
+ this.beginDeferredFlags();
29013
+ }
28959
29014
 
28960
29015
  gl.bindTexture (gl.TEXTURE_2D, textureState.texturePerObjectIdOffsets._texture);
28961
29016
 
@@ -29211,8 +29266,8 @@ class TrianglesDataTextureLayer {
29211
29266
  const origin = state.origin;
29212
29267
  const offset = portion.offset;
29213
29268
 
29214
- const rtcRayOrigin = tempVec3a$13;
29215
- const rtcRayDir = tempVec3b$a;
29269
+ const rtcRayOrigin = tempVec3a$14;
29270
+ const rtcRayDir = tempVec3b$b;
29216
29271
 
29217
29272
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$7) : worldRayOrigin); // World -> RTC
29218
29273
  rtcRayDir.set(worldRayDir);
@@ -29910,10 +29965,8 @@ class LodCullingManager {
29910
29965
  applyLodCulling (currentFPS)
29911
29966
  {
29912
29967
  let lodState = this.lodState;
29913
- const model = this.model;
29968
+ this.model;
29914
29969
 
29915
- model.beginDeferredFlagsInAllLayers ();
29916
-
29917
29970
  let retVal = false;
29918
29971
 
29919
29972
  if (currentFPS < lodState.targetFps)
@@ -29933,8 +29986,6 @@ class LodCullingManager {
29933
29986
  }
29934
29987
  }
29935
29988
 
29936
- model.commitDeferredFlagsInAllLayers ();
29937
-
29938
29989
  if (retVal) {
29939
29990
  console.log ("LOD level = " + lodState.lodLevelIndex);
29940
29991
  }
@@ -29944,10 +29995,8 @@ class LodCullingManager {
29944
29995
 
29945
29996
  resetLodCulling ()
29946
29997
  {
29947
- const model = this.model;
29998
+ this.model;
29948
29999
 
29949
- model.beginDeferredFlagsInAllLayers ();
29950
-
29951
30000
  let retVal = false;
29952
30001
 
29953
30002
  let decreasedLevel = false;
@@ -29956,8 +30005,6 @@ class LodCullingManager {
29956
30005
  retVal |= (decreasedLevel = this._decreaseLODLevelIndex());
29957
30006
  } while (decreasedLevel);
29958
30007
 
29959
- model.commitDeferredFlagsInAllLayers ();
29960
-
29961
30008
  if (retVal) {
29962
30009
  console.log ("LOD resetted");
29963
30010
  }
@@ -31675,16 +31722,12 @@ const VISIBILITY_CHECK_ENVOLVES_V = (1 << 14);
31675
31722
  const internalNodesList = this._internalNodesList;
31676
31723
  const lastVisibleFrameOfNodes = this._lastVisibleFrameOfNodes;
31677
31724
 
31678
- model.beginDeferredFlagsInAllLayers ();
31679
-
31680
31725
  for (let i = 0, len = internalNodesList.length; i < len; i++)
31681
31726
  {
31682
31727
  if (internalNodesList[i]) {
31683
31728
  internalNodesList[i].culledVFC = lastVisibleFrameOfNodes[i] !== cullFrame;
31684
31729
  }
31685
31730
  }
31686
-
31687
- model.commitDeferredFlagsInAllLayers ();
31688
31731
  }
31689
31732
 
31690
31733
  /**
@@ -32073,7 +32116,7 @@ class ViewFrustumCullingManager {
32073
32116
 
32074
32117
  WEBGL_INFO.SUPPORTED_EXTENSIONS["ANGLE_instanced_arrays"];
32075
32118
 
32076
- const tempVec3a$12 = math.vec3();
32119
+ const tempVec3a$13 = math.vec3();
32077
32120
  const tempMat4$3 = math.mat4();
32078
32121
 
32079
32122
  const defaultScale$1 = math.vec3([1, 1, 1]);
@@ -33045,7 +33088,7 @@ class DataTextureSceneModel extends Component {
33045
33088
  }
33046
33089
 
33047
33090
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
33048
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$12) : this._origin;
33091
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$13) : this._origin;
33049
33092
 
33050
33093
  switch (primitive) {
33051
33094
  case "triangles":
@@ -33309,7 +33352,7 @@ class DataTextureSceneModel extends Component {
33309
33352
  if (!origin) {
33310
33353
  origin = cfgOrigin;
33311
33354
  } else {
33312
- origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$12);
33355
+ origin = math.addVec3(this._origin, cfgOrigin, tempVec3a$13);
33313
33356
  }
33314
33357
  } else {
33315
33358
  origin = this._origin;
@@ -33501,8 +33544,6 @@ class DataTextureSceneModel extends Component {
33501
33544
  return;
33502
33545
  }
33503
33546
 
33504
- this.beginDeferredFlagsInAllLayers ();
33505
-
33506
33547
  if (this._vfcManager) {
33507
33548
  this._vfcManager.finalize (
33508
33549
  function () {
@@ -33531,9 +33572,7 @@ class DataTextureSceneModel extends Component {
33531
33572
  node._finalize2();
33532
33573
  }
33533
33574
 
33534
-
33535
33575
  // Sort layers to reduce WebGL shader switching when rendering them
33536
-
33537
33576
  this._layerList.sort((a, b) => {
33538
33577
  if (a.sortId < b.sortId) {
33539
33578
  return -1;
@@ -33549,8 +33588,6 @@ class DataTextureSceneModel extends Component {
33549
33588
  layer.layerIndex = i;
33550
33589
  }
33551
33590
 
33552
- this.commitDeferredFlagsInAllLayers ();
33553
-
33554
33591
  this.glRedraw();
33555
33592
 
33556
33593
  this.scene._aabbDirty = true;
@@ -33565,6 +33602,11 @@ class DataTextureSceneModel extends Component {
33565
33602
  this._targetLodFps
33566
33603
  );
33567
33604
  }
33605
+
33606
+ for (let i = 0, len = this._layerList.length; i < len; i++) {
33607
+ const layer = this._layerList[i];
33608
+ layer.attachToRenderingEvent();
33609
+ }
33568
33610
  }
33569
33611
 
33570
33612
  _rebuildAABB() {
@@ -33607,33 +33649,6 @@ class DataTextureSceneModel extends Component {
33607
33649
  }
33608
33650
  }
33609
33651
 
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
33652
  /** @private */
33638
33653
  _getActiveSectionPlanesForLayer(layer) {
33639
33654
 
@@ -45966,7 +45981,7 @@ function buildFragmentDraw(mesh) {
45966
45981
  * @author xeolabs / https://github.com/xeolabs
45967
45982
  */
45968
45983
 
45969
- const tempVec3a$11 = math.vec3();
45984
+ const tempVec3a$12 = math.vec3();
45970
45985
 
45971
45986
  const ids$2 = new Map$1({});
45972
45987
 
@@ -46065,7 +46080,7 @@ DrawRenderer.prototype.drawMesh = function (frameCtx, mesh) {
46065
46080
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
46066
46081
  if (active) {
46067
46082
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
46068
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
46083
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$12) : sectionPlane.pos);
46069
46084
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
46070
46085
  }
46071
46086
  }
@@ -47203,7 +47218,7 @@ function buildFragment$5(mesh) {
47203
47218
 
47204
47219
  const ids$1 = new Map$1({});
47205
47220
 
47206
- const tempVec3a$10 = math.vec3();
47221
+ const tempVec3a$11 = math.vec3();
47207
47222
 
47208
47223
  /**
47209
47224
  * @private
@@ -47287,7 +47302,7 @@ EmphasisFillRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47287
47302
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47288
47303
  if (active) {
47289
47304
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47290
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47305
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$11) : sectionPlane.pos);
47291
47306
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47292
47307
  }
47293
47308
  }
@@ -47623,7 +47638,7 @@ function buildFragment$4(mesh) {
47623
47638
 
47624
47639
  const ids = new Map$1({});
47625
47640
 
47626
- const tempVec3a$$ = math.vec3();
47641
+ const tempVec3a$10 = math.vec3();
47627
47642
 
47628
47643
  /**
47629
47644
  * @private
@@ -47706,7 +47721,7 @@ EmphasisEdgesRenderer.prototype.drawMesh = function (frameCtx, mesh, mode) {
47706
47721
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
47707
47722
  if (active) {
47708
47723
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
47709
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
47724
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$10) : sectionPlane.pos);
47710
47725
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
47711
47726
  }
47712
47727
  }
@@ -48001,7 +48016,7 @@ function buildFragment$3(mesh) {
48001
48016
  * @author xeolabs / https://github.com/xeolabs
48002
48017
  */
48003
48018
 
48004
- const tempVec3a$_ = math.vec3();
48019
+ const tempVec3a$$ = math.vec3();
48005
48020
 
48006
48021
  // No ID, because there is exactly one PickMeshRenderer per scene
48007
48022
 
@@ -48085,7 +48100,7 @@ PickMeshRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48085
48100
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48086
48101
  if (active) {
48087
48102
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48088
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48103
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$$) : sectionPlane.pos);
48089
48104
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48090
48105
  }
48091
48106
  }
@@ -48318,7 +48333,7 @@ function buildFragment$2(mesh) {
48318
48333
  * @author xeolabs / https://github.com/xeolabs
48319
48334
  */
48320
48335
 
48321
- const tempVec3a$Z = math.vec3();
48336
+ const tempVec3a$_ = math.vec3();
48322
48337
 
48323
48338
  /**
48324
48339
  * @private
@@ -48410,7 +48425,7 @@ PickTriangleRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48410
48425
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48411
48426
  if (active) {
48412
48427
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48413
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48428
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$_) : sectionPlane.pos);
48414
48429
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48415
48430
  }
48416
48431
  }
@@ -48647,7 +48662,7 @@ function buildFragment$1(mesh) {
48647
48662
  * @author xeolabs / https://github.com/xeolabs
48648
48663
  */
48649
48664
 
48650
- const tempVec3a$Y = math.vec3();
48665
+ const tempVec3a$Z = math.vec3();
48651
48666
 
48652
48667
  // No ID, because there is exactly one PickMeshRenderer per scene
48653
48668
 
@@ -48755,7 +48770,7 @@ OcclusionRenderer.prototype.drawMesh = function (frameCtx, mesh) {
48755
48770
  gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
48756
48771
  if (active) {
48757
48772
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
48758
- gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Y) : sectionPlane.pos);
48773
+ gl.uniform3fv(sectionPlaneUniforms.pos, origin ? getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Z) : sectionPlane.pos);
48759
48774
  gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
48760
48775
  }
48761
48776
  }
@@ -61357,8 +61372,8 @@ class LineSet extends Component {
61357
61372
  }
61358
61373
 
61359
61374
  const tempVec3$4 = math.vec3();
61360
- const tempVec3a$X = math.vec3();
61361
- const tempVec3b$9 = math.vec3();
61375
+ const tempVec3a$Y = math.vec3();
61376
+ const tempVec3b$a = math.vec3();
61362
61377
  const tempVec3c$6 = math.vec3();
61363
61378
 
61364
61379
  /**
@@ -62038,8 +62053,8 @@ class BCFViewpointsPlugin extends Plugin {
62038
62053
  bcfViewpoint.bitmaps.forEach(function (e) {
62039
62054
  const bitmap_type = e.bitmap_type || "jpg"; // "jpg" | "png"
62040
62055
  const bitmap_data = e.bitmap_data; // base64
62041
- let location = xyzObjectToArray(e.location, tempVec3a$X);
62042
- let normal = xyzObjectToArray(e.normal, tempVec3b$9);
62056
+ let location = xyzObjectToArray(e.location, tempVec3a$Y);
62057
+ let normal = xyzObjectToArray(e.normal, tempVec3b$a);
62043
62058
  let up = xyzObjectToArray(e.up, tempVec3c$6);
62044
62059
  let height = e.height || 1;
62045
62060
  if (!bitmap_type) {
@@ -63928,7 +63943,7 @@ class SplineCurve extends Curve {
63928
63943
  }
63929
63944
  }
63930
63945
 
63931
- const tempVec3a$W = math.vec3();
63946
+ const tempVec3a$X = math.vec3();
63932
63947
 
63933
63948
  /**
63934
63949
  * @desc Defines a sequence of frames along which a {@link CameraPathAnimation} can animate a {@link Camera}.
@@ -64060,9 +64075,9 @@ class CameraPath extends Component {
64060
64075
  t = t / (this._frames[this._frames.length - 1].t - this._frames[0].t);
64061
64076
  t = t < 0.0 ? 0.0 : (t > 1.0 ? 1.0 : t);
64062
64077
 
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);
64078
+ camera.eye = this._eyeCurve.getPoint(t, tempVec3a$X);
64079
+ camera.look = this._lookCurve.getPoint(t, tempVec3a$X);
64080
+ camera.up = this._upCurve.getPoint(t, tempVec3a$X);
64066
64081
  }
64067
64082
 
64068
64083
  /**
@@ -65101,7 +65116,7 @@ CameraPathAnimation.PLAYING = 2;
65101
65116
  CameraPathAnimation.PLAYING_TO = 3;
65102
65117
 
65103
65118
  const tempVec3$2 = math.vec3();
65104
- const tempVec3b$8 = math.vec3();
65119
+ const tempVec3b$9 = math.vec3();
65105
65120
  math.vec3();
65106
65121
  const zeroVec$1 = math.vec3([0, -1, 0]);
65107
65122
  const tempQuat = math.vec4([0, 0, 0, 1]);
@@ -65529,7 +65544,7 @@ class ImagePlane extends Component {
65529
65544
  const dist = -math.dotVec3(negDir, tempVec3$2);
65530
65545
 
65531
65546
  math.normalizeVec3(negDir);
65532
- math.mulVec3Scalar(negDir, dist, tempVec3b$8);
65547
+ math.mulVec3Scalar(negDir, dist, tempVec3b$9);
65533
65548
  math.vec3PairToQuaternion(zeroVec$1, dir, tempQuat);
65534
65549
 
65535
65550
  this._node.quaternion = tempQuat;
@@ -66695,8 +66710,8 @@ class SpriteMarker extends Marker {
66695
66710
  }
66696
66711
  }
66697
66712
 
66698
- const tempVec3a$V = math.vec3();
66699
- const tempVec3b$7 = math.vec3();
66713
+ const tempVec3a$W = math.vec3();
66714
+ const tempVec3b$8 = math.vec3();
66700
66715
  const tempMat4a = math.mat4();
66701
66716
 
66702
66717
  /**
@@ -66773,8 +66788,8 @@ function frustumIntersectsAABB3(frustum, aabb) {
66773
66788
 
66774
66789
  let ret = Frustum.INSIDE;
66775
66790
 
66776
- const min = tempVec3a$V;
66777
- const max = tempVec3b$7;
66791
+ const min = tempVec3a$W;
66792
+ const max = tempVec3b$8;
66778
66793
 
66779
66794
  min[0] = aabb[0];
66780
66795
  min[1] = aabb[1];
@@ -69355,7 +69370,7 @@ const RENDER_PASSES = {
69355
69370
  };
69356
69371
 
69357
69372
  const tempVec4$7 = math.vec4();
69358
- const tempVec3a$U = math.vec3();
69373
+ const tempVec3a$V = math.vec3();
69359
69374
 
69360
69375
  /**
69361
69376
  * @private
@@ -69420,7 +69435,7 @@ class TrianglesBatchingColorRenderer {
69420
69435
  if (active) {
69421
69436
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69422
69437
  if (origin) {
69423
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69438
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$V);
69424
69439
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69425
69440
  } else {
69426
69441
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -69848,7 +69863,7 @@ class TrianglesBatchingColorRenderer {
69848
69863
  }
69849
69864
 
69850
69865
  const tempVec4$6 = math.vec4();
69851
- const tempVec3a$T = math.vec3();
69866
+ const tempVec3a$U = math.vec3();
69852
69867
 
69853
69868
  /**
69854
69869
  * @private
@@ -69910,7 +69925,7 @@ class TrianglesBatchingFlatColorRenderer {
69910
69925
  if (active) {
69911
69926
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69912
69927
  if (origin) {
69913
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
69928
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69914
69929
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69915
69930
  } else {
69916
69931
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70327,7 +70342,7 @@ class TrianglesBatchingFlatColorRenderer {
70327
70342
  }
70328
70343
 
70329
70344
  const defaultColor$4 = new Float32Array([1, 1, 1]);
70330
- const tempVec3a$S = math.vec3();
70345
+ const tempVec3a$T = math.vec3();
70331
70346
 
70332
70347
  /**
70333
70348
  * @private
@@ -70411,7 +70426,7 @@ class TrianglesBatchingSilhouetteRenderer {
70411
70426
  if (active) {
70412
70427
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70413
70428
  if (origin) {
70414
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70429
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
70415
70430
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70416
70431
  } else {
70417
70432
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70648,7 +70663,7 @@ class TrianglesBatchingSilhouetteRenderer {
70648
70663
  }
70649
70664
  }
70650
70665
 
70651
- const tempVec3a$R = math.vec3();
70666
+ const tempVec3a$S = math.vec3();
70652
70667
  const defaultColor$3 = new Float32Array([0,0,0,1]);
70653
70668
 
70654
70669
  /**
@@ -70731,7 +70746,7 @@ class TrianglesBatchingEdgesRenderer {
70731
70746
  if (active) {
70732
70747
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70733
70748
  if (origin) {
70734
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
70749
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70735
70750
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70736
70751
  } else {
70737
70752
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70959,7 +70974,7 @@ class TrianglesBatchingEdgesRenderer {
70959
70974
  }
70960
70975
  }
70961
70976
 
70962
- const tempVec3a$Q = math.vec3();
70977
+ const tempVec3a$R = math.vec3();
70963
70978
 
70964
70979
  /**
70965
70980
  * @private
@@ -71019,7 +71034,7 @@ class TrianglesBatchingEdgesColorRenderer {
71019
71034
  if (active) {
71020
71035
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71021
71036
  if (origin) {
71022
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71037
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
71023
71038
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71024
71039
  } else {
71025
71040
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71247,7 +71262,7 @@ class TrianglesBatchingEdgesColorRenderer {
71247
71262
  }
71248
71263
  }
71249
71264
 
71250
- const tempVec3a$P = math.vec3();
71265
+ const tempVec3a$Q = math.vec3();
71251
71266
 
71252
71267
  /**
71253
71268
  * @private
@@ -71313,7 +71328,7 @@ class TrianglesBatchingPickMeshRenderer {
71313
71328
  if (active) {
71314
71329
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71315
71330
  if (origin) {
71316
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71331
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71317
71332
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71318
71333
  } else {
71319
71334
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71543,7 +71558,7 @@ class TrianglesBatchingPickMeshRenderer {
71543
71558
  }
71544
71559
  }
71545
71560
 
71546
- const tempVec3a$O = math.vec3();
71561
+ const tempVec3a$P = math.vec3();
71547
71562
 
71548
71563
  /**
71549
71564
  * @private
@@ -71614,7 +71629,7 @@ class TrianglesBatchingPickDepthRenderer {
71614
71629
  if (active) {
71615
71630
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71616
71631
  if (origin) {
71617
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71632
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71618
71633
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71619
71634
  } else {
71620
71635
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71852,7 +71867,7 @@ class TrianglesBatchingPickDepthRenderer {
71852
71867
  }
71853
71868
  }
71854
71869
 
71855
- const tempVec3a$N = math.vec3();
71870
+ const tempVec3a$O = math.vec3();
71856
71871
 
71857
71872
  /**
71858
71873
  * @private
@@ -71920,7 +71935,7 @@ class TrianglesBatchingPickNormalsRenderer {
71920
71935
  if (active) {
71921
71936
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71922
71937
  if (origin) {
71923
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
71938
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71924
71939
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71925
71940
  } else {
71926
71941
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72145,7 +72160,7 @@ class TrianglesBatchingPickNormalsRenderer {
72145
72160
  }
72146
72161
  }
72147
72162
 
72148
- const tempVec3a$M = math.vec3();
72163
+ const tempVec3a$N = math.vec3();
72149
72164
 
72150
72165
  /**
72151
72166
  * @private
@@ -72205,7 +72220,7 @@ class TrianglesBatchingOcclusionRenderer {
72205
72220
  if (active) {
72206
72221
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72207
72222
  if (origin) {
72208
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72223
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
72209
72224
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72210
72225
  } else {
72211
72226
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72428,7 +72443,7 @@ class TrianglesBatchingOcclusionRenderer {
72428
72443
  }
72429
72444
  }
72430
72445
 
72431
- const tempVec3a$L = math.vec3();
72446
+ const tempVec3a$M = math.vec3();
72432
72447
 
72433
72448
  /**
72434
72449
  * @private
@@ -72488,7 +72503,7 @@ class TrianglesBatchingDepthRenderer {
72488
72503
  if (active) {
72489
72504
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72490
72505
  if (origin) {
72491
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72506
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72492
72507
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72493
72508
  } else {
72494
72509
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72712,7 +72727,7 @@ class TrianglesBatchingDepthRenderer {
72712
72727
  }
72713
72728
  }
72714
72729
 
72715
- const tempVec3a$K = math.vec3();
72730
+ const tempVec3a$L = math.vec3();
72716
72731
 
72717
72732
  /**
72718
72733
  * @private
@@ -72775,7 +72790,7 @@ class TrianglesBatchingNormalsRenderer {
72775
72790
  if (active) {
72776
72791
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72777
72792
  if (origin) {
72778
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
72793
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72779
72794
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72780
72795
  } else {
72781
72796
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73015,7 +73030,7 @@ class TrianglesBatchingNormalsRenderer {
73015
73030
  }
73016
73031
  }
73017
73032
 
73018
- const tempVec3a$J = math.vec3();
73033
+ const tempVec3a$K = math.vec3();
73019
73034
 
73020
73035
  /**
73021
73036
  * Renders BatchingLayer fragment depths to a shadow map.
@@ -73084,7 +73099,7 @@ class TrianglesBatchingShadowRenderer {
73084
73099
  if (active) {
73085
73100
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73086
73101
  if (origin) {
73087
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73102
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
73088
73103
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73089
73104
  } else {
73090
73105
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73256,7 +73271,7 @@ class TrianglesBatchingShadowRenderer {
73256
73271
  }
73257
73272
 
73258
73273
  const tempVec4$5 = math.vec4();
73259
- const tempVec3a$I = math.vec3();
73274
+ const tempVec3a$J = math.vec3();
73260
73275
 
73261
73276
  // const TEXTURE_DECODE_FUNCS = {};
73262
73277
  // TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -73329,7 +73344,7 @@ class TrianglesBatchingPBRRenderer {
73329
73344
  if (active) {
73330
73345
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73331
73346
  if (origin) {
73332
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
73347
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73333
73348
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73334
73349
  } else {
73335
73350
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74134,7 +74149,7 @@ class TrianglesBatchingPBRRenderer {
74134
74149
  }
74135
74150
  }
74136
74151
 
74137
- const tempVec3a$H = math.vec3();
74152
+ const tempVec3a$I = math.vec3();
74138
74153
 
74139
74154
  /**
74140
74155
  * @private
@@ -74201,7 +74216,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74201
74216
  if (active) {
74202
74217
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74203
74218
  if (origin) {
74204
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74219
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
74205
74220
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74206
74221
  } else {
74207
74222
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74411,7 +74426,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74411
74426
  }
74412
74427
 
74413
74428
  const tempVec4$4 = math.vec4();
74414
- const tempVec3a$G = math.vec3();
74429
+ const tempVec3a$H = math.vec3();
74415
74430
 
74416
74431
  /**
74417
74432
  * @private
@@ -74476,7 +74491,7 @@ class TrianglesBatchingColorTextureRenderer {
74476
74491
  if (active) {
74477
74492
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74478
74493
  if (origin) {
74479
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$G);
74494
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74480
74495
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74481
74496
  } else {
74482
74497
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -75482,8 +75497,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
75482
75497
  const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
75483
75498
  const tempOBB3$2 = math.OBB3();
75484
75499
 
75485
- const tempVec3a$F = math.vec3();
75486
- const tempVec3b$6 = math.vec3();
75500
+ const tempVec3a$G = math.vec3();
75501
+ const tempVec3b$7 = math.vec3();
75487
75502
  const tempVec3c$5 = math.vec3();
75488
75503
  const tempVec3d$2 = math.vec3();
75489
75504
  const tempVec3e$1 = math.vec3();
@@ -76662,8 +76677,8 @@ class TrianglesBatchingLayer {
76662
76677
  const origin = state.origin;
76663
76678
  const offset = portion.offset;
76664
76679
 
76665
- const rtcRayOrigin = tempVec3a$F;
76666
- const rtcRayDir = tempVec3b$6;
76680
+ const rtcRayOrigin = tempVec3a$G;
76681
+ const rtcRayDir = tempVec3b$7;
76667
76682
 
76668
76683
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
76669
76684
  rtcRayDir.set(worldRayDir);
@@ -76786,7 +76801,7 @@ class TrianglesBatchingLayer {
76786
76801
  }
76787
76802
 
76788
76803
  const tempVec4$3 = math.vec4();
76789
- const tempVec3a$E = math.vec3();
76804
+ const tempVec3a$F = math.vec3();
76790
76805
 
76791
76806
  /**
76792
76807
  * @private
@@ -76852,7 +76867,7 @@ class TrianglesInstancingColorRenderer {
76852
76867
  if (active) {
76853
76868
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
76854
76869
  if (origin) {
76855
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
76870
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$F);
76856
76871
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76857
76872
  } else {
76858
76873
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77329,7 +77344,7 @@ class TrianglesInstancingColorRenderer {
77329
77344
  }
77330
77345
 
77331
77346
  const tempVec4$2 = math.vec4();
77332
- const tempVec3a$D = math.vec3();
77347
+ const tempVec3a$E = math.vec3();
77333
77348
 
77334
77349
  /**
77335
77350
  * @private
@@ -77391,7 +77406,7 @@ class TrianglesInstancingFlatColorRenderer {
77391
77406
  if (active) {
77392
77407
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77393
77408
  if (origin) {
77394
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77409
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
77395
77410
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77396
77411
  } else {
77397
77412
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77838,7 +77853,7 @@ class TrianglesInstancingFlatColorRenderer {
77838
77853
  }
77839
77854
  }
77840
77855
 
77841
- const tempVec3a$C = math.vec3();
77856
+ const tempVec3a$D = math.vec3();
77842
77857
 
77843
77858
  /**
77844
77859
  * @private
@@ -77921,7 +77936,7 @@ class TrianglesInstancingSilhouetteRenderer {
77921
77936
  if (active) {
77922
77937
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77923
77938
  if (origin) {
77924
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
77939
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77925
77940
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77926
77941
  } else {
77927
77942
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78193,7 +78208,7 @@ class TrianglesInstancingSilhouetteRenderer {
78193
78208
  }
78194
78209
  }
78195
78210
 
78196
- const tempVec3a$B = math.vec3();
78211
+ const tempVec3a$C = math.vec3();
78197
78212
  const defaultColor$2 = new Float32Array([0,0,0,1]);
78198
78213
 
78199
78214
  /**
@@ -78277,7 +78292,7 @@ class TrianglesInstancingEdgesRenderer {
78277
78292
  if (active) {
78278
78293
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78279
78294
  if (origin) {
78280
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78295
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
78281
78296
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78282
78297
  } else {
78283
78298
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78538,7 +78553,7 @@ class TrianglesInstancingEdgesRenderer {
78538
78553
  }
78539
78554
  }
78540
78555
 
78541
- const tempVec3a$A = math.vec3();
78556
+ const tempVec3a$B = math.vec3();
78542
78557
 
78543
78558
  /**
78544
78559
  * @private
@@ -78599,7 +78614,7 @@ class TrianglesInstancingEdgesColorRenderer {
78599
78614
  if (active) {
78600
78615
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78601
78616
  if (origin) {
78602
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78617
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78603
78618
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78604
78619
  } else {
78605
78620
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78865,7 +78880,7 @@ class TrianglesInstancingEdgesColorRenderer {
78865
78880
  }
78866
78881
  }
78867
78882
 
78868
- const tempVec3a$z = math.vec3();
78883
+ const tempVec3a$A = math.vec3();
78869
78884
 
78870
78885
  /**
78871
78886
  * @private
@@ -78968,7 +78983,7 @@ class TrianglesInstancingPickMeshRenderer {
78968
78983
  if (active) {
78969
78984
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78970
78985
  if (origin) {
78971
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
78986
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78972
78987
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78973
78988
  } else {
78974
78989
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79203,7 +79218,7 @@ class TrianglesInstancingPickMeshRenderer {
79203
79218
  }
79204
79219
  }
79205
79220
 
79206
- const tempVec3a$y = math.vec3();
79221
+ const tempVec3a$z = math.vec3();
79207
79222
 
79208
79223
  /**
79209
79224
  * @private
@@ -79280,7 +79295,7 @@ class TrianglesInstancingPickDepthRenderer {
79280
79295
  if (active) {
79281
79296
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79282
79297
  if (origin) {
79283
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79298
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
79284
79299
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79285
79300
  } else {
79286
79301
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79548,7 +79563,7 @@ class TrianglesInstancingPickDepthRenderer {
79548
79563
  }
79549
79564
  }
79550
79565
 
79551
- const tempVec3a$x = math.vec3();
79566
+ const tempVec3a$y = math.vec3();
79552
79567
 
79553
79568
  /**
79554
79569
  * @private
@@ -79625,7 +79640,7 @@ class TrianglesInstancingPickNormalsRenderer {
79625
79640
  if (active) {
79626
79641
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79627
79642
  if (origin) {
79628
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79643
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79629
79644
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79630
79645
  } else {
79631
79646
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79902,7 +79917,7 @@ class TrianglesInstancingPickNormalsRenderer {
79902
79917
  }
79903
79918
  }
79904
79919
 
79905
- const tempVec3a$w = math.vec3();
79920
+ const tempVec3a$x = math.vec3();
79906
79921
 
79907
79922
  /**
79908
79923
  * @private
@@ -79963,7 +79978,7 @@ class TrianglesInstancingOcclusionRenderer {
79963
79978
  if (active) {
79964
79979
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79965
79980
  if (origin) {
79966
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
79981
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79967
79982
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79968
79983
  } else {
79969
79984
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80221,7 +80236,7 @@ class TrianglesInstancingOcclusionRenderer {
80221
80236
  }
80222
80237
  }
80223
80238
 
80224
- const tempVec3a$v = math.vec3();
80239
+ const tempVec3a$w = math.vec3();
80225
80240
 
80226
80241
  /**
80227
80242
  * @private
@@ -80282,7 +80297,7 @@ class TrianglesInstancingDepthRenderer {
80282
80297
  if (active) {
80283
80298
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80284
80299
  if (origin) {
80285
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80300
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
80286
80301
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80287
80302
  } else {
80288
80303
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80532,7 +80547,7 @@ class TrianglesInstancingDepthRenderer {
80532
80547
  }
80533
80548
  }
80534
80549
 
80535
- const tempVec3a$u = math.vec3();
80550
+ const tempVec3a$v = math.vec3();
80536
80551
 
80537
80552
  /**
80538
80553
  * @private
@@ -80596,7 +80611,7 @@ class TrianglesInstancingNormalsRenderer {
80596
80611
  if (active) {
80597
80612
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80598
80613
  if (origin) {
80599
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80614
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80600
80615
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80601
80616
  } else {
80602
80617
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80876,7 +80891,7 @@ class TrianglesInstancingNormalsRenderer {
80876
80891
  }
80877
80892
  }
80878
80893
 
80879
- const tempVec3a$t = math.vec3();
80894
+ const tempVec3a$u = math.vec3();
80880
80895
 
80881
80896
  /**
80882
80897
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -80963,7 +80978,7 @@ class TrianglesInstancingShadowRenderer {
80963
80978
  if (active) {
80964
80979
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80965
80980
  if (origin) {
80966
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
80981
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80967
80982
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80968
80983
  } else {
80969
80984
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -81156,7 +81171,7 @@ class TrianglesInstancingShadowRenderer {
81156
81171
  }
81157
81172
 
81158
81173
  const tempVec4$1 = math.vec4();
81159
- const tempVec3a$s = math.vec3();
81174
+ const tempVec3a$t = math.vec3();
81160
81175
 
81161
81176
  const TEXTURE_DECODE_FUNCS = {};
81162
81177
  TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -81230,7 +81245,7 @@ class TrianglesInstancingPBRRenderer {
81230
81245
  if (active) {
81231
81246
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
81232
81247
  if (origin) {
81233
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
81248
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
81234
81249
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
81235
81250
  } else {
81236
81251
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82066,7 +82081,7 @@ class TrianglesInstancingPBRRenderer {
82066
82081
  }
82067
82082
  }
82068
82083
 
82069
- const tempVec3a$r = math.vec3();
82084
+ const tempVec3a$s = math.vec3();
82070
82085
 
82071
82086
  /**
82072
82087
  * @private
@@ -82141,7 +82156,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82141
82156
  if (active) {
82142
82157
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82143
82158
  if (origin) {
82144
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82159
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
82145
82160
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82146
82161
  } else {
82147
82162
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82381,7 +82396,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82381
82396
  }
82382
82397
 
82383
82398
  const tempVec4 = math.vec4();
82384
- const tempVec3a$q = math.vec3();
82399
+ const tempVec3a$r = math.vec3();
82385
82400
 
82386
82401
  /**
82387
82402
  * @private
@@ -82446,7 +82461,7 @@ class TrianglesInstancingColorTextureRenderer {
82446
82461
  if (active) {
82447
82462
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82448
82463
  if (origin) {
82449
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$q);
82464
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82450
82465
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82451
82466
  } else {
82452
82467
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -83257,8 +83272,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
83257
83272
  const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
83258
83273
  const tempVec3fa$2 = new Float32Array(3);
83259
83274
 
83260
- const tempVec3a$p = math.vec3();
83261
- const tempVec3b$5 = math.vec3();
83275
+ const tempVec3a$q = math.vec3();
83276
+ const tempVec3b$6 = math.vec3();
83262
83277
  const tempVec3c$4 = math.vec3();
83263
83278
  const tempVec3d$1 = math.vec3();
83264
83279
  const tempVec3e = math.vec3();
@@ -84186,8 +84201,8 @@ class TrianglesInstancingLayer {
84186
84201
  const origin = state.origin;
84187
84202
  const offset = portion.offset;
84188
84203
 
84189
- const rtcRayOrigin = tempVec3a$p;
84190
- const rtcRayDir = tempVec3b$5;
84204
+ const rtcRayOrigin = tempVec3a$q;
84205
+ const rtcRayDir = tempVec3b$6;
84191
84206
 
84192
84207
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
84193
84208
  rtcRayDir.set(worldRayDir);
@@ -84320,7 +84335,7 @@ class TrianglesInstancingLayer {
84320
84335
  }
84321
84336
  }
84322
84337
 
84323
- const tempVec3a$o = math.vec3();
84338
+ const tempVec3a$p = math.vec3();
84324
84339
 
84325
84340
  /**
84326
84341
  * @private
@@ -84383,7 +84398,7 @@ class LinesBatchingColorRenderer {
84383
84398
  if (active) {
84384
84399
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84385
84400
  if (origin) {
84386
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84401
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$p);
84387
84402
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84388
84403
  } else {
84389
84404
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -84603,7 +84618,7 @@ class LinesBatchingColorRenderer {
84603
84618
  }
84604
84619
 
84605
84620
  const defaultColor$1 = new Float32Array([1, 1, 1]);
84606
- const tempVec3a$n = math.vec3();
84621
+ const tempVec3a$o = math.vec3();
84607
84622
 
84608
84623
  /**
84609
84624
  * @private
@@ -84690,7 +84705,7 @@ class LinesBatchingSilhouetteRenderer {
84690
84705
  if (active) {
84691
84706
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84692
84707
  if (origin) {
84693
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
84708
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84694
84709
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84695
84710
  } else {
84696
84711
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -85787,7 +85802,7 @@ class LinesBatchingLayer {
85787
85802
  }
85788
85803
  }
85789
85804
 
85790
- const tempVec3a$m = math.vec3();
85805
+ const tempVec3a$n = math.vec3();
85791
85806
 
85792
85807
  /**
85793
85808
  * @private
@@ -85850,7 +85865,7 @@ class LinesInstancingColorRenderer {
85850
85865
  if (active) {
85851
85866
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
85852
85867
  if (origin) {
85853
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
85868
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
85854
85869
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
85855
85870
  } else {
85856
85871
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -86132,7 +86147,7 @@ class LinesInstancingColorRenderer {
86132
86147
  }
86133
86148
  }
86134
86149
 
86135
- const tempVec3a$l = math.vec3();
86150
+ const tempVec3a$m = math.vec3();
86136
86151
 
86137
86152
  /**
86138
86153
  * @private
@@ -86217,7 +86232,7 @@ class LinesInstancingSilhouetteRenderer {
86217
86232
  if (active) {
86218
86233
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
86219
86234
  if (origin) {
86220
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
86235
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
86221
86236
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
86222
86237
  } else {
86223
86238
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87199,7 +87214,7 @@ class LinesInstancingLayer {
87199
87214
  }
87200
87215
  }
87201
87216
 
87202
- const tempVec3a$k = math.vec3();
87217
+ const tempVec3a$l = math.vec3();
87203
87218
 
87204
87219
  /**
87205
87220
  * @private
@@ -87260,7 +87275,7 @@ class PointsBatchingColorRenderer {
87260
87275
  if (active) {
87261
87276
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87262
87277
  if (origin) {
87263
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87278
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
87264
87279
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87265
87280
  } else {
87266
87281
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87545,7 +87560,7 @@ class PointsBatchingColorRenderer {
87545
87560
  }
87546
87561
 
87547
87562
  const defaultColor = new Float32Array([1, 1, 1]);
87548
- const tempVec3a$j = math.vec3();
87563
+ const tempVec3a$k = math.vec3();
87549
87564
 
87550
87565
  /**
87551
87566
  * @private
@@ -87630,7 +87645,7 @@ class PointsBatchingSilhouetteRenderer {
87630
87645
  if (active) {
87631
87646
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87632
87647
  if (origin) {
87633
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87648
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87634
87649
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87635
87650
  } else {
87636
87651
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87874,7 +87889,7 @@ class PointsBatchingSilhouetteRenderer {
87874
87889
  }
87875
87890
  }
87876
87891
 
87877
- const tempVec3a$i = math.vec3();
87892
+ const tempVec3a$j = math.vec3();
87878
87893
 
87879
87894
  /**
87880
87895
  * @private
@@ -87941,7 +87956,7 @@ class PointsBatchingPickMeshRenderer {
87941
87956
  if (active) {
87942
87957
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87943
87958
  if (origin) {
87944
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
87959
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87945
87960
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87946
87961
  } else {
87947
87962
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88186,7 +88201,7 @@ class PointsBatchingPickMeshRenderer {
88186
88201
  }
88187
88202
  }
88188
88203
 
88189
- const tempVec3a$h = math.vec3();
88204
+ const tempVec3a$i = math.vec3();
88190
88205
 
88191
88206
  /**
88192
88207
  * @private
@@ -88258,7 +88273,7 @@ class PointsBatchingPickDepthRenderer {
88258
88273
  if (active) {
88259
88274
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88260
88275
  if (origin) {
88261
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88276
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
88262
88277
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88263
88278
  } else {
88264
88279
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88509,7 +88524,7 @@ class PointsBatchingPickDepthRenderer {
88509
88524
  }
88510
88525
  }
88511
88526
 
88512
- const tempVec3a$g = math.vec3();
88527
+ const tempVec3a$h = math.vec3();
88513
88528
 
88514
88529
  /**
88515
88530
  * @private
@@ -88570,7 +88585,7 @@ class PointsBatchingOcclusionRenderer {
88570
88585
  if (active) {
88571
88586
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88572
88587
  if (origin) {
88573
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
88588
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88574
88589
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88575
88590
  } else {
88576
88591
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88936,8 +88951,8 @@ class PointsBatchingBuffer {
88936
88951
  }
88937
88952
  }
88938
88953
 
88939
- const tempVec3a$f = math.vec4();
88940
- const tempVec3b$4 = math.vec4();
88954
+ const tempVec3a$g = math.vec4();
88955
+ const tempVec3b$5 = math.vec4();
88941
88956
  const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
88942
88957
  const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
88943
88958
  const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
@@ -89089,8 +89104,8 @@ class PointsBatchingLayer {
89089
89104
 
89090
89105
  const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
89091
89106
 
89092
- const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$f);
89093
- const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$4);
89107
+ const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$g);
89108
+ const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$5);
89094
89109
 
89095
89110
  worldAABB[0] = min[0];
89096
89111
  worldAABB[1] = min[1];
@@ -89728,7 +89743,7 @@ class PointsBatchingLayer {
89728
89743
  }
89729
89744
  }
89730
89745
 
89731
- const tempVec3a$e = math.vec3();
89746
+ const tempVec3a$f = math.vec3();
89732
89747
 
89733
89748
  /**
89734
89749
  * @private
@@ -89797,7 +89812,7 @@ class PointsInstancingColorRenderer {
89797
89812
  if (active) {
89798
89813
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
89799
89814
  if (origin) {
89800
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
89815
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
89801
89816
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
89802
89817
  } else {
89803
89818
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90107,7 +90122,7 @@ class PointsInstancingColorRenderer {
90107
90122
  }
90108
90123
  }
90109
90124
 
90110
- const tempVec3a$d = math.vec3();
90125
+ const tempVec3a$e = math.vec3();
90111
90126
 
90112
90127
  /**
90113
90128
  * @private
@@ -90191,7 +90206,7 @@ class PointsInstancingSilhouetteRenderer {
90191
90206
  if (active) {
90192
90207
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90193
90208
  if (origin) {
90194
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90209
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
90195
90210
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90196
90211
  } else {
90197
90212
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90472,7 +90487,7 @@ class PointsInstancingSilhouetteRenderer {
90472
90487
  }
90473
90488
  }
90474
90489
 
90475
- const tempVec3a$c = math.vec3();
90490
+ const tempVec3a$d = math.vec3();
90476
90491
 
90477
90492
  /**
90478
90493
  * @private
@@ -90578,7 +90593,7 @@ class PointsInstancingPickMeshRenderer {
90578
90593
  if (active) {
90579
90594
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90580
90595
  if (origin) {
90581
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90596
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90582
90597
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90583
90598
  } else {
90584
90599
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90829,7 +90844,7 @@ class PointsInstancingPickMeshRenderer {
90829
90844
  }
90830
90845
  }
90831
90846
 
90832
- const tempVec3a$b = math.vec3();
90847
+ const tempVec3a$c = math.vec3();
90833
90848
 
90834
90849
  /**
90835
90850
  * @private
@@ -90907,7 +90922,7 @@ class PointsInstancingPickDepthRenderer {
90907
90922
  if (active) {
90908
90923
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90909
90924
  if (origin) {
90910
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
90925
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90911
90926
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90912
90927
  } else {
90913
90928
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91195,7 +91210,7 @@ class PointsInstancingPickDepthRenderer {
91195
91210
  }
91196
91211
  }
91197
91212
 
91198
- const tempVec3a$a = math.vec3();
91213
+ const tempVec3a$b = math.vec3();
91199
91214
 
91200
91215
  /**
91201
91216
  * @private
@@ -91257,7 +91272,7 @@ class PointsInstancingOcclusionRenderer {
91257
91272
  if (active) {
91258
91273
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91259
91274
  if (origin) {
91260
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91275
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
91261
91276
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91262
91277
  } else {
91263
91278
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91546,7 +91561,7 @@ class PointsInstancingOcclusionRenderer {
91546
91561
  }
91547
91562
  }
91548
91563
 
91549
- const tempVec3a$9 = math.vec3();
91564
+ const tempVec3a$a = math.vec3();
91550
91565
 
91551
91566
  /**
91552
91567
  * @private
@@ -91608,7 +91623,7 @@ class PointsInstancingDepthRenderer {
91608
91623
  if (active) {
91609
91624
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91610
91625
  if (origin) {
91611
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91626
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91612
91627
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91613
91628
  } else {
91614
91629
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91892,7 +91907,7 @@ class PointsInstancingDepthRenderer {
91892
91907
  }
91893
91908
  }
91894
91909
 
91895
- const tempVec3a$8 = math.vec3();
91910
+ const tempVec3a$9 = math.vec3();
91896
91911
 
91897
91912
  /**
91898
91913
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -91979,7 +91994,7 @@ class PointsInstancingShadowRenderer {
91979
91994
  if (active) {
91980
91995
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91981
91996
  if (origin) {
91982
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$8);
91997
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91983
91998
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91984
91999
  } else {
91985
92000
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -94320,7 +94335,7 @@ function getKTX2TextureTranscoder(viewer) {
94320
94335
  return transcoder;
94321
94336
  }
94322
94337
 
94323
- const tempVec3a$7 = math.vec3();
94338
+ const tempVec3a$8 = math.vec3();
94324
94339
  const tempMat4$1 = math.mat4();
94325
94340
 
94326
94341
  const defaultScale = math.vec3([1, 1, 1]);
@@ -96701,7 +96716,7 @@ class VBOSceneModel extends Component {
96701
96716
  }
96702
96717
 
96703
96718
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
96704
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$7) : this._origin;
96719
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$8) : this._origin;
96705
96720
 
96706
96721
  const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
96707
96722
 
@@ -96763,7 +96778,7 @@ class VBOSceneModel extends Component {
96763
96778
 
96764
96779
  let indices = cfg.indices;
96765
96780
  let edgeIndices = cfg.edgeIndices;
96766
- let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$7) : this._origin;
96781
+ let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$8) : this._origin;
96767
96782
  let positions = cfg.positions;
96768
96783
 
96769
96784
  if (positions) {
@@ -97777,8 +97792,8 @@ class TextureTranscoder {
97777
97792
  const screenPos = math.vec4();
97778
97793
  const viewPos = math.vec4();
97779
97794
 
97780
- const tempVec3a$6 = math.vec3();
97781
- const tempVec3b$3 = math.vec3();
97795
+ const tempVec3a$7 = math.vec3();
97796
+ const tempVec3b$4 = math.vec3();
97782
97797
  const tempVec3c$3 = math.vec3();
97783
97798
 
97784
97799
  const tempVec4a$4 = math.vec4();
@@ -97812,7 +97827,7 @@ class PanController {
97812
97827
  const camera = this._scene.camera;
97813
97828
 
97814
97829
  if (optionalTargetWorldPos) {
97815
- const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97830
+ const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97816
97831
  const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
97817
97832
  dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
97818
97833
  }
@@ -97836,9 +97851,9 @@ class PanController {
97836
97851
  // suddenly a lot closer than the point we pivoted about on the surface of the last object
97837
97852
  // that we click-drag-pivoted on.
97838
97853
 
97839
- const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97854
+ const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97840
97855
  const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
97841
- const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$3)), lenEyeTargetVec);
97856
+ const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$4)), lenEyeTargetVec);
97842
97857
  camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
97843
97858
  }
97844
97859
 
@@ -97855,7 +97870,7 @@ class PanController {
97855
97870
 
97856
97871
  const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
97857
97872
  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);
97873
+ const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$7)), -dollyDelta, tempVec3b$4);
97859
97874
  const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
97860
97875
 
97861
97876
  camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
@@ -97883,8 +97898,8 @@ class PanController {
97883
97898
  }
97884
97899
  }
97885
97900
 
97886
- const tempVec3a$5 = math.vec3();
97887
- const tempVec3b$2 = math.vec3();
97901
+ const tempVec3a$6 = math.vec3();
97902
+ const tempVec3b$3 = math.vec3();
97888
97903
  const tempVec3c$2 = math.vec3();
97889
97904
 
97890
97905
  const tempVec4a$3 = math.vec4();
@@ -98016,10 +98031,10 @@ class PivotController {
98016
98031
 
98017
98032
  _cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
98018
98033
  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);
98034
+ const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6));
98035
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$3);
98021
98036
  let rightAxisLen = math.sqLenVec3(rightAxis);
98022
- return (rightAxisLen <= 0.0001);
98037
+ return (Math.abs(rightAxisLen) <= 0.1);
98023
98038
  }
98024
98039
 
98025
98040
  /**
@@ -98057,8 +98072,8 @@ class PivotController {
98057
98072
  const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
98058
98073
  const worldPos = tempVec4a$3;
98059
98074
  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);
98075
+ const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$6));
98076
+ const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$3), tempVec3c$2);
98062
98077
  this.setPivotPos(posOnSphere);
98063
98078
  }
98064
98079
 
@@ -98080,6 +98095,10 @@ class PivotController {
98080
98095
  if (!this._pivoting) {
98081
98096
  return;
98082
98097
  }
98098
+ if (this._cameraLookingDownwards()) {
98099
+ this._pivoting = false;
98100
+ return;
98101
+ }
98083
98102
  if (yawInc === 0 && pitchInc === 0) {
98084
98103
  return;
98085
98104
  }
@@ -98689,8 +98708,8 @@ class MousePanRotateDollyHandler {
98689
98708
  }
98690
98709
 
98691
98710
  const center = math.vec3();
98692
- const tempVec3a$4 = math.vec3();
98693
- const tempVec3b$1 = math.vec3();
98711
+ const tempVec3a$5 = math.vec3();
98712
+ const tempVec3b$2 = math.vec3();
98694
98713
  const tempVec3c$1 = math.vec3();
98695
98714
  const tempVec3d = math.vec3();
98696
98715
 
@@ -98744,39 +98763,39 @@ class KeyboardAxisViewHandler {
98744
98763
 
98745
98764
  if (axisViewRight) {
98746
98765
 
98747
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$4), tempVec3d));
98766
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$5), tempVec3d));
98748
98767
  tempCameraTarget.look.set(center);
98749
98768
  tempCameraTarget.up.set(camera.worldUp);
98750
98769
 
98751
98770
  } else if (axisViewBack) {
98752
98771
 
98753
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$4), tempVec3d));
98772
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$5), tempVec3d));
98754
98773
  tempCameraTarget.look.set(center);
98755
98774
  tempCameraTarget.up.set(camera.worldUp);
98756
98775
 
98757
98776
  } else if (axisViewLeft) {
98758
98777
 
98759
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$4), tempVec3d));
98778
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$5), tempVec3d));
98760
98779
  tempCameraTarget.look.set(center);
98761
98780
  tempCameraTarget.up.set(camera.worldUp);
98762
98781
 
98763
98782
  } else if (axisViewFront) {
98764
98783
 
98765
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$4), tempVec3d));
98784
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$5), tempVec3d));
98766
98785
  tempCameraTarget.look.set(center);
98767
98786
  tempCameraTarget.up.set(camera.worldUp);
98768
98787
 
98769
98788
  } else if (axisViewTop) {
98770
98789
 
98771
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$4), tempVec3d));
98790
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$5), tempVec3d));
98772
98791
  tempCameraTarget.look.set(center);
98773
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$1), tempVec3c$1));
98792
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$2), tempVec3c$1));
98774
98793
 
98775
98794
  } else if (axisViewBottom) {
98776
98795
 
98777
- 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));
98778
98797
  tempCameraTarget.look.set(center);
98779
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$1)));
98798
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$2)));
98780
98799
  }
98781
98800
 
98782
98801
  if ((!configs.firstPerson) && configs.followPointer) {
@@ -99350,6 +99369,8 @@ class KeyboardPanRotateDollyHandler {
99350
99369
  const SCALE_DOLLY_EACH_FRAME = 1; // Recalculate dolly speed for eye->target distance on each Nth frame
99351
99370
  const EPSILON = 0.001;
99352
99371
  const tempVec3$1 = math.vec3();
99372
+ const tempVec3a$4 = math.vec3();
99373
+ const tempVec3b$1 = math.vec3();
99353
99374
 
99354
99375
  /**
99355
99376
  * Handles camera updates on each "tick" that were scheduled by the various controllers.
@@ -99369,7 +99390,7 @@ class CameraUpdater {
99369
99390
  let countDown = SCALE_DOLLY_EACH_FRAME; // Decrements on each tick
99370
99391
  let dollyDistFactor = 1.0; // Calculated when countDown is zero
99371
99392
  let followPointerWorldPos = null; // Holds the pointer's World position when configs.followPointer is true
99372
-
99393
+
99373
99394
  this._onTick = scene.on("tick", () => {
99374
99395
 
99375
99396
  if (!(configs.active && configs.pointerEnabled)) {
@@ -99430,7 +99451,7 @@ class CameraUpdater {
99430
99451
 
99431
99452
  if (pickController.pickResult && pickController.pickResult.worldPos) {
99432
99453
  followPointerWorldPos = pickController.pickResult.worldPos;
99433
-
99454
+
99434
99455
  } else {
99435
99456
  dollyDistFactor = 1.0;
99436
99457
  followPointerWorldPos = null;
@@ -99650,6 +99671,13 @@ class CameraUpdater {
99650
99671
  });
99651
99672
  }
99652
99673
 
99674
+ isLookingDownwards(look, eye) {
99675
+ const camera = this._scene.camera;
99676
+ const forwardAxis = math.normalizeVec3(math.subVec3(look, eye, tempVec3a$4));
99677
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$1);
99678
+ let rightAxisLen = math.sqLenVec3(rightAxis);
99679
+ return (Math.abs(rightAxisLen) <= 0.1);
99680
+ }
99653
99681
 
99654
99682
  destroy() {
99655
99683
  this._scene.off(this._onTick);
@@ -113379,6 +113407,8 @@ class NavCubePlugin extends Plugin {
113379
113407
  * @param {Boolean} [cfg.fitVisible=false] Sets whether the axis, corner and edge-aligned views will fit the
113380
113408
  * 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
113409
  * @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.
113410
+ * @param {Boolean} [cfg.isProjectNorth] sets whether the NavCube switches between true north and project north - using the project north offset angle.
113411
+ * @param {number} [cfg.projectNorthOffsetAngle] sets the NavCube project north offset angle - when the {@link isProjectNorth} is true.
113382
113412
  */
113383
113413
  constructor(viewer, cfg = {}) {
113384
113414
 
@@ -113424,6 +113454,9 @@ class NavCubePlugin extends Plugin {
113424
113454
 
113425
113455
  var self = this;
113426
113456
 
113457
+ this.setIsProjectNorth(cfg.isProjectNorth);
113458
+ this.setProjectNorthOffsetAngle(cfg.projectNorthOffsetAngle);
113459
+
113427
113460
  this._synchCamera = (function () {
113428
113461
  var matrix = math.rotationMat4c(-90 * math.DEGTORAD, 1, 0, 0);
113429
113462
  var eyeLookVec = math.vec3();
@@ -113445,6 +113478,9 @@ class NavCubePlugin extends Plugin {
113445
113478
  self._navCubeCamera.eye = eyeLookVec;
113446
113479
  self._navCubeCamera.up = up;
113447
113480
  }
113481
+ if (self._isProjectNorth && self._projectNorthOffsetAngle) {
113482
+ self._navCubeCamera.orbitYaw(self._projectNorthOffsetAngle);
113483
+ }
113448
113484
  };
113449
113485
  }());
113450
113486
 
@@ -113914,6 +113950,42 @@ class NavCubePlugin extends Plugin {
113914
113950
  return this._synchProjection;
113915
113951
  }
113916
113952
 
113953
+ /**
113954
+ * Sets whether the NavCube switches between project north and true north
113955
+ *
113956
+ * @param {Boolean} isProjectNorth Set ````true```` to use project north offset
113957
+ */
113958
+ setIsProjectNorth(isProjectNorth = false) {
113959
+ this._isProjectNorth = isProjectNorth;
113960
+ }
113961
+
113962
+ /**
113963
+ * Gets whether the NavCube switches between project north and true north
113964
+ *
113965
+ * @return {Boolean} isProjectNorth when ````true```` - use project north offset
113966
+ */
113967
+ getIsProjectNorth() {
113968
+ return this._isProjectNorth;
113969
+ }
113970
+
113971
+ /**
113972
+ * Sets the NavCube project north offset angle (used when {@link isProjectNorth} is ````true````
113973
+ *
113974
+ * @param {number} projectNorthOffsetAngle Set the vector offset for project north
113975
+ */
113976
+ setProjectNorthOffsetAngle(projectNorthOffsetAngle) {
113977
+ this._projectNorthOffsetAngle = projectNorthOffsetAngle;
113978
+ }
113979
+
113980
+ /**
113981
+ * Gets the offset angle between project north and true north
113982
+ *
113983
+ * @return {number} projectNorthOffsetAngle
113984
+ */
113985
+ getProjectNorthOffsetAngle() {
113986
+ return this._projectNorthOffsetAngle;
113987
+ }
113988
+
113917
113989
  /**
113918
113990
  * Destroys this NavCubePlugin.
113919
113991
  *