three-cad-viewer 1.3.1 → 1.3.2

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.
@@ -53404,7 +53404,10 @@ class NestedGroup {
53404
53404
  }
53405
53405
 
53406
53406
  _renderEdges(edgeList, lineWidth, color, state) {
53407
- var positions = new Float32Array(edgeList.flat().flat());
53407
+ var positions =
53408
+ edgeList instanceof Float32Array
53409
+ ? edgeList
53410
+ : new Float32Array(edgeList.flat(2));
53408
53411
 
53409
53412
  const lineGeometry = new LineSegmentsGeometry();
53410
53413
  lineGeometry.setPositions(positions);
@@ -53423,8 +53426,7 @@ class NestedGroup {
53423
53426
  new Color(c).toArray(),
53424
53427
  new Color(c).toArray(),
53425
53428
  ])
53426
- .flat()
53427
- .flat();
53429
+ .flat(2);
53428
53430
  lineGeometry.setColors(colors);
53429
53431
  lineMaterial.vertexColors = "VertexColors";
53430
53432
  } else {
@@ -53464,7 +53466,11 @@ class NestedGroup {
53464
53466
 
53465
53467
  const vertex_color = color == null ? this.edgeColor : color;
53466
53468
 
53467
- const positions = new Float32Array(vertexList.flat(2));
53469
+ const positions =
53470
+ vertexList instanceof Float32Array
53471
+ ? vertexList
53472
+ : new Float32Array(vertexList.flat());
53473
+
53468
53474
  const geometry = new BufferGeometry();
53469
53475
  geometry.setAttribute(
53470
53476
  "position",
@@ -53601,7 +53607,7 @@ class NestedGroup {
53601
53607
  mesh = this.renderShape(
53602
53608
  shape.shape,
53603
53609
  shape.color,
53604
- (shape.renderback == null)? false:shape.renderback,
53610
+ shape.renderback == null ? false : shape.renderback,
53605
53611
  shape.name,
53606
53612
  states[shape.id],
53607
53613
  );