three-cad-viewer 5.0.0 → 5.0.1

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.
@@ -95348,6 +95348,14 @@ float metalnessFactor = metalness;
95348
95348
  _quaternion.setFromAxisAngle(_axis, finalAngle);
95349
95349
  // Apply rotation via premultiplication (world-space rotation)
95350
95350
  this.object.quaternion.premultiply(_quaternion);
95351
+ // Renormalize: holroyd mode skips the lookAt() that renormalizes stock
95352
+ // TrackballControls every frame, so the accumulated premultiply()s would
95353
+ // otherwise let the quaternion norm drift below 1. A sub-unit quaternion
95354
+ // makes line above's `_axis.applyQuaternion(this.object.quaternion)` scale
95355
+ // the axis by |q|^2 < 1, which shrinks the norm further next frame — a
95356
+ // positive-feedback loop that, after enough dragging, erupts into ~180deg
95357
+ // single-frame view flips. One normalize() per rotation keeps it unit.
95358
+ this.object.quaternion.normalize();
95351
95359
  this._eye.applyQuaternion(_quaternion);
95352
95360
  }
95353
95361
  // Update start to end for next frame
@@ -97306,7 +97314,7 @@ float metalnessFactor = metalness;
97306
97314
  }
97307
97315
  }
97308
97316
 
97309
- const version = "5.0.0";
97317
+ const version = "5.0.1";
97310
97318
 
97311
97319
  /**
97312
97320
  * `PickedComponent` over a GPU id-pick result. Drives the shader