@files-preview-app/preview-file 1.3.11 → 1.3.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/angular.cjs +23 -3
- package/dist/angular.cjs.map +1 -1
- package/dist/angular.js +23 -3
- package/dist/angular.js.map +1 -1
- package/dist/index.cjs +23 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +23 -3
- package/dist/index.js.map +1 -1
- package/dist/react.cjs +23 -3
- package/dist/react.cjs.map +1 -1
- package/dist/react.js +23 -3
- package/dist/react.js.map +1 -1
- package/dist/vue.cjs +23 -3
- package/dist/vue.cjs.map +1 -1
- package/dist/vue.d.cts +2 -2
- package/dist/vue.d.ts +2 -2
- package/dist/vue.js +23 -3
- package/dist/vue.js.map +1 -1
- package/package.json +1 -1
package/dist/vue.cjs
CHANGED
|
@@ -6067,6 +6067,16 @@ var ThreeDPlugin = class {
|
|
|
6067
6067
|
type: "button",
|
|
6068
6068
|
group: "actions",
|
|
6069
6069
|
execute: () => instance.download?.()
|
|
6070
|
+
},
|
|
6071
|
+
{
|
|
6072
|
+
id: "open-window",
|
|
6073
|
+
icon: "open-window",
|
|
6074
|
+
label: "Open in Separate Full Window",
|
|
6075
|
+
type: "button",
|
|
6076
|
+
group: "actions",
|
|
6077
|
+
execute: () => {
|
|
6078
|
+
instance.openInSeparateWindow?.();
|
|
6079
|
+
}
|
|
6070
6080
|
}
|
|
6071
6081
|
];
|
|
6072
6082
|
}
|
|
@@ -6137,12 +6147,21 @@ var ThreeDPlugin = class {
|
|
|
6137
6147
|
});
|
|
6138
6148
|
meshGroup.add(obj);
|
|
6139
6149
|
}
|
|
6150
|
+
const initialBox = new THREE__namespace.Box3().setFromObject(meshGroup);
|
|
6151
|
+
const center = initialBox.getCenter(new THREE__namespace.Vector3());
|
|
6152
|
+
meshGroup.position.sub(center);
|
|
6140
6153
|
scene.add(meshGroup);
|
|
6141
6154
|
const box = new THREE__namespace.Box3().setFromObject(meshGroup);
|
|
6142
|
-
const
|
|
6143
|
-
const
|
|
6155
|
+
const size = box.getSize(new THREE__namespace.Vector3());
|
|
6156
|
+
const maxDim = Math.max(size.x, size.y, size.z) || 10;
|
|
6157
|
+
grid.position.y = -size.y / 2;
|
|
6158
|
+
const gridScale = Math.max(0.1, maxDim / 50);
|
|
6159
|
+
grid.scale.set(gridScale, 1, gridScale);
|
|
6160
|
+
const fovRad = camera.fov * (Math.PI / 180);
|
|
6161
|
+
let cameraDistance = maxDim / 2 / Math.tan(fovRad / 2);
|
|
6162
|
+
cameraDistance = Math.max(cameraDistance * 1.5, 2);
|
|
6144
6163
|
const fitCamera = () => {
|
|
6145
|
-
camera.position.set(
|
|
6164
|
+
camera.position.set(cameraDistance * 0.8, cameraDistance * 0.6, cameraDistance);
|
|
6146
6165
|
camera.lookAt(0, 0, 0);
|
|
6147
6166
|
controls.target.set(0, 0, 0);
|
|
6148
6167
|
controls.update();
|
|
@@ -6188,6 +6207,7 @@ var ThreeDPlugin = class {
|
|
|
6188
6207
|
controls.update();
|
|
6189
6208
|
},
|
|
6190
6209
|
fitToPage: fitCamera,
|
|
6210
|
+
fitToWidth: fitCamera,
|
|
6191
6211
|
resetZoom: fitCamera,
|
|
6192
6212
|
rotateCW: () => {
|
|
6193
6213
|
isWireframe = !isWireframe;
|