viral-viewer-2 2.8.1 → 2.8.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.
@@ -75475,23 +75475,27 @@ function workerFunction() {
75475
75475
  }
75476
75476
  return new BufferAttribute(array, itemSize, normalized);
75477
75477
  }
75478
+ const _v0 = /*@__PURE__*/ new Vector3();
75479
+ const _v1 = /*@__PURE__*/ new Vector3();
75480
+ const _normal = /*@__PURE__*/ new Vector3();
75481
+ const _triangle = /*@__PURE__*/ new Triangle();
75478
75482
  class EdgesGeometry extends BufferGeometry {
75479
75483
  constructor(geometry = null, thresholdAngle = 1) {
75480
75484
  super();
75481
- this.type = 'EdgesGeometry';
75485
+ this.type = "EdgesGeometry";
75482
75486
  this.parameters = {
75483
75487
  geometry: geometry,
75484
- thresholdAngle: thresholdAngle
75488
+ thresholdAngle: thresholdAngle,
75485
75489
  };
75486
75490
  if (geometry !== null) {
75487
75491
  const precisionPoints = 4;
75488
75492
  const precision = Math.pow(10, precisionPoints);
75489
- const thresholdDot = Math.cos(MathUtils.DEG2RAD * thresholdAngle);
75493
+ const thresholdDot = Math.cos(DEG2RAD * thresholdAngle);
75490
75494
  const indexAttr = geometry.getIndex();
75491
- const positionAttr = geometry.getAttribute('position');
75495
+ const positionAttr = geometry.getAttribute("position");
75492
75496
  const indexCount = indexAttr ? indexAttr.count : positionAttr.count;
75493
75497
  const indexArr = [0, 0, 0];
75494
- const vertKeys = ['a', 'b', 'c'];
75498
+ const vertKeys = ["a", "b", "c"];
75495
75499
  const hashes = new Array(3);
75496
75500
  const edgeData = {};
75497
75501
  const vertices = [];
@@ -75516,7 +75520,9 @@ function workerFunction() {
75516
75520
  hashes[1] = `${Math.round(b.x * precision)},${Math.round(b.y * precision)},${Math.round(b.z * precision)}`;
75517
75521
  hashes[2] = `${Math.round(c.x * precision)},${Math.round(c.y * precision)},${Math.round(c.z * precision)}`;
75518
75522
  // skip degenerate triangles
75519
- if (hashes[0] === hashes[1] || hashes[1] === hashes[2] || hashes[2] === hashes[0]) {
75523
+ if (hashes[0] === hashes[1] ||
75524
+ hashes[1] === hashes[2] ||
75525
+ hashes[2] === hashes[0]) {
75520
75526
  continue;
75521
75527
  }
75522
75528
  // iterate over every edge
@@ -75558,7 +75564,7 @@ function workerFunction() {
75558
75564
  vertices.push(_v1.x, _v1.y, _v1.z);
75559
75565
  }
75560
75566
  }
75561
- this.setAttribute('position', new Float32BufferAttribute(vertices, 3));
75567
+ this.setAttribute("position", new Float32BufferAttribute(vertices, 3));
75562
75568
  }
75563
75569
  }
75564
75570
  copy(source) {