@xeokit/xeokit-sdk 2.4.2-beta-27 → 2.4.2-beta-29

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.
@@ -13002,7 +13002,7 @@ class Annotation extends Marker {
13002
13002
 
13003
13003
  const tempVec3a$C = math.vec3();
13004
13004
  const tempVec3b$r = math.vec3();
13005
- const tempVec3c$o = math.vec3();
13005
+ const tempVec3c$n = math.vec3();
13006
13006
 
13007
13007
  /**
13008
13008
  * {@link Viewer} plugin that creates {@link Annotation}s.
@@ -13488,7 +13488,7 @@ class AnnotationsPlugin extends Plugin {
13488
13488
  } else {
13489
13489
  const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$C);
13490
13490
  const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$r);
13491
- const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$o);
13491
+ const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$n);
13492
13492
  worldPos = offsetWorldPos;
13493
13493
  entity = pickResult.entity;
13494
13494
  }
@@ -21571,7 +21571,7 @@ class CustomProjection extends Component {
21571
21571
 
21572
21572
  const tempVec3$6 = math.vec3();
21573
21573
  const tempVec3b$q = math.vec3();
21574
- const tempVec3c$n = math.vec3();
21574
+ const tempVec3c$m = math.vec3();
21575
21575
  const tempVec3d$9 = math.vec3();
21576
21576
  const tempVec3e$2 = math.vec3();
21577
21577
  const tempVec3f$2 = math.vec3();
@@ -21884,7 +21884,7 @@ class Camera extends Component {
21884
21884
  let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
21885
21885
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
21886
21886
  lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q);
21887
- this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$n); // Set eye position as 'look' plus 'eye' vector
21887
+ this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector
21888
21888
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9); // Rotate 'up' vector
21889
21889
  }
21890
21890
 
@@ -21901,7 +21901,7 @@ class Camera extends Component {
21901
21901
  }
21902
21902
  }
21903
21903
  let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
21904
- const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$n));
21904
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
21905
21905
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
21906
21906
  eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$9);
21907
21907
  this.up = math.transformPoint3(tempMat, this._up, tempVec3e$2);
@@ -21917,7 +21917,7 @@ class Camera extends Component {
21917
21917
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
21918
21918
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
21919
21919
  look2 = math.transformPoint3(tempMat, look2, tempVec3b$q);
21920
- this.look = math.addVec3(look2, this._eye, tempVec3c$n);
21920
+ this.look = math.addVec3(look2, this._eye, tempVec3c$m);
21921
21921
  if (this._gimbalLock) {
21922
21922
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9);
21923
21923
  }
@@ -21936,7 +21936,7 @@ class Camera extends Component {
21936
21936
  }
21937
21937
  }
21938
21938
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
21939
- const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$n));
21939
+ const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
21940
21940
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
21941
21941
  this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2);
21942
21942
  look2 = math.transformPoint3(tempMat, look2, tempVec3d$9);
@@ -21960,7 +21960,7 @@ class Camera extends Component {
21960
21960
  vec[2] += v[2];
21961
21961
  }
21962
21962
  if (pan[1] !== 0) {
21963
- v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$n), pan[1]);
21963
+ v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]);
21964
21964
  vec[0] += v[0];
21965
21965
  vec[1] += v[1];
21966
21966
  vec[2] += v[2];
@@ -21987,7 +21987,7 @@ class Camera extends Component {
21987
21987
  if (newLenLook < 0.5) {
21988
21988
  return;
21989
21989
  }
21990
- const dir = math.normalizeVec3(vec, tempVec3c$n);
21990
+ const dir = math.normalizeVec3(vec, tempVec3c$m);
21991
21991
  this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$9);
21992
21992
  }
21993
21993
 
@@ -47952,7 +47952,7 @@ class LineSet extends Component {
47952
47952
  const tempVec3$5 = math.vec3();
47953
47953
  const tempVec3a$u = math.vec3();
47954
47954
  const tempVec3b$p = math.vec3();
47955
- const tempVec3c$m = math.vec3();
47955
+ const tempVec3c$l = math.vec3();
47956
47956
 
47957
47957
  /**
47958
47958
  * {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
@@ -48655,7 +48655,7 @@ class BCFViewpointsPlugin extends Plugin {
48655
48655
  const bitmap_data = e.bitmap_data; // base64
48656
48656
  let location = xyzObjectToArray(e.location, tempVec3a$u);
48657
48657
  let normal = xyzObjectToArray(e.normal, tempVec3b$p);
48658
- let up = xyzObjectToArray(e.up, tempVec3c$m);
48658
+ let up = xyzObjectToArray(e.up, tempVec3c$l);
48659
48659
  let height = e.height || 1;
48660
48660
  if (!bitmap_type) {
48661
48661
  return;
@@ -56603,7 +56603,7 @@ const edgesDefaultColor = new Float32Array([0, 0, 0, 1]);
56603
56603
 
56604
56604
  const tempVec4 = math.vec4();
56605
56605
  const tempVec3a$s = math.vec3();
56606
- const tempVec3c$l = math.vec3();
56606
+ const tempVec3c$k = math.vec3();
56607
56607
  const tempMat4a$h = math.mat4();
56608
56608
 
56609
56609
  /**
@@ -57048,7 +57048,7 @@ class VBOSceneModelRenderer {
57048
57048
  if (gotOrigin || gotPosition) {
57049
57049
  const rtcOrigin = tempVec3a$s;
57050
57050
  if (gotOrigin) {
57051
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$l);
57051
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k);
57052
57052
  rtcOrigin[0] = rotatedOrigin[0];
57053
57053
  rtcOrigin[1] = rotatedOrigin[1];
57054
57054
  rtcOrigin[2] = rotatedOrigin[2];
@@ -60588,7 +60588,7 @@ function octDecodeVec2(oct) { // Decode an oct-encoded normal
60588
60588
 
60589
60589
  const tempVec3a$r = math.vec3();
60590
60590
  const tempVec3b$n = math.vec3();
60591
- const tempVec3c$k = math.vec3();
60591
+ const tempVec3c$j = math.vec3();
60592
60592
  const tempVec3d$8 = math.vec3();
60593
60593
  const tempMat4a$g = math.mat4();
60594
60594
 
@@ -60641,7 +60641,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
60641
60641
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
60642
60642
  const rtcOrigin = tempVec3b$n;
60643
60643
  if (origin) {
60644
- const rotatedOrigin = tempVec3c$k;
60644
+ const rotatedOrigin = tempVec3c$j;
60645
60645
  math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
60646
60646
  rtcOrigin[0] = rotatedOrigin[0];
60647
60647
  rtcOrigin[1] = rotatedOrigin[1];
@@ -60893,7 +60893,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
60893
60893
 
60894
60894
  const tempVec3a$q = math.vec3();
60895
60895
  const tempVec3b$m = math.vec3();
60896
- const tempVec3c$j = math.vec3();
60896
+ const tempVec3c$i = math.vec3();
60897
60897
  const tempVec3d$7 = math.vec3();
60898
60898
  const tempMat4a$f = math.mat4();
60899
60899
 
@@ -60950,7 +60950,7 @@ class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{
60950
60950
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
60951
60951
  const rtcOrigin = tempVec3b$m;
60952
60952
  if (origin) {
60953
- const rotatedOrigin = tempVec3c$j;
60953
+ const rotatedOrigin = tempVec3c$i;
60954
60954
  math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
60955
60955
  rtcOrigin[0] = rotatedOrigin[0];
60956
60956
  rtcOrigin[1] = rotatedOrigin[1];
@@ -61286,7 +61286,7 @@ math.OBB3();
61286
61286
 
61287
61287
  const tempVec3a$p = math.vec3();
61288
61288
  const tempVec3b$l = math.vec3();
61289
- const tempVec3c$i = math.vec3();
61289
+ const tempVec3c$h = math.vec3();
61290
61290
  const tempVec3d$6 = math.vec3();
61291
61291
  const tempVec3e$1 = math.vec3();
61292
61292
  const tempVec3f$1 = math.vec3();
@@ -62470,7 +62470,7 @@ class TrianglesBatchingLayer {
62470
62470
  const rtcRayOrigin = tempVec3a$p;
62471
62471
  const rtcRayDir = tempVec3b$l;
62472
62472
 
62473
- rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$i) : worldRayOrigin); // World -> RTC
62473
+ rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC
62474
62474
  rtcRayDir.set(worldRayDir);
62475
62475
 
62476
62476
  if (offset) {
@@ -65657,7 +65657,7 @@ function getInstancingRenderers$1(scene) {
65657
65657
 
65658
65658
  const tempVec3a$o = math.vec3();
65659
65659
  const tempVec3b$k = math.vec3();
65660
- const tempVec3c$h = math.vec3();
65660
+ const tempVec3c$g = math.vec3();
65661
65661
  const tempVec3d$5 = math.vec3();
65662
65662
  const tempMat4a$e = math.mat4();
65663
65663
 
@@ -65714,7 +65714,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
65714
65714
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
65715
65715
  const rtcOrigin = tempVec3b$k;
65716
65716
  if (origin) {
65717
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$h);
65717
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
65718
65718
  rtcOrigin[0] = rotatedOrigin[0];
65719
65719
  rtcOrigin[1] = rotatedOrigin[1];
65720
65720
  rtcOrigin[2] = rotatedOrigin[2];
@@ -65993,7 +65993,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
65993
65993
 
65994
65994
  const tempVec3a$n = math.vec3();
65995
65995
  const tempVec3b$j = math.vec3();
65996
- const tempVec3c$g = math.vec3();
65996
+ const tempVec3c$f = math.vec3();
65997
65997
  const tempVec3d$4 = math.vec3();
65998
65998
  const tempMat4a$d = math.mat4();
65999
65999
 
@@ -66051,7 +66051,7 @@ class SnapInstancingDepthRenderer extends VBOSceneModelRenderer {
66051
66051
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
66052
66052
  const rtcOrigin = tempVec3b$j;
66053
66053
  if (origin) {
66054
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
66054
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f);
66055
66055
  rtcOrigin[0] = rotatedOrigin[0];
66056
66056
  rtcOrigin[1] = rotatedOrigin[1];
66057
66057
  rtcOrigin[2] = rotatedOrigin[2];
@@ -66403,7 +66403,7 @@ const tempVec3fa$2 = new Float32Array(3);
66403
66403
 
66404
66404
  const tempVec3a$m = math.vec3();
66405
66405
  const tempVec3b$i = math.vec3();
66406
- const tempVec3c$f = math.vec3();
66406
+ const tempVec3c$e = math.vec3();
66407
66407
  const tempVec3d$3 = math.vec3();
66408
66408
  const tempVec3e = math.vec3();
66409
66409
  const tempVec3f = math.vec3();
@@ -67470,7 +67470,7 @@ class TrianglesInstancingLayer {
67470
67470
  const rtcRayOrigin = tempVec3a$m;
67471
67471
  const rtcRayDir = tempVec3b$i;
67472
67472
 
67473
- rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$f) : worldRayOrigin); // World -> RTC
67473
+ rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC
67474
67474
  rtcRayDir.set(worldRayDir);
67475
67475
 
67476
67476
  if (offset) {
@@ -74783,7 +74783,7 @@ function doCheckResult(buckets, mesh) {
74783
74783
 
74784
74784
  const tempVec3a$k = math.vec3();
74785
74785
  const tempVec3b$g = math.vec3();
74786
- const tempVec3c$e = math.vec3();
74786
+ const tempVec3c$d = math.vec3();
74787
74787
  math.vec3();
74788
74788
 
74789
74789
  const tempVec4a$6 = math.vec4();
@@ -74863,7 +74863,7 @@ class TrianglesDataTextureColorRenderer {
74863
74863
  rtcOrigin[1] += position[1];
74864
74864
  rtcOrigin[2] += position[2];
74865
74865
  rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$c);
74866
- rtcCameraEye = tempVec3c$e;
74866
+ rtcCameraEye = tempVec3c$d;
74867
74867
  rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
74868
74868
  rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
74869
74869
  rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
@@ -75400,7 +75400,7 @@ const defaultColor$1 = new Float32Array([1, 1, 1]);
75400
75400
 
75401
75401
  const tempVec3a$j = math.vec3();
75402
75402
  const tempVec3b$f = math.vec3();
75403
- const tempVec3c$d = math.vec3();
75403
+ const tempVec3c$c = math.vec3();
75404
75404
  math.vec3();
75405
75405
  const tempMat4a$b = math.mat4();
75406
75406
 
@@ -75476,7 +75476,7 @@ class TrianglesDataTextureSilhouetteRenderer {
75476
75476
  rtcOrigin[1] += position[1];
75477
75477
  rtcOrigin[2] += position[2];
75478
75478
  rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b);
75479
- rtcCameraEye = tempVec3c$d;
75479
+ rtcCameraEye = tempVec3c$c;
75480
75480
  rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
75481
75481
  rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
75482
75482
  rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
@@ -76278,7 +76278,7 @@ class TrianglesDataTextureEdgesRenderer {
76278
76278
 
76279
76279
  const tempVec3a$h = math.vec3();
76280
76280
  const tempVec3b$d = math.vec3();
76281
- const tempVec3c$c = math.vec3();
76281
+ math.vec3();
76282
76282
  const tempMat4a$9 = math.mat4();
76283
76283
 
76284
76284
  /**
@@ -76360,25 +76360,30 @@ class TrianglesDataTextureEdgesColorRenderer {
76360
76360
  gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
76361
76361
  gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
76362
76362
 
76363
- const numSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
76364
- if (numSectionPlanes > 0) {
76363
+ const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
76364
+ const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length;
76365
+ if (numAllocatedSectionPlanes > 0) {
76365
76366
  const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
76366
76367
  const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
76367
76368
  const renderFlags = model.renderFlags;
76368
- for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) {
76369
+ for (let sectionPlaneIndex = 0; sectionPlaneIndex < numAllocatedSectionPlanes; sectionPlaneIndex++) {
76369
76370
  const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex];
76370
76371
  if (sectionPlaneUniforms) {
76371
- const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
76372
- gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
76373
- if (active) {
76374
- const sectionPlane = sectionPlanes[sectionPlaneIndex];
76375
- if (origin) {
76376
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$c);
76377
- gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76378
- } else {
76379
- gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
76372
+ if (sectionPlaneIndex < numSectionPlanes) {
76373
+ const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
76374
+ gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
76375
+ if (active) {
76376
+ const sectionPlane = sectionPlanes[sectionPlaneIndex];
76377
+ if (origin) {
76378
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
76379
+ gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76380
+ } else {
76381
+ gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
76382
+ }
76383
+ gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
76380
76384
  }
76381
- gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
76385
+ } else {
76386
+ gl.uniform1i(sectionPlaneUniforms.active, 0);
76382
76387
  }
76383
76388
  }
76384
76389
  }
@@ -12998,7 +12998,7 @@ class Annotation extends Marker {
12998
12998
 
12999
12999
  const tempVec3a$C = math.vec3();
13000
13000
  const tempVec3b$r = math.vec3();
13001
- const tempVec3c$o = math.vec3();
13001
+ const tempVec3c$n = math.vec3();
13002
13002
 
13003
13003
  /**
13004
13004
  * {@link Viewer} plugin that creates {@link Annotation}s.
@@ -13484,7 +13484,7 @@ class AnnotationsPlugin extends Plugin {
13484
13484
  } else {
13485
13485
  const normalizedWorldNormal = math.normalizeVec3(pickResult.worldNormal, tempVec3a$C);
13486
13486
  const offsetVec = math.mulVec3Scalar(normalizedWorldNormal, this._surfaceOffset, tempVec3b$r);
13487
- const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$o);
13487
+ const offsetWorldPos = math.addVec3(pickResult.worldPos, offsetVec, tempVec3c$n);
13488
13488
  worldPos = offsetWorldPos;
13489
13489
  entity = pickResult.entity;
13490
13490
  }
@@ -21567,7 +21567,7 @@ class CustomProjection extends Component {
21567
21567
 
21568
21568
  const tempVec3$6 = math.vec3();
21569
21569
  const tempVec3b$q = math.vec3();
21570
- const tempVec3c$n = math.vec3();
21570
+ const tempVec3c$m = math.vec3();
21571
21571
  const tempVec3d$9 = math.vec3();
21572
21572
  const tempVec3e$2 = math.vec3();
21573
21573
  const tempVec3f$2 = math.vec3();
@@ -21880,7 +21880,7 @@ class Camera extends Component {
21880
21880
  let lookEyeVec = math.subVec3(this._eye, this._look, tempVec3$6);
21881
21881
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
21882
21882
  lookEyeVec = math.transformPoint3(tempMat, lookEyeVec, tempVec3b$q);
21883
- this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$n); // Set eye position as 'look' plus 'eye' vector
21883
+ this.eye = math.addVec3(this._look, lookEyeVec, tempVec3c$m); // Set eye position as 'look' plus 'eye' vector
21884
21884
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9); // Rotate 'up' vector
21885
21885
  }
21886
21886
 
@@ -21897,7 +21897,7 @@ class Camera extends Component {
21897
21897
  }
21898
21898
  }
21899
21899
  let eye2 = math.subVec3(this._eye, this._look, tempVec3$6);
21900
- const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$n));
21900
+ const left = math.cross3Vec3(math.normalizeVec3(eye2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
21901
21901
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
21902
21902
  eye2 = math.transformPoint3(tempMat, eye2, tempVec3d$9);
21903
21903
  this.up = math.transformPoint3(tempMat, this._up, tempVec3e$2);
@@ -21913,7 +21913,7 @@ class Camera extends Component {
21913
21913
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
21914
21914
  math.rotationMat4v(angleInc * 0.0174532925, this._gimbalLock ? this._worldUp : this._up, tempMat);
21915
21915
  look2 = math.transformPoint3(tempMat, look2, tempVec3b$q);
21916
- this.look = math.addVec3(look2, this._eye, tempVec3c$n);
21916
+ this.look = math.addVec3(look2, this._eye, tempVec3c$m);
21917
21917
  if (this._gimbalLock) {
21918
21918
  this.up = math.transformPoint3(tempMat, this._up, tempVec3d$9);
21919
21919
  }
@@ -21932,7 +21932,7 @@ class Camera extends Component {
21932
21932
  }
21933
21933
  }
21934
21934
  let look2 = math.subVec3(this._look, this._eye, tempVec3$6);
21935
- const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$n));
21935
+ const left = math.cross3Vec3(math.normalizeVec3(look2, tempVec3b$q), math.normalizeVec3(this._up, tempVec3c$m));
21936
21936
  math.rotationMat4v(angleInc * 0.0174532925, left, tempMat);
21937
21937
  this.up = math.transformPoint3(tempMat, this._up, tempVec3f$2);
21938
21938
  look2 = math.transformPoint3(tempMat, look2, tempVec3d$9);
@@ -21956,7 +21956,7 @@ class Camera extends Component {
21956
21956
  vec[2] += v[2];
21957
21957
  }
21958
21958
  if (pan[1] !== 0) {
21959
- v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$n), pan[1]);
21959
+ v = math.mulVec3Scalar(math.normalizeVec3(this._up, tempVec3c$m), pan[1]);
21960
21960
  vec[0] += v[0];
21961
21961
  vec[1] += v[1];
21962
21962
  vec[2] += v[2];
@@ -21983,7 +21983,7 @@ class Camera extends Component {
21983
21983
  if (newLenLook < 0.5) {
21984
21984
  return;
21985
21985
  }
21986
- const dir = math.normalizeVec3(vec, tempVec3c$n);
21986
+ const dir = math.normalizeVec3(vec, tempVec3c$m);
21987
21987
  this.eye = math.addVec3(this._look, math.mulVec3Scalar(dir, newLenLook), tempVec3d$9);
21988
21988
  }
21989
21989
 
@@ -47948,7 +47948,7 @@ class LineSet extends Component {
47948
47948
  const tempVec3$5 = math.vec3();
47949
47949
  const tempVec3a$u = math.vec3();
47950
47950
  const tempVec3b$p = math.vec3();
47951
- const tempVec3c$m = math.vec3();
47951
+ const tempVec3c$l = math.vec3();
47952
47952
 
47953
47953
  /**
47954
47954
  * {@link Viewer} plugin that saves and loads BCF viewpoints as JSON objects.
@@ -48651,7 +48651,7 @@ class BCFViewpointsPlugin extends Plugin {
48651
48651
  const bitmap_data = e.bitmap_data; // base64
48652
48652
  let location = xyzObjectToArray(e.location, tempVec3a$u);
48653
48653
  let normal = xyzObjectToArray(e.normal, tempVec3b$p);
48654
- let up = xyzObjectToArray(e.up, tempVec3c$m);
48654
+ let up = xyzObjectToArray(e.up, tempVec3c$l);
48655
48655
  let height = e.height || 1;
48656
48656
  if (!bitmap_type) {
48657
48657
  return;
@@ -56599,7 +56599,7 @@ const edgesDefaultColor = new Float32Array([0, 0, 0, 1]);
56599
56599
 
56600
56600
  const tempVec4 = math.vec4();
56601
56601
  const tempVec3a$s = math.vec3();
56602
- const tempVec3c$l = math.vec3();
56602
+ const tempVec3c$k = math.vec3();
56603
56603
  const tempMat4a$h = math.mat4();
56604
56604
 
56605
56605
  /**
@@ -57044,7 +57044,7 @@ class VBOSceneModelRenderer {
57044
57044
  if (gotOrigin || gotPosition) {
57045
57045
  const rtcOrigin = tempVec3a$s;
57046
57046
  if (gotOrigin) {
57047
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$l);
57047
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$k);
57048
57048
  rtcOrigin[0] = rotatedOrigin[0];
57049
57049
  rtcOrigin[1] = rotatedOrigin[1];
57050
57050
  rtcOrigin[2] = rotatedOrigin[2];
@@ -60584,7 +60584,7 @@ function octDecodeVec2(oct) { // Decode an oct-encoded normal
60584
60584
 
60585
60585
  const tempVec3a$r = math.vec3();
60586
60586
  const tempVec3b$n = math.vec3();
60587
- const tempVec3c$k = math.vec3();
60587
+ const tempVec3c$j = math.vec3();
60588
60588
  const tempVec3d$8 = math.vec3();
60589
60589
  const tempMat4a$g = math.mat4();
60590
60590
 
@@ -60637,7 +60637,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
60637
60637
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
60638
60638
  const rtcOrigin = tempVec3b$n;
60639
60639
  if (origin) {
60640
- const rotatedOrigin = tempVec3c$k;
60640
+ const rotatedOrigin = tempVec3c$j;
60641
60641
  math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
60642
60642
  rtcOrigin[0] = rotatedOrigin[0];
60643
60643
  rtcOrigin[1] = rotatedOrigin[1];
@@ -60889,7 +60889,7 @@ class SnapBatchingDepthBufInitRenderer extends VBOSceneModelRenderer {
60889
60889
 
60890
60890
  const tempVec3a$q = math.vec3();
60891
60891
  const tempVec3b$m = math.vec3();
60892
- const tempVec3c$j = math.vec3();
60892
+ const tempVec3c$i = math.vec3();
60893
60893
  const tempVec3d$7 = math.vec3();
60894
60894
  const tempMat4a$f = math.mat4();
60895
60895
 
@@ -60946,7 +60946,7 @@ class SnapBatchingDepthRenderer extends VBOSceneModelRenderer{
60946
60946
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
60947
60947
  const rtcOrigin = tempVec3b$m;
60948
60948
  if (origin) {
60949
- const rotatedOrigin = tempVec3c$j;
60949
+ const rotatedOrigin = tempVec3c$i;
60950
60950
  math.transformPoint3(rotationMatrix, origin, rotatedOrigin);
60951
60951
  rtcOrigin[0] = rotatedOrigin[0];
60952
60952
  rtcOrigin[1] = rotatedOrigin[1];
@@ -61282,7 +61282,7 @@ math.OBB3();
61282
61282
 
61283
61283
  const tempVec3a$p = math.vec3();
61284
61284
  const tempVec3b$l = math.vec3();
61285
- const tempVec3c$i = math.vec3();
61285
+ const tempVec3c$h = math.vec3();
61286
61286
  const tempVec3d$6 = math.vec3();
61287
61287
  const tempVec3e$1 = math.vec3();
61288
61288
  const tempVec3f$1 = math.vec3();
@@ -62466,7 +62466,7 @@ class TrianglesBatchingLayer {
62466
62466
  const rtcRayOrigin = tempVec3a$p;
62467
62467
  const rtcRayDir = tempVec3b$l;
62468
62468
 
62469
- rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$i) : worldRayOrigin); // World -> RTC
62469
+ rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$h) : worldRayOrigin); // World -> RTC
62470
62470
  rtcRayDir.set(worldRayDir);
62471
62471
 
62472
62472
  if (offset) {
@@ -65653,7 +65653,7 @@ function getInstancingRenderers$1(scene) {
65653
65653
 
65654
65654
  const tempVec3a$o = math.vec3();
65655
65655
  const tempVec3b$k = math.vec3();
65656
- const tempVec3c$h = math.vec3();
65656
+ const tempVec3c$g = math.vec3();
65657
65657
  const tempVec3d$5 = math.vec3();
65658
65658
  const tempMat4a$e = math.mat4();
65659
65659
 
@@ -65710,7 +65710,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
65710
65710
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
65711
65711
  const rtcOrigin = tempVec3b$k;
65712
65712
  if (origin) {
65713
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$h);
65713
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
65714
65714
  rtcOrigin[0] = rotatedOrigin[0];
65715
65715
  rtcOrigin[1] = rotatedOrigin[1];
65716
65716
  rtcOrigin[2] = rotatedOrigin[2];
@@ -65989,7 +65989,7 @@ class SnapInstancingDepthBufInitRenderer extends VBOSceneModelRenderer {
65989
65989
 
65990
65990
  const tempVec3a$n = math.vec3();
65991
65991
  const tempVec3b$j = math.vec3();
65992
- const tempVec3c$g = math.vec3();
65992
+ const tempVec3c$f = math.vec3();
65993
65993
  const tempVec3d$4 = math.vec3();
65994
65994
  const tempMat4a$d = math.mat4();
65995
65995
 
@@ -66047,7 +66047,7 @@ class SnapInstancingDepthRenderer extends VBOSceneModelRenderer {
66047
66047
  if (origin || position[0] !== 0 || position[1] !== 0 || position[2] !== 0) {
66048
66048
  const rtcOrigin = tempVec3b$j;
66049
66049
  if (origin) {
66050
- const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$g);
66050
+ const rotatedOrigin = math.transformPoint3(rotationMatrix, origin, tempVec3c$f);
66051
66051
  rtcOrigin[0] = rotatedOrigin[0];
66052
66052
  rtcOrigin[1] = rotatedOrigin[1];
66053
66053
  rtcOrigin[2] = rotatedOrigin[2];
@@ -66399,7 +66399,7 @@ const tempVec3fa$2 = new Float32Array(3);
66399
66399
 
66400
66400
  const tempVec3a$m = math.vec3();
66401
66401
  const tempVec3b$i = math.vec3();
66402
- const tempVec3c$f = math.vec3();
66402
+ const tempVec3c$e = math.vec3();
66403
66403
  const tempVec3d$3 = math.vec3();
66404
66404
  const tempVec3e = math.vec3();
66405
66405
  const tempVec3f = math.vec3();
@@ -67466,7 +67466,7 @@ class TrianglesInstancingLayer {
67466
67466
  const rtcRayOrigin = tempVec3a$m;
67467
67467
  const rtcRayDir = tempVec3b$i;
67468
67468
 
67469
- rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$f) : worldRayOrigin); // World -> RTC
67469
+ rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$e) : worldRayOrigin); // World -> RTC
67470
67470
  rtcRayDir.set(worldRayDir);
67471
67471
 
67472
67472
  if (offset) {
@@ -74779,7 +74779,7 @@ function doCheckResult(buckets, mesh) {
74779
74779
 
74780
74780
  const tempVec3a$k = math.vec3();
74781
74781
  const tempVec3b$g = math.vec3();
74782
- const tempVec3c$e = math.vec3();
74782
+ const tempVec3c$d = math.vec3();
74783
74783
  math.vec3();
74784
74784
 
74785
74785
  const tempVec4a$6 = math.vec4();
@@ -74859,7 +74859,7 @@ class TrianglesDataTextureColorRenderer {
74859
74859
  rtcOrigin[1] += position[1];
74860
74860
  rtcOrigin[2] += position[2];
74861
74861
  rtcViewMatrix = createRTCViewMat(camera.viewMatrix, rtcOrigin, tempMat4a$c);
74862
- rtcCameraEye = tempVec3c$e;
74862
+ rtcCameraEye = tempVec3c$d;
74863
74863
  rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
74864
74864
  rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
74865
74865
  rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
@@ -75396,7 +75396,7 @@ const defaultColor$1 = new Float32Array([1, 1, 1]);
75396
75396
 
75397
75397
  const tempVec3a$j = math.vec3();
75398
75398
  const tempVec3b$f = math.vec3();
75399
- const tempVec3c$d = math.vec3();
75399
+ const tempVec3c$c = math.vec3();
75400
75400
  math.vec3();
75401
75401
  const tempMat4a$b = math.mat4();
75402
75402
 
@@ -75472,7 +75472,7 @@ class TrianglesDataTextureSilhouetteRenderer {
75472
75472
  rtcOrigin[1] += position[1];
75473
75473
  rtcOrigin[2] += position[2];
75474
75474
  rtcViewMatrix = createRTCViewMat(viewMatrix, rtcOrigin, tempMat4a$b);
75475
- rtcCameraEye = tempVec3c$d;
75475
+ rtcCameraEye = tempVec3c$c;
75476
75476
  rtcCameraEye[0] = camera.eye[0] - rtcOrigin[0];
75477
75477
  rtcCameraEye[1] = camera.eye[1] - rtcOrigin[1];
75478
75478
  rtcCameraEye[2] = camera.eye[2] - rtcOrigin[2];
@@ -76274,7 +76274,7 @@ class TrianglesDataTextureEdgesRenderer {
76274
76274
 
76275
76275
  const tempVec3a$h = math.vec3();
76276
76276
  const tempVec3b$d = math.vec3();
76277
- const tempVec3c$c = math.vec3();
76277
+ math.vec3();
76278
76278
  const tempMat4a$9 = math.mat4();
76279
76279
 
76280
76280
  /**
@@ -76356,25 +76356,30 @@ class TrianglesDataTextureEdgesColorRenderer {
76356
76356
  gl.uniformMatrix4fv(this._uViewMatrix, false, rtcViewMatrix);
76357
76357
  gl.uniformMatrix4fv(this._uProjMatrix, false, camera.projMatrix);
76358
76358
 
76359
- const numSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
76360
- if (numSectionPlanes > 0) {
76359
+ const numAllocatedSectionPlanes = scene._sectionPlanesState.getNumAllocatedSectionPlanes();
76360
+ const numSectionPlanes = scene._sectionPlanesState.sectionPlanes.length;
76361
+ if (numAllocatedSectionPlanes > 0) {
76361
76362
  const sectionPlanes = scene._sectionPlanesState.sectionPlanes;
76362
76363
  const baseIndex = dataTextureLayer.layerIndex * numSectionPlanes;
76363
76364
  const renderFlags = model.renderFlags;
76364
- for (let sectionPlaneIndex = 0; sectionPlaneIndex < numSectionPlanes; sectionPlaneIndex++) {
76365
+ for (let sectionPlaneIndex = 0; sectionPlaneIndex < numAllocatedSectionPlanes; sectionPlaneIndex++) {
76365
76366
  const sectionPlaneUniforms = this._uSectionPlanes[sectionPlaneIndex];
76366
76367
  if (sectionPlaneUniforms) {
76367
- const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
76368
- gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
76369
- if (active) {
76370
- const sectionPlane = sectionPlanes[sectionPlaneIndex];
76371
- if (origin) {
76372
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3c$c);
76373
- gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76374
- } else {
76375
- gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
76368
+ if (sectionPlaneIndex < numSectionPlanes) {
76369
+ const active = renderFlags.sectionPlanesActivePerLayer[baseIndex + sectionPlaneIndex];
76370
+ gl.uniform1i(sectionPlaneUniforms.active, active ? 1 : 0);
76371
+ if (active) {
76372
+ const sectionPlane = sectionPlanes[sectionPlaneIndex];
76373
+ if (origin) {
76374
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
76375
+ gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76376
+ } else {
76377
+ gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
76378
+ }
76379
+ gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
76376
76380
  }
76377
- gl.uniform3fv(sectionPlaneUniforms.dir, sectionPlane.dir);
76381
+ } else {
76382
+ gl.uniform1i(sectionPlaneUniforms.active, 0);
76378
76383
  }
76379
76384
  }
76380
76385
  }