three-cad-viewer 5.1.1 → 5.1.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.
@@ -226,7 +226,7 @@ declare class Viewer {
226
226
  /** True while the Studio (presentation) tab owns the render. PickHost member. */
227
227
  get studioActive(): boolean;
228
228
  zScale: number;
229
- /** Whether the attached animation has moved parts (Play pressed or time slider moved). */
229
+ /** Whether the attached animation has moved parts (Play or time slider, not stopped since). */
230
230
  private _animationStarted;
231
231
  clipNormal0: Vector3Tuple | null;
232
232
  clipNormal1: Vector3Tuple | null;
@@ -592,8 +592,9 @@ declare class Viewer {
592
592
  * Copy the world-space point under the cursor as `"x, y, z"` to the clipboard and
593
593
  * send it to the host as a `copiedPoint` notification (for hosts that block the
594
594
  * browser clipboard). Does nothing while parts may be displaced from their model
595
- * positions — explode mode, an animation once started (Play or time slider), a
596
- * z-scale other than 1 — or when no visible component is under the cursor.
595
+ * positions — explode mode, an animation that was played or scrubbed and not
596
+ * stopped since (Stop puts the parts back), a z-scale other than 1 — or when no
597
+ * visible component is under the cursor.
597
598
  * @returns true when a point was copied (the caller then consumes the key event).
598
599
  */
599
600
  copyPointUnderCursor(): boolean;
@@ -97848,7 +97848,7 @@ class Tools {
97848
97848
  }
97849
97849
  }
97850
97850
 
97851
- const version = "5.1.1";
97851
+ const version = "5.1.2";
97852
97852
 
97853
97853
  /**
97854
97854
  * `PickedComponent` over a GPU id-pick result. Drives the shader
@@ -109471,7 +109471,7 @@ class Viewer {
109471
109471
  this._capOutlineCamera = [];
109472
109472
  /** Pending redraw that adds the outline once the camera has settled. */
109473
109473
  this._capOutlineSettle = null;
109474
- /** Whether the attached animation has moved parts (Play pressed or time slider moved). */
109474
+ /** Whether the attached animation has moved parts (Play or time slider, not stopped since). */
109475
109475
  this._animationStarted = false;
109476
109476
  // ---------------------------------------------------------------------------
109477
109477
  // Render Loop & Scene Updates
@@ -109888,6 +109888,10 @@ class Viewer {
109888
109888
  break;
109889
109889
  case "stop":
109890
109890
  this.clipAction.stop();
109891
+ // stop() restores the parts' original transforms (three.js
109892
+ // AnimationMixer._deactivateAction -> restoreOriginalState), so they are
109893
+ // at their model positions again and points can be copied.
109894
+ this._animationStarted = false;
109891
109895
  this._setAnimationPlaying(false);
109892
109896
  break;
109893
109897
  }
@@ -112011,8 +112015,9 @@ class Viewer {
112011
112015
  * Copy the world-space point under the cursor as `"x, y, z"` to the clipboard and
112012
112016
  * send it to the host as a `copiedPoint` notification (for hosts that block the
112013
112017
  * browser clipboard). Does nothing while parts may be displaced from their model
112014
- * positions — explode mode, an animation once started (Play or time slider), a
112015
- * z-scale other than 1 — or when no visible component is under the cursor.
112018
+ * positions — explode mode, an animation that was played or scrubbed and not
112019
+ * stopped since (Stop puts the parts back), a z-scale other than 1 — or when no
112020
+ * visible component is under the cursor.
112016
112021
  * @returns true when a point was copied (the caller then consumes the key event).
112017
112022
  */
112018
112023
  copyPointUnderCursor() {