viral-viewer-2 3.0.6 → 3.0.8

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.
@@ -33774,7 +33774,7 @@ function workerFunction() {
33774
33774
  let nextVertex;
33775
33775
  let z = count;
33776
33776
  if (count > vertices.length) {
33777
- z = length;
33777
+ z = vertices.length;
33778
33778
  }
33779
33779
  while (z--) {
33780
33780
  nextVertex = minimumCostEdge(vertices);
@@ -34105,7 +34105,7 @@ function workerFunction() {
34105
34105
  let geometry = new BufferGeometry();
34106
34106
  // In case number of polygon larger than expect, merge them to reduce polygon first, for optimize purpose
34107
34107
  if (dummyGeometry.attributes.position.count > maxPolygonPerObject) {
34108
- const modifier = new SimplifyModifier();
34108
+ let modifier = new SimplifyModifier();
34109
34109
  const ratio = maxPolygonPerObject / dummyGeometry.attributes.position.count;
34110
34110
  const count = Math.floor(dummyGeometry.attributes.position.count * ratio); // number of polygon to remove
34111
34111
  geometry = modifier.modify(dummyGeometry, count);