three-cad-viewer 5.0.0 → 5.0.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.
@@ -87612,11 +87612,14 @@ float metalnessFactor = metalness;
87612
87612
  // widen + recolor the flagged segment in-shader (Option A).
87613
87613
  this.highlight?.patchEdgeMaterial(edges.material);
87614
87614
  // Internal measurement backend: record the standalone edge node's geometry
87615
- // (obj_vertices lets the hover status resolve a picked corner's coords).
87615
+ // (obj_vertices lets the hover status resolve a picked corner's coords,
87616
+ // edge_types the exact curve type — without it every edge reads as "other"
87617
+ // and a circle/arc loses its center + radius readout).
87616
87618
  this.meshGeometry.register(path, {
87617
87619
  edges: edgeData.edges,
87618
87620
  segments_per_edge: edgeData.segments_per_edge,
87619
87621
  obj_vertices: edgeData.obj_vertices,
87622
+ edge_types: edgeData.edge_types,
87620
87623
  }, group, null);
87621
87624
  }
87622
87625
  group.setEdges(edges);
@@ -95348,6 +95351,14 @@ float metalnessFactor = metalness;
95348
95351
  _quaternion.setFromAxisAngle(_axis, finalAngle);
95349
95352
  // Apply rotation via premultiplication (world-space rotation)
95350
95353
  this.object.quaternion.premultiply(_quaternion);
95354
+ // Renormalize: holroyd mode skips the lookAt() that renormalizes stock
95355
+ // TrackballControls every frame, so the accumulated premultiply()s would
95356
+ // otherwise let the quaternion norm drift below 1. A sub-unit quaternion
95357
+ // makes line above's `_axis.applyQuaternion(this.object.quaternion)` scale
95358
+ // the axis by |q|^2 < 1, which shrinks the norm further next frame — a
95359
+ // positive-feedback loop that, after enough dragging, erupts into ~180deg
95360
+ // single-frame view flips. One normalize() per rotation keeps it unit.
95361
+ this.object.quaternion.normalize();
95351
95362
  this._eye.applyQuaternion(_quaternion);
95352
95363
  }
95353
95364
  // Update start to end for next frame
@@ -97306,7 +97317,7 @@ float metalnessFactor = metalness;
97306
97317
  }
97307
97318
  }
97308
97319
 
97309
- const version = "5.0.0";
97320
+ const version = "5.0.2";
97310
97321
 
97311
97322
  /**
97312
97323
  * `PickedComponent` over a GPU id-pick result. Drives the shader