three-cad-viewer 1.7.11 → 1.7.12

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.
@@ -57740,18 +57740,24 @@ class Camera {
57740
57740
  const aspect = width / height;
57741
57741
  const pSize = this.projectSize(distance, aspect);
57742
57742
 
57743
- this.oCamera.left = -pSize[0];
57744
- this.oCamera.right = pSize[0];
57745
- this.oCamera.top = pSize[1];
57746
- this.oCamera.bottom = -pSize[1];
57747
-
57748
- this.pCamera.aspect = aspect;
57743
+ if (this.oCamera){
57744
+ this.oCamera.left = -pSize[0];
57745
+ this.oCamera.right = pSize[0];
57746
+ this.oCamera.top = pSize[1];
57747
+ this.oCamera.bottom = -pSize[1];
57748
+ }
57749
57749
 
57750
- this.camera.updateProjectionMatrix();
57750
+ if (this.pCamera){
57751
+ this.pCamera.aspect = aspect;
57752
+ }
57753
+
57754
+ if (this.camera) {
57755
+ this.camera.updateProjectionMatrix();
57756
+ }
57751
57757
  }
57752
57758
  }
57753
57759
 
57754
- const version="1.7.11";
57760
+ const version="1.7.12";
57755
57761
 
57756
57762
  class Viewer {
57757
57763
  /**
@@ -58197,17 +58203,17 @@ class Viewer {
58197
58203
  if (this.animation) {
58198
58204
  this.animation.update();
58199
58205
  }
58200
- }
58201
-
58202
- this.checkChanges(
58203
- {
58204
- zoom: this.camera.getZoom(),
58205
- position: this.camera.getPosition().toArray(),
58206
- quaternion: this.camera.getQuaternion().toArray(),
58207
- target: this.controls.getTarget().toArray(),
58208
- },
58209
- notify,
58210
- );
58206
+
58207
+ this.checkChanges(
58208
+ {
58209
+ zoom: this.camera.getZoom(),
58210
+ position: this.camera.getPosition().toArray(),
58211
+ quaternion: this.camera.getQuaternion().toArray(),
58212
+ target: this.controls.getTarget().toArray(),
58213
+ },
58214
+ notify,
58215
+ );
58216
+ }
58211
58217
  };
58212
58218
 
58213
58219
  /**
@@ -58323,6 +58329,7 @@ class Viewer {
58323
58329
 
58324
58330
  // dispose scene
58325
58331
  this.scene = null;
58332
+ this.ready = false;
58326
58333
  }
58327
58334
  }
58328
58335