three-cad-viewer 1.7.10 → 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.
- package/dist/three-cad-viewer.esm.js +43 -23
- package/dist/three-cad-viewer.esm.min.js +1 -1
- package/dist/three-cad-viewer.js +43 -23
- package/dist/three-cad-viewer.min.js +1 -1
- package/package.json +1 -1
- package/src/_version.js +1 -1
- package/src/camera.js +13 -7
- package/src/display.js +8 -4
- package/src/viewer.js +21 -11
|
@@ -52004,12 +52004,16 @@ class Display {
|
|
|
52004
52004
|
setExplode = (e) => {
|
|
52005
52005
|
const flag = !!e.target.checked;
|
|
52006
52006
|
if (flag) {
|
|
52007
|
-
this.viewer.
|
|
52007
|
+
if (this.viewer.hasAnimation()) {
|
|
52008
|
+
this.viewer.backupAnimation();
|
|
52009
|
+
}
|
|
52008
52010
|
this.viewer.explode();
|
|
52009
52011
|
} else {
|
|
52010
|
-
this.
|
|
52011
|
-
|
|
52012
|
-
|
|
52012
|
+
if (this.viewer.hasAnimation()) {
|
|
52013
|
+
this.controlAnimationByName("stop");
|
|
52014
|
+
this.viewer.clearAnimation();
|
|
52015
|
+
this.viewer.restoreAnimation();
|
|
52016
|
+
}
|
|
52013
52017
|
}
|
|
52014
52018
|
};
|
|
52015
52019
|
|
|
@@ -57736,18 +57740,24 @@ class Camera {
|
|
|
57736
57740
|
const aspect = width / height;
|
|
57737
57741
|
const pSize = this.projectSize(distance, aspect);
|
|
57738
57742
|
|
|
57739
|
-
this.oCamera
|
|
57740
|
-
|
|
57741
|
-
|
|
57742
|
-
|
|
57743
|
-
|
|
57744
|
-
|
|
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
|
+
}
|
|
57745
57749
|
|
|
57746
|
-
this.
|
|
57750
|
+
if (this.pCamera){
|
|
57751
|
+
this.pCamera.aspect = aspect;
|
|
57752
|
+
}
|
|
57753
|
+
|
|
57754
|
+
if (this.camera) {
|
|
57755
|
+
this.camera.updateProjectionMatrix();
|
|
57756
|
+
}
|
|
57747
57757
|
}
|
|
57748
57758
|
}
|
|
57749
57759
|
|
|
57750
|
-
const version="1.7.
|
|
57760
|
+
const version="1.7.12";
|
|
57751
57761
|
|
|
57752
57762
|
class Viewer {
|
|
57753
57763
|
/**
|
|
@@ -58096,6 +58106,15 @@ class Viewer {
|
|
|
58096
58106
|
this.display.resetAnimationSlider();
|
|
58097
58107
|
}
|
|
58098
58108
|
|
|
58109
|
+
|
|
58110
|
+
/**
|
|
58111
|
+
* Check whether animation object exists
|
|
58112
|
+
*/
|
|
58113
|
+
hasAnimation() {
|
|
58114
|
+
return !!this.animation.clipAction;
|
|
58115
|
+
}
|
|
58116
|
+
|
|
58117
|
+
|
|
58099
58118
|
/**
|
|
58100
58119
|
* Clear the animation obect and dispose dependent objects
|
|
58101
58120
|
*/
|
|
@@ -58184,17 +58203,17 @@ class Viewer {
|
|
|
58184
58203
|
if (this.animation) {
|
|
58185
58204
|
this.animation.update();
|
|
58186
58205
|
}
|
|
58187
|
-
|
|
58188
|
-
|
|
58189
|
-
|
|
58190
|
-
|
|
58191
|
-
|
|
58192
|
-
|
|
58193
|
-
|
|
58194
|
-
|
|
58195
|
-
|
|
58196
|
-
|
|
58197
|
-
|
|
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
|
+
}
|
|
58198
58217
|
};
|
|
58199
58218
|
|
|
58200
58219
|
/**
|
|
@@ -58310,6 +58329,7 @@ class Viewer {
|
|
|
58310
58329
|
|
|
58311
58330
|
// dispose scene
|
|
58312
58331
|
this.scene = null;
|
|
58332
|
+
this.ready = false;
|
|
58313
58333
|
}
|
|
58314
58334
|
}
|
|
58315
58335
|
|