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.
|
@@ -95342,6 +95342,14 @@ class CADTrackballControls extends TrackballControls {
|
|
|
95342
95342
|
_quaternion.setFromAxisAngle(_axis, finalAngle);
|
|
95343
95343
|
// Apply rotation via premultiplication (world-space rotation)
|
|
95344
95344
|
this.object.quaternion.premultiply(_quaternion);
|
|
95345
|
+
// Renormalize: holroyd mode skips the lookAt() that renormalizes stock
|
|
95346
|
+
// TrackballControls every frame, so the accumulated premultiply()s would
|
|
95347
|
+
// otherwise let the quaternion norm drift below 1. A sub-unit quaternion
|
|
95348
|
+
// makes line above's `_axis.applyQuaternion(this.object.quaternion)` scale
|
|
95349
|
+
// the axis by |q|^2 < 1, which shrinks the norm further next frame — a
|
|
95350
|
+
// positive-feedback loop that, after enough dragging, erupts into ~180deg
|
|
95351
|
+
// single-frame view flips. One normalize() per rotation keeps it unit.
|
|
95352
|
+
this.object.quaternion.normalize();
|
|
95345
95353
|
this._eye.applyQuaternion(_quaternion);
|
|
95346
95354
|
}
|
|
95347
95355
|
// Update start to end for next frame
|
|
@@ -97300,7 +97308,7 @@ class Tools {
|
|
|
97300
97308
|
}
|
|
97301
97309
|
}
|
|
97302
97310
|
|
|
97303
|
-
const version = "5.0.
|
|
97311
|
+
const version = "5.0.1";
|
|
97304
97312
|
|
|
97305
97313
|
/**
|
|
97306
97314
|
* `PickedComponent` over a GPU id-pick result. Drives the shader
|