three-cad-viewer 1.8.4 → 1.8.5

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.
@@ -58727,7 +58727,7 @@ class Camera {
58727
58727
  }
58728
58728
  }
58729
58729
 
58730
- const version="1.8.4";
58730
+ const version="1.8.5";
58731
58731
 
58732
58732
  class Viewer {
58733
58733
  /**
@@ -59501,8 +59501,8 @@ class Viewer {
59501
59501
 
59502
59502
  const theme =
59503
59503
  this.theme === "dark" ||
59504
- (this.theme === "browser" &&
59505
- window.matchMedia("(prefers-color-scheme: dark)").matches)
59504
+ (this.theme === "browser" &&
59505
+ window.matchMedia("(prefers-color-scheme: dark)").matches)
59506
59506
  ? "dark"
59507
59507
  : "light";
59508
59508
 
@@ -59618,6 +59618,7 @@ class Viewer {
59618
59618
  * @param {boolean} [notify=true] - whether to send notification or not.
59619
59619
  */
59620
59620
  presetCamera = (dir, zoom = null, notify = true) => {
59621
+ this.camera.target = new Vector3(...this.bbox.center());
59621
59622
  this.camera.presetCamera(dir, zoom, notify);
59622
59623
  this.controls.setTarget(this.camera.target);
59623
59624
  this.update(true, notify);
@@ -60726,6 +60727,14 @@ class Viewer {
60726
60727
  // update the this
60727
60728
  this.update(true);
60728
60729
  }
60730
+
60731
+ vector3(x = 0, y = 0, z = 0) {
60732
+ return new Vector3(x, y, z);
60733
+ }
60734
+
60735
+ quaternion(x = 0, y = 0, z = 0, w = 1) {
60736
+ return new Quaternion(x, y, z, w);
60737
+ }
60729
60738
  }
60730
60739
 
60731
60740
  export { Display, Timer, Viewer };