@xeokit/xeokit-sdk 2.4.0-alpha-2 → 2.4.0-alpha-3

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.
@@ -66536,6 +66536,116 @@ class SpriteMarker extends Marker {
66536
66536
  }
66537
66537
  }
66538
66538
 
66539
+ const tempVec3a$V = math.vec3();
66540
+ const tempVec3b$7 = math.vec3();
66541
+ const tempMat4a = math.mat4();
66542
+
66543
+ /**
66544
+ * @private
66545
+ */
66546
+ class FrustumPlane {
66547
+
66548
+ constructor() {
66549
+ this.normal = math.vec3();
66550
+ this.offset = 0;
66551
+ this.testVertex = math.vec3();
66552
+ }
66553
+
66554
+ set(nx, ny, nz, offset) {
66555
+ const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz);
66556
+ this.normal[0] = nx * s;
66557
+ this.normal[1] = ny * s;
66558
+ this.normal[2] = nz * s;
66559
+ this.offset = offset * s;
66560
+ this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0;
66561
+ this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0;
66562
+ this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0;
66563
+ }
66564
+ }
66565
+
66566
+ /**
66567
+ * @private
66568
+ */
66569
+ class Frustum {
66570
+ constructor() {
66571
+ this.planes = [
66572
+ new FrustumPlane(), new FrustumPlane(), new FrustumPlane(),
66573
+ new FrustumPlane(), new FrustumPlane(), new FrustumPlane()
66574
+ ];
66575
+ }
66576
+ }
66577
+
66578
+ Frustum.INSIDE = 0;
66579
+ Frustum.INTERSECT = 1;
66580
+ Frustum.OUTSIDE = 2;
66581
+
66582
+ /** @private */
66583
+ function setFrustum(frustum, viewMat, projMat) {
66584
+
66585
+ const m = math.mulMat4(projMat, viewMat, tempMat4a);
66586
+
66587
+ const m0 = m[0];
66588
+ const m1 = m[1];
66589
+ const m2 = m[2];
66590
+ const m3 = m[3];
66591
+ const m4 = m[4];
66592
+ const m5 = m[5];
66593
+ const m6 = m[6];
66594
+ const m7 = m[7];
66595
+ const m8 = m[8];
66596
+ const m9 = m[9];
66597
+ const m10 = m[10];
66598
+ const m11 = m[11];
66599
+ const m12 = m[12];
66600
+ const m13 = m[13];
66601
+ const m14 = m[14];
66602
+ const m15 = m[15];
66603
+
66604
+ frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12);
66605
+ frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12);
66606
+ frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13);
66607
+ frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13);
66608
+ frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14);
66609
+ frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14);
66610
+ }
66611
+
66612
+ /** @private */
66613
+ function frustumIntersectsAABB3(frustum, aabb) {
66614
+
66615
+ let ret = Frustum.INSIDE;
66616
+
66617
+ const min = tempVec3a$V;
66618
+ const max = tempVec3b$7;
66619
+
66620
+ min[0] = aabb[0];
66621
+ min[1] = aabb[1];
66622
+ min[2] = aabb[2];
66623
+ max[0] = aabb[3];
66624
+ max[1] = aabb[4];
66625
+ max[2] = aabb[5];
66626
+
66627
+ const bminmax = [min, max];
66628
+
66629
+ for (let i = 0; i < 6; ++i) {
66630
+ const plane = frustum.planes[i];
66631
+ if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) +
66632
+ (plane.normal[1] * bminmax[plane.testVertex[1]][1]) +
66633
+ (plane.normal[2] * bminmax[plane.testVertex[2]][2]) +
66634
+ (plane.offset)) < 0.0) {
66635
+ return Frustum.OUTSIDE;
66636
+ }
66637
+
66638
+ if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) +
66639
+ (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) +
66640
+ (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) +
66641
+ (plane.offset)) < 0.0) {
66642
+ ret = Frustum.INTERSECT;
66643
+ }
66644
+ }
66645
+
66646
+ return ret;
66647
+ }
66648
+
66539
66649
  /**
66540
66650
  * @desc Saves and restores the state of a {@link Scene}'s {@link Camera}.
66541
66651
  *
@@ -69086,7 +69196,7 @@ const RENDER_PASSES = {
69086
69196
  };
69087
69197
 
69088
69198
  const tempVec4$7 = math.vec4();
69089
- const tempVec3a$V = math.vec3();
69199
+ const tempVec3a$U = math.vec3();
69090
69200
 
69091
69201
  /**
69092
69202
  * @private
@@ -69151,7 +69261,7 @@ class TrianglesBatchingColorRenderer {
69151
69261
  if (active) {
69152
69262
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69153
69263
  if (origin) {
69154
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$V);
69264
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69155
69265
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69156
69266
  } else {
69157
69267
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -69579,7 +69689,7 @@ class TrianglesBatchingColorRenderer {
69579
69689
  }
69580
69690
 
69581
69691
  const tempVec4$6 = math.vec4();
69582
- const tempVec3a$U = math.vec3();
69692
+ const tempVec3a$T = math.vec3();
69583
69693
 
69584
69694
  /**
69585
69695
  * @private
@@ -69641,7 +69751,7 @@ class TrianglesBatchingFlatColorRenderer {
69641
69751
  if (active) {
69642
69752
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
69643
69753
  if (origin) {
69644
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$U);
69754
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
69645
69755
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
69646
69756
  } else {
69647
69757
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70058,7 +70168,7 @@ class TrianglesBatchingFlatColorRenderer {
70058
70168
  }
70059
70169
 
70060
70170
  const defaultColor$4 = new Float32Array([1, 1, 1]);
70061
- const tempVec3a$T = math.vec3();
70171
+ const tempVec3a$S = math.vec3();
70062
70172
 
70063
70173
  /**
70064
70174
  * @private
@@ -70106,22 +70216,22 @@ class TrianglesBatchingSilhouetteRenderer {
70106
70216
  const material = scene.xrayMaterial._state;
70107
70217
  const fillColor = material.fillColor;
70108
70218
  const fillAlpha = material.fillAlpha;
70109
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70219
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70110
70220
 
70111
70221
  } else if (renderPass === RENDER_PASSES.SILHOUETTE_HIGHLIGHTED) {
70112
70222
  const material = scene.highlightMaterial._state;
70113
70223
  const fillColor = material.fillColor;
70114
70224
  const fillAlpha = material.fillAlpha;
70115
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70225
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70116
70226
 
70117
70227
  } else if (renderPass === RENDER_PASSES.SILHOUETTE_SELECTED) {
70118
70228
  const material = scene.selectedMaterial._state;
70119
70229
  const fillColor = material.fillColor;
70120
70230
  const fillAlpha = material.fillAlpha;
70121
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70231
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
70122
70232
 
70123
70233
  } else {
70124
- gl.uniform4fv(this._uColor, defaultColor$4);
70234
+ gl.uniform4fv(this._uSilhouetteColor, defaultColor$4);
70125
70235
  }
70126
70236
 
70127
70237
  const viewMat = (origin) ? createRTCViewMat(camera.viewMatrix, origin) : camera.viewMatrix;
@@ -70142,7 +70252,7 @@ class TrianglesBatchingSilhouetteRenderer {
70142
70252
  if (active) {
70143
70253
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70144
70254
  if (origin) {
70145
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$T);
70255
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70146
70256
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70147
70257
  } else {
70148
70258
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70169,6 +70279,10 @@ class TrianglesBatchingSilhouetteRenderer {
70169
70279
  this._aFlags2.bindArrayBuffer(state.flags2Buf);
70170
70280
  }
70171
70281
 
70282
+ if (this._aColor) {
70283
+ this._aColor.bindArrayBuffer(state.colorsBuf);
70284
+ }
70285
+
70172
70286
  state.indicesBuf.bind();
70173
70287
 
70174
70288
  gl.drawElements(gl.TRIANGLES, state.indicesBuf.numItems, state.indicesBuf.itemType, 0);
@@ -70193,7 +70307,7 @@ class TrianglesBatchingSilhouetteRenderer {
70193
70307
  this._uWorldMatrix = program.getLocation("worldMatrix");
70194
70308
  this._uViewMatrix = program.getLocation("viewMatrix");
70195
70309
  this._uProjMatrix = program.getLocation("projMatrix");
70196
- this._uColor = program.getLocation("color");
70310
+ this._uSilhouetteColor = program.getLocation("silhouetteColor");
70197
70311
  this._uSectionPlanes = [];
70198
70312
 
70199
70313
  for (let i = 0, len = scene._sectionPlanesState.sectionPlanes.length; i < len; i++) {
@@ -70208,6 +70322,7 @@ class TrianglesBatchingSilhouetteRenderer {
70208
70322
  this._aOffset = program.getAttribute("offset");
70209
70323
  this._aFlags = program.getAttribute("flags");
70210
70324
  this._aFlags2 = program.getAttribute("flags2");
70325
+ this._aColor = program.getAttribute("color");
70211
70326
 
70212
70327
  if (scene.logarithmicDepthBufferEnabled) {
70213
70328
  this._uLogDepthBufFC = program.getLocation("logDepthBufFC");
@@ -70255,11 +70370,12 @@ class TrianglesBatchingSilhouetteRenderer {
70255
70370
  }
70256
70371
  src.push("in vec4 flags;");
70257
70372
  src.push("in vec4 flags2;");
70373
+ src.push("in vec4 color;");
70258
70374
  src.push("uniform mat4 worldMatrix;");
70259
70375
  src.push("uniform mat4 viewMatrix;");
70260
70376
  src.push("uniform mat4 projMatrix;");
70261
70377
  src.push("uniform mat4 positionsDecodeMatrix;");
70262
- src.push("uniform vec4 color;");
70378
+ src.push("uniform vec4 silhouetteColor;");
70263
70379
 
70264
70380
  if (scene.logarithmicDepthBufferEnabled) {
70265
70381
  src.push("uniform float logDepthBufFC;");
@@ -70275,6 +70391,8 @@ class TrianglesBatchingSilhouetteRenderer {
70275
70391
  src.push("out vec4 vFlags2;");
70276
70392
  }
70277
70393
 
70394
+ src.push("out vec4 vColor;");
70395
+
70278
70396
  src.push("void main(void) {");
70279
70397
 
70280
70398
  // flags.y = NOT_RENDERED | SILHOUETTE_HIGHLIGHTED | SILHOUETTE_SELECTED | SILHOUETTE_XRAYED
@@ -70293,6 +70411,7 @@ class TrianglesBatchingSilhouetteRenderer {
70293
70411
  src.push("vWorldPosition = worldPosition;");
70294
70412
  src.push("vFlags2 = flags2;");
70295
70413
  }
70414
+ src.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));");
70296
70415
  src.push("vec4 clipPos = projMatrix * viewPosition;");
70297
70416
  if (scene.logarithmicDepthBufferEnabled) {
70298
70417
  src.push("vFragDepth = 1.0 + clipPos.w;");
@@ -70335,7 +70454,7 @@ class TrianglesBatchingSilhouetteRenderer {
70335
70454
  src.push("uniform vec3 sectionPlaneDir" + i + ";");
70336
70455
  }
70337
70456
  }
70338
- src.push("uniform vec4 color;");
70457
+ src.push("in vec4 vColor;");
70339
70458
  src.push("out vec4 outColor;");
70340
70459
  src.push("void main(void) {");
70341
70460
  if (clipping) {
@@ -70353,7 +70472,7 @@ class TrianglesBatchingSilhouetteRenderer {
70353
70472
  if (scene.logarithmicDepthBufferEnabled) {
70354
70473
  src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");
70355
70474
  }
70356
- src.push("outColor = color;");
70475
+ src.push("outColor = vColor;");
70357
70476
  src.push("}");
70358
70477
  return src;
70359
70478
  }
@@ -70370,7 +70489,7 @@ class TrianglesBatchingSilhouetteRenderer {
70370
70489
  }
70371
70490
  }
70372
70491
 
70373
- const tempVec3a$S = math.vec3();
70492
+ const tempVec3a$R = math.vec3();
70374
70493
  const defaultColor$3 = new Float32Array([0,0,0,1]);
70375
70494
 
70376
70495
  /**
@@ -70453,7 +70572,7 @@ class TrianglesBatchingEdgesRenderer {
70453
70572
  if (active) {
70454
70573
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70455
70574
  if (origin) {
70456
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$S);
70575
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
70457
70576
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70458
70577
  } else {
70459
70578
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70681,7 +70800,7 @@ class TrianglesBatchingEdgesRenderer {
70681
70800
  }
70682
70801
  }
70683
70802
 
70684
- const tempVec3a$R = math.vec3();
70803
+ const tempVec3a$Q = math.vec3();
70685
70804
 
70686
70805
  /**
70687
70806
  * @private
@@ -70741,7 +70860,7 @@ class TrianglesBatchingEdgesColorRenderer {
70741
70860
  if (active) {
70742
70861
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
70743
70862
  if (origin) {
70744
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$R);
70863
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
70745
70864
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
70746
70865
  } else {
70747
70866
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -70969,7 +71088,7 @@ class TrianglesBatchingEdgesColorRenderer {
70969
71088
  }
70970
71089
  }
70971
71090
 
70972
- const tempVec3a$Q = math.vec3();
71091
+ const tempVec3a$P = math.vec3();
70973
71092
 
70974
71093
  /**
70975
71094
  * @private
@@ -71035,7 +71154,7 @@ class TrianglesBatchingPickMeshRenderer {
71035
71154
  if (active) {
71036
71155
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71037
71156
  if (origin) {
71038
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$Q);
71157
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71039
71158
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71040
71159
  } else {
71041
71160
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71265,7 +71384,7 @@ class TrianglesBatchingPickMeshRenderer {
71265
71384
  }
71266
71385
  }
71267
71386
 
71268
- const tempVec3a$P = math.vec3();
71387
+ const tempVec3a$O = math.vec3();
71269
71388
 
71270
71389
  /**
71271
71390
  * @private
@@ -71336,7 +71455,7 @@ class TrianglesBatchingPickDepthRenderer {
71336
71455
  if (active) {
71337
71456
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71338
71457
  if (origin) {
71339
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$P);
71458
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71340
71459
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71341
71460
  } else {
71342
71461
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71574,7 +71693,7 @@ class TrianglesBatchingPickDepthRenderer {
71574
71693
  }
71575
71694
  }
71576
71695
 
71577
- const tempVec3a$O = math.vec3();
71696
+ const tempVec3a$N = math.vec3();
71578
71697
 
71579
71698
  /**
71580
71699
  * @private
@@ -71642,7 +71761,7 @@ class TrianglesBatchingPickNormalsRenderer {
71642
71761
  if (active) {
71643
71762
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71644
71763
  if (origin) {
71645
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$O);
71764
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
71646
71765
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71647
71766
  } else {
71648
71767
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -71867,7 +71986,7 @@ class TrianglesBatchingPickNormalsRenderer {
71867
71986
  }
71868
71987
  }
71869
71988
 
71870
- const tempVec3a$N = math.vec3();
71989
+ const tempVec3a$M = math.vec3();
71871
71990
 
71872
71991
  /**
71873
71992
  * @private
@@ -71927,7 +72046,7 @@ class TrianglesBatchingOcclusionRenderer {
71927
72046
  if (active) {
71928
72047
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
71929
72048
  if (origin) {
71930
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$N);
72049
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
71931
72050
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
71932
72051
  } else {
71933
72052
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72150,7 +72269,7 @@ class TrianglesBatchingOcclusionRenderer {
72150
72269
  }
72151
72270
  }
72152
72271
 
72153
- const tempVec3a$M = math.vec3();
72272
+ const tempVec3a$L = math.vec3();
72154
72273
 
72155
72274
  /**
72156
72275
  * @private
@@ -72210,7 +72329,7 @@ class TrianglesBatchingDepthRenderer {
72210
72329
  if (active) {
72211
72330
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72212
72331
  if (origin) {
72213
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$M);
72332
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72214
72333
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72215
72334
  } else {
72216
72335
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72434,7 +72553,7 @@ class TrianglesBatchingDepthRenderer {
72434
72553
  }
72435
72554
  }
72436
72555
 
72437
- const tempVec3a$L = math.vec3();
72556
+ const tempVec3a$K = math.vec3();
72438
72557
 
72439
72558
  /**
72440
72559
  * @private
@@ -72497,7 +72616,7 @@ class TrianglesBatchingNormalsRenderer {
72497
72616
  if (active) {
72498
72617
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72499
72618
  if (origin) {
72500
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$L);
72619
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
72501
72620
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72502
72621
  } else {
72503
72622
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72737,7 +72856,7 @@ class TrianglesBatchingNormalsRenderer {
72737
72856
  }
72738
72857
  }
72739
72858
 
72740
- const tempVec3a$K = math.vec3();
72859
+ const tempVec3a$J = math.vec3();
72741
72860
 
72742
72861
  /**
72743
72862
  * Renders BatchingLayer fragment depths to a shadow map.
@@ -72806,7 +72925,7 @@ class TrianglesBatchingShadowRenderer {
72806
72925
  if (active) {
72807
72926
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
72808
72927
  if (origin) {
72809
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$K);
72928
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
72810
72929
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
72811
72930
  } else {
72812
72931
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -72978,7 +73097,7 @@ class TrianglesBatchingShadowRenderer {
72978
73097
  }
72979
73098
 
72980
73099
  const tempVec4$5 = math.vec4();
72981
- const tempVec3a$J = math.vec3();
73100
+ const tempVec3a$I = math.vec3();
72982
73101
 
72983
73102
  // const TEXTURE_DECODE_FUNCS = {};
72984
73103
  // TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -73051,7 +73170,7 @@ class TrianglesBatchingPBRRenderer {
73051
73170
  if (active) {
73052
73171
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73053
73172
  if (origin) {
73054
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$J);
73173
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
73055
73174
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73056
73175
  } else {
73057
73176
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -73856,7 +73975,7 @@ class TrianglesBatchingPBRRenderer {
73856
73975
  }
73857
73976
  }
73858
73977
 
73859
- const tempVec3a$I = math.vec3();
73978
+ const tempVec3a$H = math.vec3();
73860
73979
 
73861
73980
  /**
73862
73981
  * @private
@@ -73923,7 +74042,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
73923
74042
  if (active) {
73924
74043
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
73925
74044
  if (origin) {
73926
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$I);
74045
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
73927
74046
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
73928
74047
  } else {
73929
74048
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -74133,7 +74252,7 @@ class TrianglesBatchingPickNormalsFlatRenderer {
74133
74252
  }
74134
74253
 
74135
74254
  const tempVec4$4 = math.vec4();
74136
- const tempVec3a$H = math.vec3();
74255
+ const tempVec3a$G = math.vec3();
74137
74256
 
74138
74257
  /**
74139
74258
  * @private
@@ -74198,7 +74317,7 @@ class TrianglesBatchingColorTextureRenderer {
74198
74317
  if (active) {
74199
74318
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
74200
74319
  if (origin) {
74201
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$H);
74320
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$G);
74202
74321
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
74203
74322
  } else {
74204
74323
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -75204,8 +75323,8 @@ const tempVec4b$a = math.vec4([0, 0, 0, 1]);
75204
75323
  const tempVec4c$7 = math.vec4([0, 0, 0, 1]);
75205
75324
  const tempOBB3$2 = math.OBB3();
75206
75325
 
75207
- const tempVec3a$G = math.vec3();
75208
- const tempVec3b$7 = math.vec3();
75326
+ const tempVec3a$F = math.vec3();
75327
+ const tempVec3b$6 = math.vec3();
75209
75328
  const tempVec3c$5 = math.vec3();
75210
75329
  const tempVec3d$2 = math.vec3();
75211
75330
  const tempVec3e$1 = math.vec3();
@@ -76384,8 +76503,8 @@ class TrianglesBatchingLayer {
76384
76503
  const origin = state.origin;
76385
76504
  const offset = portion.offset;
76386
76505
 
76387
- const rtcRayOrigin = tempVec3a$G;
76388
- const rtcRayDir = tempVec3b$7;
76506
+ const rtcRayOrigin = tempVec3a$F;
76507
+ const rtcRayDir = tempVec3b$6;
76389
76508
 
76390
76509
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$5) : worldRayOrigin); // World -> RTC
76391
76510
  rtcRayDir.set(worldRayDir);
@@ -76508,7 +76627,7 @@ class TrianglesBatchingLayer {
76508
76627
  }
76509
76628
 
76510
76629
  const tempVec4$3 = math.vec4();
76511
- const tempVec3a$F = math.vec3();
76630
+ const tempVec3a$E = math.vec3();
76512
76631
 
76513
76632
  /**
76514
76633
  * @private
@@ -76574,7 +76693,7 @@ class TrianglesInstancingColorRenderer {
76574
76693
  if (active) {
76575
76694
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
76576
76695
  if (origin) {
76577
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$F);
76696
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
76578
76697
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
76579
76698
  } else {
76580
76699
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77051,7 +77170,7 @@ class TrianglesInstancingColorRenderer {
77051
77170
  }
77052
77171
 
77053
77172
  const tempVec4$2 = math.vec4();
77054
- const tempVec3a$E = math.vec3();
77173
+ const tempVec3a$D = math.vec3();
77055
77174
 
77056
77175
  /**
77057
77176
  * @private
@@ -77113,7 +77232,7 @@ class TrianglesInstancingFlatColorRenderer {
77113
77232
  if (active) {
77114
77233
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77115
77234
  if (origin) {
77116
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$E);
77235
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77117
77236
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77118
77237
  } else {
77119
77238
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77560,7 +77679,7 @@ class TrianglesInstancingFlatColorRenderer {
77560
77679
  }
77561
77680
  }
77562
77681
 
77563
- const tempVec3a$D = math.vec3();
77682
+ const tempVec3a$C = math.vec3();
77564
77683
 
77565
77684
  /**
77566
77685
  * @private
@@ -77609,22 +77728,22 @@ class TrianglesInstancingSilhouetteRenderer {
77609
77728
  const material = scene.xrayMaterial._state;
77610
77729
  const fillColor = material.fillColor;
77611
77730
  const fillAlpha = material.fillAlpha;
77612
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77731
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77613
77732
 
77614
77733
  } else if (renderPass === RENDER_PASSES.SILHOUETTE_HIGHLIGHTED) {
77615
77734
  const material = scene.highlightMaterial._state;
77616
77735
  const fillColor = material.fillColor;
77617
77736
  const fillAlpha = material.fillAlpha;
77618
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77737
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77619
77738
 
77620
77739
  } else if (renderPass === RENDER_PASSES.SILHOUETTE_SELECTED) {
77621
77740
  const material = scene.selectedMaterial._state;
77622
77741
  const fillColor = material.fillColor;
77623
77742
  const fillAlpha = material.fillAlpha;
77624
- gl.uniform4f(this._uColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77743
+ gl.uniform4f(this._uSilhouetteColor, fillColor[0], fillColor[1], fillColor[2], fillAlpha);
77625
77744
 
77626
77745
  } else {
77627
- gl.uniform4fv(this._uColor, math.vec3([1, 1, 1]));
77746
+ gl.uniform4fv(this._uSilhouetteColor, math.vec3([1, 1, 1]));
77628
77747
  }
77629
77748
 
77630
77749
  gl.uniformMatrix4fv(this._uViewMatrix, false, (origin) ? createRTCViewMat(camera.viewMatrix, origin) : camera.viewMatrix);
@@ -77643,7 +77762,7 @@ class TrianglesInstancingSilhouetteRenderer {
77643
77762
  if (active) {
77644
77763
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77645
77764
  if (origin) {
77646
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$D);
77765
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
77647
77766
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77648
77767
  } else {
77649
77768
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -77679,6 +77798,11 @@ class TrianglesInstancingSilhouetteRenderer {
77679
77798
  gl.vertexAttribDivisor(this._aOffset.location, 1);
77680
77799
  }
77681
77800
 
77801
+ if (this._aColor) {
77802
+ this._aColor.bindArrayBuffer(state.colorsBuf);
77803
+ gl.vertexAttribDivisor(this._aColor.location, 1);
77804
+ }
77805
+
77682
77806
  geometry.indicesBuf.bind();
77683
77807
 
77684
77808
  gl.drawElementsInstanced(gl.TRIANGLES, geometry.indicesBuf.numItems, geometry.indicesBuf.itemType, 0, state.numInstances);
@@ -77694,6 +77818,9 @@ class TrianglesInstancingSilhouetteRenderer {
77694
77818
  if (this._aOffset) {
77695
77819
  gl.vertexAttribDivisor(this._aOffset.location, 0);
77696
77820
  }
77821
+ if (this._aColor) {
77822
+ gl.vertexAttribDivisor(this._aColor.location, 0);
77823
+ }
77697
77824
  }
77698
77825
 
77699
77826
  _allocate() {
@@ -77716,7 +77843,7 @@ class TrianglesInstancingSilhouetteRenderer {
77716
77843
  this._uWorldMatrix = program.getLocation("worldMatrix");
77717
77844
  this._uViewMatrix = program.getLocation("viewMatrix");
77718
77845
  this._uProjMatrix = program.getLocation("projMatrix");
77719
- this._uColor = program.getLocation("color");
77846
+ this._uSilhouetteColor = program.getLocation("silhouetteColor");
77720
77847
  this._uSectionPlanes = [];
77721
77848
 
77722
77849
  const clips = sectionPlanesState.sectionPlanes;
@@ -77732,6 +77859,8 @@ class TrianglesInstancingSilhouetteRenderer {
77732
77859
  this._aOffset = program.getAttribute("offset");
77733
77860
  this._aFlags = program.getAttribute("flags");
77734
77861
  this._aFlags2 = program.getAttribute("flags2");
77862
+ this._aColor = program.getAttribute("color");
77863
+
77735
77864
  this._aModelMatrixCol0 = program.getAttribute("modelMatrixCol0");
77736
77865
  this._aModelMatrixCol1 = program.getAttribute("modelMatrixCol1");
77737
77866
  this._aModelMatrixCol2 = program.getAttribute("modelMatrixCol2");
@@ -77770,7 +77899,7 @@ class TrianglesInstancingSilhouetteRenderer {
77770
77899
  const clipping = sectionPlanesState.sectionPlanes.length > 0;
77771
77900
  const src = [];
77772
77901
  src.push("#version 300 es");
77773
- src.push("// Instancing fill vertex shader");
77902
+ src.push("// Instancing silhouette vertex shader");
77774
77903
 
77775
77904
  src.push("uniform int renderPass;");
77776
77905
 
@@ -77780,6 +77909,7 @@ class TrianglesInstancingSilhouetteRenderer {
77780
77909
  }
77781
77910
  src.push("in vec4 flags;");
77782
77911
  src.push("in vec4 flags2;");
77912
+ src.push("in vec4 color;");
77783
77913
 
77784
77914
  src.push("in vec4 modelMatrixCol0;"); // Modeling matrix
77785
77915
  src.push("in vec4 modelMatrixCol1;");
@@ -77789,6 +77919,7 @@ class TrianglesInstancingSilhouetteRenderer {
77789
77919
  src.push("uniform mat4 viewMatrix;");
77790
77920
  src.push("uniform mat4 projMatrix;");
77791
77921
  src.push("uniform mat4 positionsDecodeMatrix;");
77922
+ src.push("uniform vec4 silhouetteColor;");
77792
77923
 
77793
77924
  if (scene.logarithmicDepthBufferEnabled) {
77794
77925
  src.push("uniform float logDepthBufFC;");
@@ -77799,13 +77930,13 @@ class TrianglesInstancingSilhouetteRenderer {
77799
77930
  src.push("out float isPerspective;");
77800
77931
  }
77801
77932
 
77802
- src.push("uniform vec4 color;");
77803
-
77804
77933
  if (clipping) {
77805
77934
  src.push("out vec4 vWorldPosition;");
77806
77935
  src.push("out vec4 vFlags2;");
77807
77936
  }
77808
77937
 
77938
+ src.push("out vec4 vColor;");
77939
+
77809
77940
  src.push("void main(void) {");
77810
77941
 
77811
77942
  // flags.y = NOT_RENDERED | SILHOUETTE_HIGHLIGHTED | SILHOUETTE_SELECTED | | SILHOUETTE_XRAYED
@@ -77827,6 +77958,7 @@ class TrianglesInstancingSilhouetteRenderer {
77827
77958
  src.push("vWorldPosition = worldPosition;");
77828
77959
  src.push("vFlags2 = flags2;");
77829
77960
  }
77961
+ src.push("vColor = vec4(silhouetteColor.r, silhouetteColor.g, silhouetteColor.b, min(silhouetteColor.a, float(color.a) / 255.0));");
77830
77962
  src.push("vec4 clipPos = projMatrix * viewPosition;");
77831
77963
  if (scene.logarithmicDepthBufferEnabled) {
77832
77964
  src.push("vFragDepth = 1.0 + clipPos.w;");
@@ -77867,7 +77999,7 @@ class TrianglesInstancingSilhouetteRenderer {
77867
77999
  src.push("uniform vec3 sectionPlaneDir" + i + ";");
77868
78000
  }
77869
78001
  }
77870
- src.push("uniform vec4 color;");
78002
+ src.push("in vec4 vColor;");
77871
78003
  src.push("out vec4 outColor;");
77872
78004
  src.push("void main(void) {");
77873
78005
  if (clipping) {
@@ -77885,7 +78017,7 @@ class TrianglesInstancingSilhouetteRenderer {
77885
78017
  if (scene.logarithmicDepthBufferEnabled) {
77886
78018
  src.push(" gl_FragDepth = isPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;");
77887
78019
  }
77888
- src.push("outColor = color;");
78020
+ src.push("outColor = vColor;");
77889
78021
  src.push("}");
77890
78022
  return src;
77891
78023
  }
@@ -77902,7 +78034,7 @@ class TrianglesInstancingSilhouetteRenderer {
77902
78034
  }
77903
78035
  }
77904
78036
 
77905
- const tempVec3a$C = math.vec3();
78037
+ const tempVec3a$B = math.vec3();
77906
78038
  const defaultColor$2 = new Float32Array([0,0,0,1]);
77907
78039
 
77908
78040
  /**
@@ -77986,7 +78118,7 @@ class TrianglesInstancingEdgesRenderer {
77986
78118
  if (active) {
77987
78119
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
77988
78120
  if (origin) {
77989
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$C);
78121
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
77990
78122
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
77991
78123
  } else {
77992
78124
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78247,7 +78379,7 @@ class TrianglesInstancingEdgesRenderer {
78247
78379
  }
78248
78380
  }
78249
78381
 
78250
- const tempVec3a$B = math.vec3();
78382
+ const tempVec3a$A = math.vec3();
78251
78383
 
78252
78384
  /**
78253
78385
  * @private
@@ -78308,7 +78440,7 @@ class TrianglesInstancingEdgesColorRenderer {
78308
78440
  if (active) {
78309
78441
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78310
78442
  if (origin) {
78311
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$B);
78443
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78312
78444
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78313
78445
  } else {
78314
78446
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78574,7 +78706,7 @@ class TrianglesInstancingEdgesColorRenderer {
78574
78706
  }
78575
78707
  }
78576
78708
 
78577
- const tempVec3a$A = math.vec3();
78709
+ const tempVec3a$z = math.vec3();
78578
78710
 
78579
78711
  /**
78580
78712
  * @private
@@ -78677,7 +78809,7 @@ class TrianglesInstancingPickMeshRenderer {
78677
78809
  if (active) {
78678
78810
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78679
78811
  if (origin) {
78680
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$A);
78812
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
78681
78813
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78682
78814
  } else {
78683
78815
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -78912,7 +79044,7 @@ class TrianglesInstancingPickMeshRenderer {
78912
79044
  }
78913
79045
  }
78914
79046
 
78915
- const tempVec3a$z = math.vec3();
79047
+ const tempVec3a$y = math.vec3();
78916
79048
 
78917
79049
  /**
78918
79050
  * @private
@@ -78989,7 +79121,7 @@ class TrianglesInstancingPickDepthRenderer {
78989
79121
  if (active) {
78990
79122
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
78991
79123
  if (origin) {
78992
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$z);
79124
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
78993
79125
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
78994
79126
  } else {
78995
79127
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79257,7 +79389,7 @@ class TrianglesInstancingPickDepthRenderer {
79257
79389
  }
79258
79390
  }
79259
79391
 
79260
- const tempVec3a$y = math.vec3();
79392
+ const tempVec3a$x = math.vec3();
79261
79393
 
79262
79394
  /**
79263
79395
  * @private
@@ -79334,7 +79466,7 @@ class TrianglesInstancingPickNormalsRenderer {
79334
79466
  if (active) {
79335
79467
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79336
79468
  if (origin) {
79337
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$y);
79469
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79338
79470
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79339
79471
  } else {
79340
79472
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79611,7 +79743,7 @@ class TrianglesInstancingPickNormalsRenderer {
79611
79743
  }
79612
79744
  }
79613
79745
 
79614
- const tempVec3a$x = math.vec3();
79746
+ const tempVec3a$w = math.vec3();
79615
79747
 
79616
79748
  /**
79617
79749
  * @private
@@ -79672,7 +79804,7 @@ class TrianglesInstancingOcclusionRenderer {
79672
79804
  if (active) {
79673
79805
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79674
79806
  if (origin) {
79675
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$x);
79807
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
79676
79808
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79677
79809
  } else {
79678
79810
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -79930,7 +80062,7 @@ class TrianglesInstancingOcclusionRenderer {
79930
80062
  }
79931
80063
  }
79932
80064
 
79933
- const tempVec3a$w = math.vec3();
80065
+ const tempVec3a$v = math.vec3();
79934
80066
 
79935
80067
  /**
79936
80068
  * @private
@@ -79991,7 +80123,7 @@ class TrianglesInstancingDepthRenderer {
79991
80123
  if (active) {
79992
80124
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
79993
80125
  if (origin) {
79994
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$w);
80126
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
79995
80127
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
79996
80128
  } else {
79997
80129
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80241,7 +80373,7 @@ class TrianglesInstancingDepthRenderer {
80241
80373
  }
80242
80374
  }
80243
80375
 
80244
- const tempVec3a$v = math.vec3();
80376
+ const tempVec3a$u = math.vec3();
80245
80377
 
80246
80378
  /**
80247
80379
  * @private
@@ -80305,7 +80437,7 @@ class TrianglesInstancingNormalsRenderer {
80305
80437
  if (active) {
80306
80438
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80307
80439
  if (origin) {
80308
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$v);
80440
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80309
80441
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80310
80442
  } else {
80311
80443
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80585,7 +80717,7 @@ class TrianglesInstancingNormalsRenderer {
80585
80717
  }
80586
80718
  }
80587
80719
 
80588
- const tempVec3a$u = math.vec3();
80720
+ const tempVec3a$t = math.vec3();
80589
80721
 
80590
80722
  /**
80591
80723
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -80672,7 +80804,7 @@ class TrianglesInstancingShadowRenderer {
80672
80804
  if (active) {
80673
80805
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80674
80806
  if (origin) {
80675
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$u);
80807
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
80676
80808
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80677
80809
  } else {
80678
80810
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -80865,7 +80997,7 @@ class TrianglesInstancingShadowRenderer {
80865
80997
  }
80866
80998
 
80867
80999
  const tempVec4$1 = math.vec4();
80868
- const tempVec3a$t = math.vec3();
81000
+ const tempVec3a$s = math.vec3();
80869
81001
 
80870
81002
  const TEXTURE_DECODE_FUNCS = {};
80871
81003
  TEXTURE_DECODE_FUNCS[LinearEncoding] = "linearToLinear";
@@ -80939,7 +81071,7 @@ class TrianglesInstancingPBRRenderer {
80939
81071
  if (active) {
80940
81072
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
80941
81073
  if (origin) {
80942
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$t);
81074
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
80943
81075
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
80944
81076
  } else {
80945
81077
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -81775,7 +81907,7 @@ class TrianglesInstancingPBRRenderer {
81775
81907
  }
81776
81908
  }
81777
81909
 
81778
- const tempVec3a$s = math.vec3();
81910
+ const tempVec3a$r = math.vec3();
81779
81911
 
81780
81912
  /**
81781
81913
  * @private
@@ -81850,7 +81982,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
81850
81982
  if (active) {
81851
81983
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
81852
81984
  if (origin) {
81853
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$s);
81985
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
81854
81986
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
81855
81987
  } else {
81856
81988
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82090,7 +82222,7 @@ class TrianglesInstancingPickNormalsFlatRenderer {
82090
82222
  }
82091
82223
 
82092
82224
  const tempVec4 = math.vec4();
82093
- const tempVec3a$r = math.vec3();
82225
+ const tempVec3a$q = math.vec3();
82094
82226
 
82095
82227
  /**
82096
82228
  * @private
@@ -82155,7 +82287,7 @@ class TrianglesInstancingColorTextureRenderer {
82155
82287
  if (active) {
82156
82288
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
82157
82289
  if (origin) {
82158
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$r);
82290
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$q);
82159
82291
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
82160
82292
  } else {
82161
82293
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -82966,8 +83098,8 @@ const tempVec4b$9 = math.vec4([0, 0, 0, 1]);
82966
83098
  const tempVec4c$6 = math.vec4([0, 0, 0, 1]);
82967
83099
  const tempVec3fa$2 = new Float32Array(3);
82968
83100
 
82969
- const tempVec3a$q = math.vec3();
82970
- const tempVec3b$6 = math.vec3();
83101
+ const tempVec3a$p = math.vec3();
83102
+ const tempVec3b$5 = math.vec3();
82971
83103
  const tempVec3c$4 = math.vec3();
82972
83104
  const tempVec3d$1 = math.vec3();
82973
83105
  const tempVec3e = math.vec3();
@@ -83895,8 +84027,8 @@ class TrianglesInstancingLayer {
83895
84027
  const origin = state.origin;
83896
84028
  const offset = portion.offset;
83897
84029
 
83898
- const rtcRayOrigin = tempVec3a$q;
83899
- const rtcRayDir = tempVec3b$6;
84030
+ const rtcRayOrigin = tempVec3a$p;
84031
+ const rtcRayDir = tempVec3b$5;
83900
84032
 
83901
84033
  rtcRayOrigin.set(origin ? math.subVec3(worldRayOrigin, origin, tempVec3c$4) : worldRayOrigin); // World -> RTC
83902
84034
  rtcRayDir.set(worldRayDir);
@@ -84029,7 +84161,7 @@ class TrianglesInstancingLayer {
84029
84161
  }
84030
84162
  }
84031
84163
 
84032
- const tempVec3a$p = math.vec3();
84164
+ const tempVec3a$o = math.vec3();
84033
84165
 
84034
84166
  /**
84035
84167
  * @private
@@ -84092,7 +84224,7 @@ class LinesBatchingColorRenderer {
84092
84224
  if (active) {
84093
84225
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84094
84226
  if (origin) {
84095
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$p);
84227
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84096
84228
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84097
84229
  } else {
84098
84230
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -84312,7 +84444,7 @@ class LinesBatchingColorRenderer {
84312
84444
  }
84313
84445
 
84314
84446
  const defaultColor$1 = new Float32Array([1, 1, 1]);
84315
- const tempVec3a$o = math.vec3();
84447
+ const tempVec3a$n = math.vec3();
84316
84448
 
84317
84449
  /**
84318
84450
  * @private
@@ -84399,7 +84531,7 @@ class LinesBatchingSilhouetteRenderer {
84399
84531
  if (active) {
84400
84532
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
84401
84533
  if (origin) {
84402
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$o);
84534
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
84403
84535
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
84404
84536
  } else {
84405
84537
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -85496,7 +85628,7 @@ class LinesBatchingLayer {
85496
85628
  }
85497
85629
  }
85498
85630
 
85499
- const tempVec3a$n = math.vec3();
85631
+ const tempVec3a$m = math.vec3();
85500
85632
 
85501
85633
  /**
85502
85634
  * @private
@@ -85559,7 +85691,7 @@ class LinesInstancingColorRenderer {
85559
85691
  if (active) {
85560
85692
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
85561
85693
  if (origin) {
85562
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$n);
85694
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
85563
85695
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
85564
85696
  } else {
85565
85697
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -85841,7 +85973,7 @@ class LinesInstancingColorRenderer {
85841
85973
  }
85842
85974
  }
85843
85975
 
85844
- const tempVec3a$m = math.vec3();
85976
+ const tempVec3a$l = math.vec3();
85845
85977
 
85846
85978
  /**
85847
85979
  * @private
@@ -85926,7 +86058,7 @@ class LinesInstancingSilhouetteRenderer {
85926
86058
  if (active) {
85927
86059
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
85928
86060
  if (origin) {
85929
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$m);
86061
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
85930
86062
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
85931
86063
  } else {
85932
86064
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -86908,7 +87040,7 @@ class LinesInstancingLayer {
86908
87040
  }
86909
87041
  }
86910
87042
 
86911
- const tempVec3a$l = math.vec3();
87043
+ const tempVec3a$k = math.vec3();
86912
87044
 
86913
87045
  /**
86914
87046
  * @private
@@ -86969,7 +87101,7 @@ class PointsBatchingColorRenderer {
86969
87101
  if (active) {
86970
87102
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
86971
87103
  if (origin) {
86972
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$l);
87104
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
86973
87105
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
86974
87106
  } else {
86975
87107
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87254,7 +87386,7 @@ class PointsBatchingColorRenderer {
87254
87386
  }
87255
87387
 
87256
87388
  const defaultColor = new Float32Array([1, 1, 1]);
87257
- const tempVec3a$k = math.vec3();
87389
+ const tempVec3a$j = math.vec3();
87258
87390
 
87259
87391
  /**
87260
87392
  * @private
@@ -87339,7 +87471,7 @@ class PointsBatchingSilhouetteRenderer {
87339
87471
  if (active) {
87340
87472
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87341
87473
  if (origin) {
87342
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$k);
87474
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87343
87475
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87344
87476
  } else {
87345
87477
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87583,7 +87715,7 @@ class PointsBatchingSilhouetteRenderer {
87583
87715
  }
87584
87716
  }
87585
87717
 
87586
- const tempVec3a$j = math.vec3();
87718
+ const tempVec3a$i = math.vec3();
87587
87719
 
87588
87720
  /**
87589
87721
  * @private
@@ -87650,7 +87782,7 @@ class PointsBatchingPickMeshRenderer {
87650
87782
  if (active) {
87651
87783
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87652
87784
  if (origin) {
87653
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$j);
87785
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
87654
87786
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87655
87787
  } else {
87656
87788
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -87895,7 +88027,7 @@ class PointsBatchingPickMeshRenderer {
87895
88027
  }
87896
88028
  }
87897
88029
 
87898
- const tempVec3a$i = math.vec3();
88030
+ const tempVec3a$h = math.vec3();
87899
88031
 
87900
88032
  /**
87901
88033
  * @private
@@ -87967,7 +88099,7 @@ class PointsBatchingPickDepthRenderer {
87967
88099
  if (active) {
87968
88100
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
87969
88101
  if (origin) {
87970
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$i);
88102
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
87971
88103
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
87972
88104
  } else {
87973
88105
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88218,7 +88350,7 @@ class PointsBatchingPickDepthRenderer {
88218
88350
  }
88219
88351
  }
88220
88352
 
88221
- const tempVec3a$h = math.vec3();
88353
+ const tempVec3a$g = math.vec3();
88222
88354
 
88223
88355
  /**
88224
88356
  * @private
@@ -88279,7 +88411,7 @@ class PointsBatchingOcclusionRenderer {
88279
88411
  if (active) {
88280
88412
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
88281
88413
  if (origin) {
88282
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$h);
88414
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$g);
88283
88415
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
88284
88416
  } else {
88285
88417
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -88645,8 +88777,8 @@ class PointsBatchingBuffer {
88645
88777
  }
88646
88778
  }
88647
88779
 
88648
- const tempVec3a$g = math.vec4();
88649
- const tempVec3b$5 = math.vec4();
88780
+ const tempVec3a$f = math.vec4();
88781
+ const tempVec3b$4 = math.vec4();
88650
88782
  const tempVec4a$6 = math.vec4([0, 0, 0, 1]);
88651
88783
  const tempVec4b$6 = math.vec4([0, 0, 0, 1]);
88652
88784
  const tempVec4c$3 = math.vec4([0, 0, 0, 1]);
@@ -88798,8 +88930,8 @@ class PointsBatchingLayer {
88798
88930
 
88799
88931
  const bounds = geometryCompressionUtils.getPositionsBounds(positionsCompressed);
88800
88932
 
88801
- const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$g);
88802
- const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$5);
88933
+ const min = geometryCompressionUtils.decompressPosition(bounds.min, this._state.positionsDecodeMatrix, tempVec3a$f);
88934
+ const max = geometryCompressionUtils.decompressPosition(bounds.max, this._state.positionsDecodeMatrix, tempVec3b$4);
88803
88935
 
88804
88936
  worldAABB[0] = min[0];
88805
88937
  worldAABB[1] = min[1];
@@ -89437,7 +89569,7 @@ class PointsBatchingLayer {
89437
89569
  }
89438
89570
  }
89439
89571
 
89440
- const tempVec3a$f = math.vec3();
89572
+ const tempVec3a$e = math.vec3();
89441
89573
 
89442
89574
  /**
89443
89575
  * @private
@@ -89506,7 +89638,7 @@ class PointsInstancingColorRenderer {
89506
89638
  if (active) {
89507
89639
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
89508
89640
  if (origin) {
89509
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$f);
89641
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
89510
89642
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
89511
89643
  } else {
89512
89644
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -89816,7 +89948,7 @@ class PointsInstancingColorRenderer {
89816
89948
  }
89817
89949
  }
89818
89950
 
89819
- const tempVec3a$e = math.vec3();
89951
+ const tempVec3a$d = math.vec3();
89820
89952
 
89821
89953
  /**
89822
89954
  * @private
@@ -89900,7 +90032,7 @@ class PointsInstancingSilhouetteRenderer {
89900
90032
  if (active) {
89901
90033
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
89902
90034
  if (origin) {
89903
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$e);
90035
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
89904
90036
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
89905
90037
  } else {
89906
90038
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -89975,7 +90107,7 @@ class PointsInstancingSilhouetteRenderer {
89975
90107
  this._uWorldMatrix = program.getLocation("worldMatrix");
89976
90108
  this._uViewMatrix = program.getLocation("viewMatrix");
89977
90109
  this._uProjMatrix = program.getLocation("projMatrix");
89978
- this._uColor = program.getLocation("color");
90110
+ this._uColor = program.getLocation("silhouetteColor");
89979
90111
  this._uSectionPlanes = [];
89980
90112
 
89981
90113
  const clips = sectionPlanesState.sectionPlanes;
@@ -90044,6 +90176,7 @@ class PointsInstancingSilhouetteRenderer {
90044
90176
  }
90045
90177
  src.push("in vec4 flags;");
90046
90178
  src.push("in vec4 flags2;");
90179
+ src.push("in vec4 color;");
90047
90180
 
90048
90181
  src.push("in vec4 modelMatrixCol0;"); // Modeling matrix
90049
90182
  src.push("in vec4 modelMatrixCol1;");
@@ -90064,12 +90197,13 @@ class PointsInstancingSilhouetteRenderer {
90064
90197
  src.push("out float vFragDepth;");
90065
90198
  }
90066
90199
 
90067
- src.push("uniform vec4 color;");
90200
+ src.push("uniform vec4 silhouetteColor;");
90068
90201
 
90069
90202
  if (clipping) {
90070
90203
  src.push("out vec4 vWorldPosition;");
90071
90204
  src.push("out vec4 vFlags2;");
90072
90205
  }
90206
+ src.push("out vec4 vColor;");
90073
90207
 
90074
90208
  src.push("void main(void) {");
90075
90209
 
@@ -90096,6 +90230,7 @@ class PointsInstancingSilhouetteRenderer {
90096
90230
  if (scene.logarithmicDepthBufferEnabled) {
90097
90231
  src.push("vFragDepth = 1.0 + clipPos.w;");
90098
90232
  }
90233
+ src.push("vColor = vec4(float(silhouetteColor.r) / 255.0, float(silhouetteColor.g) / 255.0, float(silhouetteColor.b) / 255.0, float(color.a) / 255.0);");
90099
90234
  src.push("gl_Position = clipPos;");
90100
90235
  if (pointsMaterial.perspectivePoints) {
90101
90236
  src.push("gl_PointSize = (nearPlaneHeight * pointSize) / clipPos.w;");
@@ -90136,7 +90271,7 @@ class PointsInstancingSilhouetteRenderer {
90136
90271
  src.push("uniform vec3 sectionPlaneDir" + i + ";");
90137
90272
  }
90138
90273
  }
90139
- src.push("uniform vec4 color;");
90274
+ src.push("in vec4 vColor;");
90140
90275
  src.push("out vec4 outColor;");
90141
90276
  src.push("void main(void) {");
90142
90277
  if (scene.pointsMaterial.roundPoints) {
@@ -90161,7 +90296,7 @@ class PointsInstancingSilhouetteRenderer {
90161
90296
  if (scene.logarithmicDepthBufferEnabled) {
90162
90297
  src.push("gl_FragDepth = log2( vFragDepth ) * logDepthBufFC * 0.5;");
90163
90298
  }
90164
- src.push("outColor = color;");
90299
+ src.push("outColor = vColor;");
90165
90300
  src.push("}");
90166
90301
  return src;
90167
90302
  }
@@ -90178,7 +90313,7 @@ class PointsInstancingSilhouetteRenderer {
90178
90313
  }
90179
90314
  }
90180
90315
 
90181
- const tempVec3a$d = math.vec3();
90316
+ const tempVec3a$c = math.vec3();
90182
90317
 
90183
90318
  /**
90184
90319
  * @private
@@ -90284,7 +90419,7 @@ class PointsInstancingPickMeshRenderer {
90284
90419
  if (active) {
90285
90420
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90286
90421
  if (origin) {
90287
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$d);
90422
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90288
90423
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90289
90424
  } else {
90290
90425
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90535,7 +90670,7 @@ class PointsInstancingPickMeshRenderer {
90535
90670
  }
90536
90671
  }
90537
90672
 
90538
- const tempVec3a$c = math.vec3();
90673
+ const tempVec3a$b = math.vec3();
90539
90674
 
90540
90675
  /**
90541
90676
  * @private
@@ -90613,7 +90748,7 @@ class PointsInstancingPickDepthRenderer {
90613
90748
  if (active) {
90614
90749
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90615
90750
  if (origin) {
90616
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$c);
90751
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
90617
90752
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90618
90753
  } else {
90619
90754
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -90901,7 +91036,7 @@ class PointsInstancingPickDepthRenderer {
90901
91036
  }
90902
91037
  }
90903
91038
 
90904
- const tempVec3a$b = math.vec3();
91039
+ const tempVec3a$a = math.vec3();
90905
91040
 
90906
91041
  /**
90907
91042
  * @private
@@ -90963,7 +91098,7 @@ class PointsInstancingOcclusionRenderer {
90963
91098
  if (active) {
90964
91099
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
90965
91100
  if (origin) {
90966
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$b);
91101
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
90967
91102
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
90968
91103
  } else {
90969
91104
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91252,7 +91387,7 @@ class PointsInstancingOcclusionRenderer {
91252
91387
  }
91253
91388
  }
91254
91389
 
91255
- const tempVec3a$a = math.vec3();
91390
+ const tempVec3a$9 = math.vec3();
91256
91391
 
91257
91392
  /**
91258
91393
  * @private
@@ -91314,7 +91449,7 @@ class PointsInstancingDepthRenderer {
91314
91449
  if (active) {
91315
91450
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91316
91451
  if (origin) {
91317
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$a);
91452
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91318
91453
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91319
91454
  } else {
91320
91455
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -91598,7 +91733,7 @@ class PointsInstancingDepthRenderer {
91598
91733
  }
91599
91734
  }
91600
91735
 
91601
- const tempVec3a$9 = math.vec3();
91736
+ const tempVec3a$8 = math.vec3();
91602
91737
 
91603
91738
  /**
91604
91739
  * Renders InstancingLayer fragment depths to a shadow map.
@@ -91685,7 +91820,7 @@ class PointsInstancingShadowRenderer {
91685
91820
  if (active) {
91686
91821
  const sectionPlane = sectionPlanes[sectionPlaneIndex];
91687
91822
  if (origin) {
91688
- const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$9);
91823
+ const rtcSectionPlanePos = getPlaneRTCPos(sectionPlane.dist, sectionPlane.dir, origin, tempVec3a$8);
91689
91824
  gl.uniform3fv(sectionPlaneUniforms.pos, rtcSectionPlanePos);
91690
91825
  } else {
91691
91826
  gl.uniform3fv(sectionPlaneUniforms.pos, sectionPlane.pos);
@@ -94026,7 +94161,7 @@ function getKTX2TextureTranscoder(viewer) {
94026
94161
  return transcoder;
94027
94162
  }
94028
94163
 
94029
- const tempVec3a$8 = math.vec3();
94164
+ const tempVec3a$7 = math.vec3();
94030
94165
  const tempMat4$1 = math.mat4();
94031
94166
 
94032
94167
  const defaultScale = math.vec3([1, 1, 1]);
@@ -96407,7 +96542,7 @@ class VBOSceneModel extends Component {
96407
96542
  }
96408
96543
 
96409
96544
  const cfgOrigin = cfg.origin || cfg.rtcCenter;
96410
- const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$8) : this._origin;
96545
+ const origin = (cfgOrigin) ? math.addVec3(this._origin, cfgOrigin, tempVec3a$7) : this._origin;
96411
96546
 
96412
96547
  const instancingLayer = this._getInstancingLayer(origin, textureSetId, geometryId);
96413
96548
 
@@ -96469,7 +96604,7 @@ class VBOSceneModel extends Component {
96469
96604
 
96470
96605
  let indices = cfg.indices;
96471
96606
  let edgeIndices = cfg.edgeIndices;
96472
- let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$8) : this._origin;
96607
+ let origin = (cfg.origin || cfg.rtcCenter) ? math.addVec3(this._origin, cfg.origin || cfg.rtcCenter, tempVec3a$7) : this._origin;
96473
96608
  let positions = cfg.positions;
96474
96609
 
96475
96610
  if (positions) {
@@ -97483,8 +97618,8 @@ class TextureTranscoder {
97483
97618
  const screenPos = math.vec4();
97484
97619
  const viewPos = math.vec4();
97485
97620
 
97486
- const tempVec3a$7 = math.vec3();
97487
- const tempVec3b$4 = math.vec3();
97621
+ const tempVec3a$6 = math.vec3();
97622
+ const tempVec3b$3 = math.vec3();
97488
97623
  const tempVec3c$3 = math.vec3();
97489
97624
 
97490
97625
  const tempVec4a$4 = math.vec4();
@@ -97518,7 +97653,7 @@ class PanController {
97518
97653
  const camera = this._scene.camera;
97519
97654
 
97520
97655
  if (optionalTargetWorldPos) {
97521
- const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97656
+ const eyeToWorldPosVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97522
97657
  const eyeWorldPosDist = math.lenVec3(eyeToWorldPosVec);
97523
97658
  dolliedThroughSurface = (eyeWorldPosDist < dollyDelta);
97524
97659
  }
@@ -97542,9 +97677,9 @@ class PanController {
97542
97677
  // suddenly a lot closer than the point we pivoted about on the surface of the last object
97543
97678
  // that we click-drag-pivoted on.
97544
97679
 
97545
- const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$7);
97680
+ const eyeTargetVec = math.subVec3(optionalTargetWorldPos, camera.eye, tempVec3a$6);
97546
97681
  const lenEyeTargetVec = math.lenVec3(eyeTargetVec);
97547
- const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$4)), lenEyeTargetVec);
97682
+ const eyeLookVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3b$3)), lenEyeTargetVec);
97548
97683
  camera.look = [camera.eye[0] + eyeLookVec[0], camera.eye[1] + eyeLookVec[1], camera.eye[2] + eyeLookVec[2]];
97549
97684
  }
97550
97685
 
@@ -97561,7 +97696,7 @@ class PanController {
97561
97696
 
97562
97697
  const worldPos2 = this._unproject(targetCanvasPos, tempVec4b$4);
97563
97698
  const offset = math.subVec3(worldPos2, worldPos1, tempVec4c$1);
97564
- const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$7)), -dollyDelta, tempVec3b$4);
97699
+ const eyeLookMoveVec = math.mulVec3Scalar(math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6)), -dollyDelta, tempVec3b$3);
97565
97700
  const moveVec = math.addVec3(offset, eyeLookMoveVec, tempVec3c$3);
97566
97701
 
97567
97702
  camera.eye = [camera.eye[0] - moveVec[0], camera.eye[1] - moveVec[1], camera.eye[2] - moveVec[2]];
@@ -97589,8 +97724,8 @@ class PanController {
97589
97724
  }
97590
97725
  }
97591
97726
 
97592
- const tempVec3a$6 = math.vec3();
97593
- const tempVec3b$3 = math.vec3();
97727
+ const tempVec3a$5 = math.vec3();
97728
+ const tempVec3b$2 = math.vec3();
97594
97729
  const tempVec3c$2 = math.vec3();
97595
97730
 
97596
97731
  const tempVec4a$3 = math.vec4();
@@ -97722,8 +97857,8 @@ class PivotController {
97722
97857
 
97723
97858
  _cameraLookingDownwards() { // Returns true if angle between camera viewing direction and World-space "up" axis is too small
97724
97859
  const camera = this._scene.camera;
97725
- const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$6));
97726
- const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$3);
97860
+ const forwardAxis = math.normalizeVec3(math.subVec3(camera.look, camera.eye, tempVec3a$5));
97861
+ const rightAxis = math.cross3Vec3(forwardAxis, camera.worldUp, tempVec3b$2);
97727
97862
  let rightAxisLen = math.sqLenVec3(rightAxis);
97728
97863
  return (rightAxisLen <= 0.0001);
97729
97864
  }
@@ -97763,8 +97898,8 @@ class PivotController {
97763
97898
  const screenZ = math.dotVec4(D, Pt3) / math.dotVec4(D, Pt4);
97764
97899
  const worldPos = tempVec4a$3;
97765
97900
  camera.project.unproject(canvasPos, screenZ, tempVec4b$3, tempVec4c, worldPos);
97766
- const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$6));
97767
- const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$3), tempVec3c$2);
97901
+ const eyeWorldPosVec = math.normalizeVec3(math.subVec3(worldPos, camera.eye, tempVec3a$5));
97902
+ const posOnSphere = math.addVec3(camera.eye, math.mulVec3Scalar(eyeWorldPosVec, pivotShereRadius, tempVec3b$2), tempVec3c$2);
97768
97903
  this.setPivotPos(posOnSphere);
97769
97904
  }
97770
97905
 
@@ -98395,8 +98530,8 @@ class MousePanRotateDollyHandler {
98395
98530
  }
98396
98531
 
98397
98532
  const center = math.vec3();
98398
- const tempVec3a$5 = math.vec3();
98399
- const tempVec3b$2 = math.vec3();
98533
+ const tempVec3a$4 = math.vec3();
98534
+ const tempVec3b$1 = math.vec3();
98400
98535
  const tempVec3c$1 = math.vec3();
98401
98536
  const tempVec3d = math.vec3();
98402
98537
 
@@ -98450,39 +98585,39 @@ class KeyboardAxisViewHandler {
98450
98585
 
98451
98586
  if (axisViewRight) {
98452
98587
 
98453
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$5), tempVec3d));
98588
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, perspectiveDist, tempVec3a$4), tempVec3d));
98454
98589
  tempCameraTarget.look.set(center);
98455
98590
  tempCameraTarget.up.set(camera.worldUp);
98456
98591
 
98457
98592
  } else if (axisViewBack) {
98458
98593
 
98459
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$5), tempVec3d));
98594
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, perspectiveDist, tempVec3a$4), tempVec3d));
98460
98595
  tempCameraTarget.look.set(center);
98461
98596
  tempCameraTarget.up.set(camera.worldUp);
98462
98597
 
98463
98598
  } else if (axisViewLeft) {
98464
98599
 
98465
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$5), tempVec3d));
98600
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldRight, -perspectiveDist, tempVec3a$4), tempVec3d));
98466
98601
  tempCameraTarget.look.set(center);
98467
98602
  tempCameraTarget.up.set(camera.worldUp);
98468
98603
 
98469
98604
  } else if (axisViewFront) {
98470
98605
 
98471
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$5), tempVec3d));
98606
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldForward, -perspectiveDist, tempVec3a$4), tempVec3d));
98472
98607
  tempCameraTarget.look.set(center);
98473
98608
  tempCameraTarget.up.set(camera.worldUp);
98474
98609
 
98475
98610
  } else if (axisViewTop) {
98476
98611
 
98477
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$5), tempVec3d));
98612
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, perspectiveDist, tempVec3a$4), tempVec3d));
98478
98613
  tempCameraTarget.look.set(center);
98479
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$2), tempVec3c$1));
98614
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, 1, tempVec3b$1), tempVec3c$1));
98480
98615
 
98481
98616
  } else if (axisViewBottom) {
98482
98617
 
98483
- tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$5), tempVec3d));
98618
+ tempCameraTarget.eye.set(math.addVec3(center, math.mulVec3Scalar(camera.worldUp, -perspectiveDist, tempVec3a$4), tempVec3d));
98484
98619
  tempCameraTarget.look.set(center);
98485
- tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$2)));
98620
+ tempCameraTarget.up.set(math.normalizeVec3(math.mulVec3Scalar(camera.worldForward, -1, tempVec3b$1)));
98486
98621
  }
98487
98622
 
98488
98623
  if ((!configs.firstPerson) && configs.followPointer) {
@@ -102919,7 +103054,8 @@ class DistanceMeasurementsControl extends Component {
102919
103054
  this._active = false;
102920
103055
 
102921
103056
  // Mouse input uses a combo of events that requires us to track
102922
- // the current DistanceMeasurement under construction. This is not used for touch input.
103057
+ // the current DistanceMeasurement under construction. This is not used for touch input, which
103058
+ // just uses touch-move-release to make a measurement.
102923
103059
  this._currentDistanceMeasurementByMouse = null;
102924
103060
 
102925
103061
  this._currentDistanceMeasurementByMouseInittouchState = {
@@ -103107,6 +103243,7 @@ class DistanceMeasurementsControl extends Component {
103107
103243
 
103108
103244
  this._onPickedNothing = cameraControl.on("pickedNothing", event => {
103109
103245
  if (this._currentDistanceMeasurementByMouse) {
103246
+ this.fire("measurementCancel", this._currentDistanceMeasurementByMouse);
103110
103247
  this._currentDistanceMeasurementByMouse.destroy();
103111
103248
  this._currentDistanceMeasurementByMouse = null;
103112
103249
  }
@@ -103149,7 +103286,7 @@ class DistanceMeasurementsControl extends Component {
103149
103286
  case SECOND_TOUCH_EXPECTED:
103150
103287
  startDot.setVisible(false);
103151
103288
  this._touchStartMarker.worldPos = pickResult.worldPos;
103152
- const measurement = plugin.createMeasurement({
103289
+ const measurement = plugin.createMeasurement({
103153
103290
  id: math.createUUID(),
103154
103291
  origin: {
103155
103292
  entity: mouseHoverEntity,
@@ -103163,6 +103300,7 @@ class DistanceMeasurementsControl extends Component {
103163
103300
  });
103164
103301
  measurement.clickable = true;
103165
103302
  touchState = FIRST_TOUCH_EXPECTED;
103303
+ this.fire("measurementEnd", measurement);
103166
103304
  break;
103167
103305
  }
103168
103306
  } else {
@@ -103204,7 +103342,11 @@ class DistanceMeasurementsControl extends Component {
103204
103342
  canvas.removeEventListener("touchstart", this._onCanvasTouchStart);
103205
103343
  canvas.removeEventListener("touchend", this._onCanvasTouchEnd);
103206
103344
 
103207
- this._currentDistanceMeasurementByMouse = null;
103345
+ if (this._currentDistanceMeasurementByMouse) {
103346
+ this.fire("measurementCancel", this._currentDistanceMeasurementByMouse);
103347
+ this._currentDistanceMeasurementByMouse.destroy();
103348
+ this._currentDistanceMeasurementByMouse = null;
103349
+ }
103208
103350
 
103209
103351
  this._active = false;
103210
103352
  }
@@ -103221,6 +103363,7 @@ class DistanceMeasurementsControl extends Component {
103221
103363
  return;
103222
103364
  }
103223
103365
  if (this._currentDistanceMeasurementByMouse) {
103366
+ this.fire("measurementCancel", this._currentDistanceMeasurementByMouse);
103224
103367
  this._currentDistanceMeasurementByMouse.destroy();
103225
103368
  this._currentDistanceMeasurementByMouse = null;
103226
103369
  }
@@ -113654,7 +113797,7 @@ class NavCubePlugin extends Plugin {
113654
113797
  }
113655
113798
  }
113656
113799
 
113657
- const tempVec3a$4 = math.vec3();
113800
+ const tempVec3a$3 = math.vec3();
113658
113801
 
113659
113802
  /**
113660
113803
  * @private
@@ -114352,7 +114495,7 @@ function createMeshes(modelNode, state) {
114352
114495
  }
114353
114496
  geometryCfg.indices = indices;
114354
114497
 
114355
- const origin = tempVec3a$4;
114498
+ const origin = tempVec3a$3;
114356
114499
 
114357
114500
  worldToRTCPositions(geometry.positions, geometry.positions, origin);
114358
114501
 
@@ -116811,7 +116954,7 @@ class STLDefaultDataSource {
116811
116954
  }
116812
116955
  }
116813
116956
 
116814
- const tempVec3a$3 = math.vec3();
116957
+ const tempVec3a$2 = math.vec3();
116815
116958
 
116816
116959
  /**
116817
116960
  * @private
@@ -117063,7 +117206,7 @@ function addMesh(modelNode, positions, normals, colors, material, options) {
117063
117206
  math.faceToVertexNormals(positions, normals, options);
117064
117207
  }
117065
117208
 
117066
- const origin = tempVec3a$3;
117209
+ const origin = tempVec3a$2;
117067
117210
 
117068
117211
  worldToRTCPositions(positions, positions, origin);
117069
117212
 
@@ -117573,7 +117716,7 @@ class StoreyMap {
117573
117716
  }
117574
117717
  }
117575
117718
 
117576
- const tempVec3a$2 = math.vec3();
117719
+ const tempVec3a$1 = math.vec3();
117577
117720
  const tempMat4 = math.mat4();
117578
117721
 
117579
117722
  const EMPTY_IMAGE = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==";
@@ -117993,7 +118136,7 @@ class StoreyViewsPlugin extends Plugin {
117993
118136
 
117994
118137
  const orthoScale2 = diag * 1.3;
117995
118138
 
117996
- const eye2 = tempVec3a$2;
118139
+ const eye2 = tempVec3a$1;
117997
118140
 
117998
118141
  eye2[0] = look2[0] + (camera.worldUp[0] * sca);
117999
118142
  eye2[1] = look2[1] + (camera.worldUp[1] * sca);
@@ -118204,7 +118347,7 @@ class StoreyViewsPlugin extends Plugin {
118204
118347
  const aabb = storey.aabb;
118205
118348
  const look = math.getAABB3Center(aabb);
118206
118349
  const sca = 0.5;
118207
- const eye = tempVec3a$2;
118350
+ const eye = tempVec3a$1;
118208
118351
  eye[0] = look[0] + (camera.worldUp[0] * sca);
118209
118352
  eye[1] = look[1] + (camera.worldUp[1] * sca);
118210
118353
  eye[2] = look[2] + (camera.worldUp[2] * sca);
@@ -118260,7 +118403,7 @@ class StoreyViewsPlugin extends Plugin {
118260
118403
 
118261
118404
  const origin = math.vec3([xmin + (xWorldSize * normX), ymin + (yWorldSize * 0.5), zmin + (zWorldSize * normZ)]);
118262
118405
  const direction = math.vec3([0, -1, 0]);
118263
- const look = math.addVec3(origin, direction, tempVec3a$2);
118406
+ const look = math.addVec3(origin, direction, tempVec3a$1);
118264
118407
  const worldForward = this.viewer.camera.worldForward;
118265
118408
  const matrix = math.lookAtMat4v(origin, look, worldForward, tempMat4);
118266
118409
 
@@ -118358,7 +118501,7 @@ class StoreyViewsPlugin extends Plugin {
118358
118501
  const camera = this.viewer.camera;
118359
118502
  const eye = camera.eye;
118360
118503
  const look = camera.look;
118361
- const eyeLookDir = math.subVec3(look, eye, tempVec3a$2);
118504
+ const eyeLookDir = math.subVec3(look, eye, tempVec3a$1);
118362
118505
  const worldUp = camera.worldUp;
118363
118506
  const xUp = worldUp[0] > worldUp[1] && worldUp[0] > worldUp[2];
118364
118507
  const yUp = !xUp && worldUp[1] > worldUp[0] && worldUp[1] > worldUp[2];
@@ -119786,116 +119929,6 @@ class TreeViewPlugin extends Plugin {
119786
119929
  }
119787
119930
  }
119788
119931
 
119789
- const tempVec3a$1 = math.vec3();
119790
- const tempVec3b$1 = math.vec3();
119791
- const tempMat4a = math.mat4();
119792
-
119793
- /**
119794
- * @private
119795
- */
119796
- class FrustumPlane {
119797
-
119798
- constructor() {
119799
- this.normal = math.vec3();
119800
- this.offset = 0;
119801
- this.testVertex = math.vec3();
119802
- }
119803
-
119804
- set(nx, ny, nz, offset) {
119805
- const s = 1.0 / Math.sqrt(nx * nx + ny * ny + nz * nz);
119806
- this.normal[0] = nx * s;
119807
- this.normal[1] = ny * s;
119808
- this.normal[2] = nz * s;
119809
- this.offset = offset * s;
119810
- this.testVertex[0] = (this.normal[0] >= 0.0) ? 1 : 0;
119811
- this.testVertex[1] = (this.normal[1] >= 0.0) ? 1 : 0;
119812
- this.testVertex[2] = (this.normal[2] >= 0.0) ? 1 : 0;
119813
- }
119814
- }
119815
-
119816
- /**
119817
- * @private
119818
- */
119819
- class Frustum {
119820
- constructor() {
119821
- this.planes = [
119822
- new FrustumPlane(), new FrustumPlane(), new FrustumPlane(),
119823
- new FrustumPlane(), new FrustumPlane(), new FrustumPlane()
119824
- ];
119825
- }
119826
- }
119827
-
119828
- Frustum.INSIDE = 0;
119829
- Frustum.INTERSECT = 1;
119830
- Frustum.OUTSIDE = 2;
119831
-
119832
- /** @private */
119833
- function setFrustum(frustum, viewMat, projMat) {
119834
-
119835
- const m = math.mulMat4(projMat, viewMat, tempMat4a);
119836
-
119837
- const m0 = m[0];
119838
- const m1 = m[1];
119839
- const m2 = m[2];
119840
- const m3 = m[3];
119841
- const m4 = m[4];
119842
- const m5 = m[5];
119843
- const m6 = m[6];
119844
- const m7 = m[7];
119845
- const m8 = m[8];
119846
- const m9 = m[9];
119847
- const m10 = m[10];
119848
- const m11 = m[11];
119849
- const m12 = m[12];
119850
- const m13 = m[13];
119851
- const m14 = m[14];
119852
- const m15 = m[15];
119853
-
119854
- frustum.planes[0].set(m3 - m0, m7 - m4, m11 - m8, m15 - m12);
119855
- frustum.planes[1].set(m3 + m0, m7 + m4, m11 + m8, m15 + m12);
119856
- frustum.planes[2].set(m3 - m1, m7 - m5, m11 - m9, m15 - m13);
119857
- frustum.planes[3].set(m3 + m1, m7 + m5, m11 + m9, m15 + m13);
119858
- frustum.planes[4].set(m3 - m2, m7 - m6, m11 - m10, m15 - m14);
119859
- frustum.planes[5].set(m3 + m2, m7 + m6, m11 + m10, m15 + m14);
119860
- }
119861
-
119862
- /** @private */
119863
- function frustumIntersectsAABB3(frustum, aabb) {
119864
-
119865
- let ret = Frustum.INSIDE;
119866
-
119867
- const min = tempVec3a$1;
119868
- const max = tempVec3b$1;
119869
-
119870
- min[0] = aabb[0];
119871
- min[1] = aabb[1];
119872
- min[2] = aabb[2];
119873
- max[0] = aabb[3];
119874
- max[1] = aabb[4];
119875
- max[2] = aabb[5];
119876
-
119877
- const bminmax = [min, max];
119878
-
119879
- for (let i = 0; i < 6; ++i) {
119880
- const plane = frustum.planes[i];
119881
- if (((plane.normal[0] * bminmax[plane.testVertex[0]][0]) +
119882
- (plane.normal[1] * bminmax[plane.testVertex[1]][1]) +
119883
- (plane.normal[2] * bminmax[plane.testVertex[2]][2]) +
119884
- (plane.offset)) < 0.0) {
119885
- return Frustum.OUTSIDE;
119886
- }
119887
-
119888
- if (((plane.normal[0] * bminmax[1 - plane.testVertex[0]][0]) +
119889
- (plane.normal[1] * bminmax[1 - plane.testVertex[1]][1]) +
119890
- (plane.normal[2] * bminmax[1 - plane.testVertex[2]][2]) +
119891
- (plane.offset)) < 0.0) {
119892
- ret = Frustum.INTERSECT;
119893
- }
119894
- }
119895
-
119896
- return ret;
119897
- }
119898
-
119899
119932
  /**
119900
119933
  * For each Entity in its Scene, efficiently combines updates from multiple culling systems into a single "culled" state.
119901
119934
  *
@@ -181183,4 +181216,4 @@ class CityJSONLoaderPlugin extends Plugin {
181183
181216
  }
181184
181217
  }
181185
181218
 
181186
- export { AlphaFormat, AmbientLight, AngleMeasurementsPlugin, AnnotationsPlugin, AxisGizmoPlugin, BCFViewpointsPlugin, Bitmap, ByteType, CameraMemento, CameraPath, CameraPathAnimation, CityJSONLoaderPlugin, ClampToEdgeWrapping, Component, CompressedMediaType, Configs, ContextMenu, CubicBezierCurve, Curve, DataTextureSceneModel, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DirLight, DistanceMeasurementsPlugin, EdgeMaterial, EmphasisMaterial, FastNavPlugin, FloatType, Fresnel, GIFMediaType, GLTFDefaultDataSource, GLTFLoaderPlugin, HalfFloatType, ImagePlane, IntType, JPEGMediaType, KTX2TextureTranscoder, LASLoaderPlugin, LambertMaterial, LightMap, LineSet, LinearEncoding, LinearFilter, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, Loader, LoadingManager, LocaleService, LuminanceAlphaFormat, LuminanceFormat, Map$1 as Map, Marker, Mesh, MetallicMaterial, MirroredRepeatWrapping, ModelMemento, NavCubePlugin, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, Node$1 as Node, OBJLoaderPlugin, ObjectsMemento, PNGMediaType, Path, PerformanceModel, PhongMaterial, Plugin, PointLight, QuadraticBezierCurve, Queue, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, ReadableGeometry, RedFormat, RedIntegerFormat, ReflectionMap, RepeatWrapping, STLDefaultDataSource, STLLoaderPlugin, SceneModel, SectionPlane, SectionPlanesPlugin, ShortType, Skybox, SkyboxesPlugin, SpecularMaterial, SplineCurve, SpriteMarker, StoreyViewsPlugin, Texture, TextureTranscoder, TreeViewPlugin, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VBOGeometry, VBOSceneModel, ViewCullPlugin, Viewer, WebIFCLoaderPlugin, WorkerPool$1 as WorkerPool, XKTDefaultDataSource, XKTLoaderPlugin, XML3DLoaderPlugin, buildBoxGeometry, buildBoxLinesGeometry, buildCylinderGeometry, buildGridGeometry, buildPlaneGeometry, buildSphereGeometry, buildTorusGeometry, buildVectorTextGeometry, getKTX2TextureTranscoder, load3DSGeometry, loadOBJGeometry, math, sRGBEncoding, stats, utils };
181219
+ export { AlphaFormat, AmbientLight, AngleMeasurementsPlugin, AnnotationsPlugin, AxisGizmoPlugin, BCFViewpointsPlugin, Bitmap, ByteType, CameraMemento, CameraPath, CameraPathAnimation, CityJSONLoaderPlugin, ClampToEdgeWrapping, Component, CompressedMediaType, Configs, ContextMenu, CubicBezierCurve, Curve, DataTextureSceneModel, DefaultLoadingManager, DepthFormat, DepthStencilFormat, DirLight, DistanceMeasurementsPlugin, EdgeMaterial, EmphasisMaterial, FastNavPlugin, FloatType, Fresnel, Frustum, FrustumPlane, GIFMediaType, GLTFDefaultDataSource, GLTFLoaderPlugin, HalfFloatType, ImagePlane, IntType, JPEGMediaType, KTX2TextureTranscoder, LASLoaderPlugin, LambertMaterial, LightMap, LineSet, LinearEncoding, LinearFilter, LinearMipMapLinearFilter, LinearMipMapNearestFilter, LinearMipmapLinearFilter, LinearMipmapNearestFilter, Loader, LoadingManager, LocaleService, LuminanceAlphaFormat, LuminanceFormat, Map$1 as Map, Marker, Mesh, MetallicMaterial, MirroredRepeatWrapping, ModelMemento, NavCubePlugin, NearestFilter, NearestMipMapLinearFilter, NearestMipMapNearestFilter, NearestMipmapLinearFilter, NearestMipmapNearestFilter, Node$1 as Node, OBJLoaderPlugin, ObjectsMemento, PNGMediaType, Path, PerformanceModel, PhongMaterial, Plugin, PointLight, QuadraticBezierCurve, Queue, RGBAFormat, RGBAIntegerFormat, RGBA_ASTC_10x10_Format, RGBA_ASTC_10x5_Format, RGBA_ASTC_10x6_Format, RGBA_ASTC_10x8_Format, RGBA_ASTC_12x10_Format, RGBA_ASTC_12x12_Format, RGBA_ASTC_4x4_Format, RGBA_ASTC_5x4_Format, RGBA_ASTC_5x5_Format, RGBA_ASTC_6x5_Format, RGBA_ASTC_6x6_Format, RGBA_ASTC_8x5_Format, RGBA_ASTC_8x6_Format, RGBA_ASTC_8x8_Format, RGBA_BPTC_Format, RGBA_ETC2_EAC_Format, RGBA_PVRTC_2BPPV1_Format, RGBA_PVRTC_4BPPV1_Format, RGBA_S3TC_DXT1_Format, RGBA_S3TC_DXT3_Format, RGBA_S3TC_DXT5_Format, RGBFormat, RGB_ETC1_Format, RGB_ETC2_Format, RGB_PVRTC_2BPPV1_Format, RGB_PVRTC_4BPPV1_Format, RGB_S3TC_DXT1_Format, RGFormat, RGIntegerFormat, ReadableGeometry, RedFormat, RedIntegerFormat, ReflectionMap, RepeatWrapping, STLDefaultDataSource, STLLoaderPlugin, SceneModel, SectionPlane, SectionPlanesPlugin, ShortType, Skybox, SkyboxesPlugin, SpecularMaterial, SplineCurve, SpriteMarker, StoreyViewsPlugin, Texture, TextureTranscoder, TreeViewPlugin, UnsignedByteType, UnsignedInt248Type, UnsignedIntType, UnsignedShort4444Type, UnsignedShort5551Type, UnsignedShortType, VBOGeometry, VBOSceneModel, ViewCullPlugin, Viewer, WebIFCLoaderPlugin, WorkerPool$1 as WorkerPool, XKTDefaultDataSource, XKTLoaderPlugin, XML3DLoaderPlugin, buildBoxGeometry, buildBoxLinesGeometry, buildCylinderGeometry, buildGridGeometry, buildPlaneGeometry, buildSphereGeometry, buildTorusGeometry, buildVectorTextGeometry, frustumIntersectsAABB3, getKTX2TextureTranscoder, load3DSGeometry, loadOBJGeometry, math, sRGBEncoding, setFrustum, stats, utils };