ss-component-new 1.2.290 → 1.2.292
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/{iconfont-BmIvNcSQ.js → iconfont-B8t8JT6z.js} +105 -99
- package/dist/iconfont-Btynh8XG.cjs +1 -0
- package/dist/{index-CVvnkqF1.cjs → index-1Kip9mOo.cjs} +1 -1
- package/dist/{index-D0WhmrPq.cjs → index-3grL_k3B.cjs} +1 -1
- package/dist/{index-DoRIFdip.js → index-BDA5nO8L.js} +2 -2
- package/dist/{index-B8qcypou.js → index-BJYE_sVV.js} +2 -2
- package/dist/{index-DFQS7uwu.cjs → index-BKZ1AC7J.cjs} +1 -1
- package/dist/{index-CoIONalM.js → index-BLz6ChLy.js} +92 -92
- package/dist/{index-BYho9z8J.js → index-BPA24j0O.js} +5 -5
- package/dist/{index-zhlyYS0u.cjs → index-BaPtLkci.cjs} +1 -1
- package/dist/{index-CLSYvW-V.js → index-C-Psrtxm.js} +3 -3
- package/dist/{index-ChJa9jaB.cjs → index-C1t2Alq7.cjs} +1 -1
- package/dist/{index-Dgvp6uMe.js → index-C2uvPw0u.js} +2 -2
- package/dist/{index-DxZJGT36.cjs → index-CMse5Djm.cjs} +1 -1
- package/dist/{index-CBmtffq8.js → index-CSeluNyB.js} +2 -2
- package/dist/{index-rKWlrUxt.cjs → index-CYmVwSVC.cjs} +1 -1
- package/dist/{index-DSrrc2iZ.js → index-Cbxpkzh6.js} +1 -1
- package/dist/{index-Bo_fRQKa.js → index-CfEiAD6m.js} +11 -11
- package/dist/{index-3eIgnCwg.cjs → index-CsT5rjY1.cjs} +1 -1
- package/dist/{index-CkLKstpF.js → index-CvxKXzDM.js} +3 -3
- package/dist/{index-BGzTGtWg.js → index-D-HEo3Td.js} +1 -1
- package/dist/{index-BJ5AeWN8.js → index-D-pIlUvp.js} +1 -1
- package/dist/{index-BHh4nNx9.cjs → index-D91SWILT.cjs} +1 -1
- package/dist/{index-DHTsLYWV.cjs → index-DAJ3OODN.cjs} +1 -1
- package/dist/{index-D3d5paMD.cjs → index-DImdFvp6.cjs} +1 -1
- package/dist/{index-HRjatwJz.cjs → index-DK1sTjDL.cjs} +1 -1
- package/dist/{index-CtCFF74q.cjs → index-DbllroEt.cjs} +1 -1
- package/dist/{index-C3Hs9111.cjs → index-IzQL_O6x.cjs} +1 -1
- package/dist/{index-CPINaapD.js → index-LooQy7FP.js} +1 -1
- package/dist/{index-BaX4lYaq.cjs → index-NORPO-08.cjs} +1 -1
- package/dist/{index-BRnzzV5G.cjs → index-PceuEHTq.cjs} +1 -1
- package/dist/{index-D9NPDzxc.js → index-WJW5NuwD.js} +1 -1
- package/dist/{index-DxydARpA.cjs → index-Zm43aHgC.cjs} +1 -1
- package/dist/{index-C7OtdBM2.js → index-eh_1WDUV.js} +1 -1
- package/dist/{index-DVgi5YRR.js → index-k4D7y7vz.js} +1 -1
- package/dist/{index-C5lFR6pq.js → index-uzri080K.js} +1 -1
- package/dist/{index-4oaSlLMA.cjs → index-w7njre8m.cjs} +1 -1
- package/dist/{index-BQuLY5c7.js → index-yIbyrYzq.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-BjgWif5V.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-DBl6wzzv.js} +4 -4
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CTbk34uL.cjs → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-wygREyLG.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-DZFrUbJE.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-CS2d7F_4.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-ENHXGMud.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-DM_FNZMp.js} +2 -2
- package/dist/{index.vue_vue_type_style_index_1_lang-BlbHZQEO.js → index.vue_vue_type_style_index_1_lang-CbkdAKoG.js} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-xixL9-mz.cjs → index.vue_vue_type_style_index_1_lang-CcgXmRCE.cjs} +1 -1
- package/dist/{main-umCsTZdq.js → main-CrBmmnVQ.js} +2 -2
- package/dist/{main-C7V36wQ2.cjs → main-DYD80vuf.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +6 -6
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +10 -10
- package/dist/{threeModel-iEoLwvqu.js → threeModel-BQ7zH0al.js} +2 -2
- package/dist/{threeModel-CnVTqFvw.cjs → threeModel-DBPXMWqE.cjs} +1 -1
- package/dist/{threePreview-Qa5RdQ1s.js → threePreview-CKjG0F-q.js} +174 -174
- package/dist/{threePreview-Dm-kCn5a.cjs → threePreview-PffN5Aiq.cjs} +1 -1
- package/dist/{threeSceneView-B7_vpakw.js → threeSceneView-B2XJduAZ.js} +3 -3
- package/dist/{threeSceneView-DsQBTLGb.cjs → threeSceneView-C2sC_njc.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-hIQW37AS.js → threeSceneViewForCPMPIP-DMK67l3I.js} +5 -5
- package/dist/{threeSceneViewForCPMPIP-DLx-2iwB.cjs → threeSceneViewForCPMPIP-kXZojcJu.cjs} +1 -1
- package/dist/{threeTrackPathView-DuE1IiiI.js → threeTrackPathView-Br2dAhfn.js} +4 -4
- package/dist/{threeTrackPathView-BNObp8nE.cjs → threeTrackPathView-T3CZ-cxh.cjs} +1 -1
- package/dist/{threeViewerHost-pApRkIja.cjs → threeViewerHost-99zwmmPo.cjs} +1 -1
- package/dist/{threeViewerHost-Csq26oqg.js → threeViewerHost-Cm2ZDxGF.js} +1 -1
- package/dist/{workpieceTreePanel-D_e55eSD.cjs → workpieceTreePanel-DPRUgFlq.cjs} +1 -1
- package/dist/{workpieceTreePanel-TO47QYVr.js → workpieceTreePanel-RPbJXJju.js} +3 -3
- package/package.json +1 -1
- package/dist/iconfont-NOOcjYp4.cjs +0 -1
- /package/dist/icons/svg//{346 → 347/207/203/346/260/224/346}/266/241/350/275/256.svg" +0 -0
- /package/dist/icons/svg//{345/216/213/346/260/224 → 350/210/252/347/251/272/345/217/221/345/212/250}/346/234/272/345/217/266/347/211/207.svg" +0 -0
- /package/public/icons/svg//{346 → 347/207/203/346/260/224/346}/266/241/350/275/256.svg" +0 -0
- /package/public/icons/svg//{345/216/213/346/260/224 → 350/210/252/347/251/272/345/217/221/345/212/250}/346/234/272/345/217/266/347/211/207.svg" +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { V as d, a6 as
|
|
1
|
+
import { shallowRef as e2, ref as _ } from "vue";
|
|
2
|
+
import { V as d, a6 as i2, E as G, r as E, a8 as c2, B as S, G as o2, p as N, q as h2, S as n2, C as s2, P as p2, W as r2, n as d2, A as v2, o as z2, M as Y, ba as f2, X as A2, s as M2, D as j, H as m2, t as K, aJ as u2, N as $, au as t2, u as F2, v as y2, w as J } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-h7N9rXk9.js";
|
|
3
3
|
import { O as g2 } from "./OrbitControls-BIGKrhyi.js";
|
|
4
4
|
function G2(c, a = "YZX") {
|
|
5
|
-
const t = new d(), o = new
|
|
5
|
+
const t = new d(), o = new i2(), n = new d(), r = new G();
|
|
6
6
|
c.getWorldPosition(t), c.getWorldQuaternion(o), c.getWorldScale(n), r.setFromQuaternion(o, a);
|
|
7
7
|
const f = {
|
|
8
8
|
x: c.rotation.x * 180 / Math.PI,
|
|
@@ -51,13 +51,18 @@ function H2(c, a) {
|
|
|
51
51
|
far: h
|
|
52
52
|
};
|
|
53
53
|
}
|
|
54
|
-
function
|
|
54
|
+
function Q2(c, a) {
|
|
55
55
|
const { scene: t, camera: o, renderer: n, controls: r } = c();
|
|
56
56
|
if (!t || !o || !n || !r)
|
|
57
57
|
return;
|
|
58
58
|
const f = w2(a), h = B2(f), m = H2(o, h), { center: v } = h, { cameraZ: F, far: y } = m;
|
|
59
59
|
o.position.copy(v), o.position.z += F, o.lookAt(v), o.far = Math.max(y, 100), o.updateProjectionMatrix(), r.target.copy(v), r.update();
|
|
60
60
|
}
|
|
61
|
+
function X2(c) {
|
|
62
|
+
c == null || c.traverse((a) => {
|
|
63
|
+
a.isMesh && a.geometry.computeVertexNormals();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
61
66
|
function b2(c, a) {
|
|
62
67
|
c.geometry.dispose(), Array.isArray(c.material) ? c.material.forEach((t) => t.dispose()) : c.material.dispose(), a && a.remove(c), c.geometry = null, c.material = null;
|
|
63
68
|
}
|
|
@@ -77,25 +82,25 @@ function D2(c, a) {
|
|
|
77
82
|
return;
|
|
78
83
|
}
|
|
79
84
|
}
|
|
80
|
-
function
|
|
85
|
+
function Z2(c) {
|
|
81
86
|
let a = null, t = null, o = null, n = null, r = null, f = [], h = null, m = null, v = null, F = null;
|
|
82
87
|
const A = 1e3 / 30;
|
|
83
88
|
let C = 0;
|
|
84
|
-
const g =
|
|
89
|
+
const g = e2([]), M = _(new d()), i = _(new d()), s = _(!1), p = _(!1), u = () => {
|
|
85
90
|
if (!c.value) return;
|
|
86
91
|
const l = c.value;
|
|
87
|
-
a = V(), t = D(l), o = B(l), n = H(t, o), F = x(), r = L(l, n), f = O(), M.value.copy(t.position),
|
|
92
|
+
a = V(), t = D(l), o = B(l), n = H(t, o), F = x(), r = L(l, n), f = O(), M.value.copy(t.position), i.value.copy(n.target), Q(100, new d(0, 0, 0)), U();
|
|
88
93
|
}, V = () => {
|
|
89
94
|
const l = new n2();
|
|
90
95
|
return l.background = new s2(15790320), l;
|
|
91
96
|
}, D = (l) => {
|
|
92
|
-
const
|
|
93
|
-
return
|
|
97
|
+
const e = new p2(75, l.clientWidth / l.clientHeight, 0.1, 1e4);
|
|
98
|
+
return e.position.set(8, -8, 6), e.up.set(0, 0, 1), e.lookAt(0, 0, 0), e;
|
|
94
99
|
}, B = (l) => {
|
|
95
|
-
const
|
|
96
|
-
return
|
|
97
|
-
}, H = (l,
|
|
98
|
-
const z = new g2(l,
|
|
100
|
+
const e = new r2({ antialias: !0, alpha: !0 });
|
|
101
|
+
return e.setSize(l.clientWidth, l.clientHeight), e.setPixelRatio(window.devicePixelRatio), e.localClippingEnabled = !0, e.shadowMap.enabled = !0, e.shadowMap.type = d2, e.toneMapping = v2, e.toneMappingExposure = 1, e.outputColorSpace = z2, l.appendChild(e.domElement), e;
|
|
102
|
+
}, H = (l, e) => {
|
|
103
|
+
const z = new g2(l, e.domElement);
|
|
99
104
|
return z.enableDamping = !0, z.dampingFactor = 0.05, z.mouseButtons = {
|
|
100
105
|
LEFT: null,
|
|
101
106
|
// 禁用左键旋转
|
|
@@ -105,7 +110,7 @@ function Q2(c) {
|
|
|
105
110
|
}, x = () => {
|
|
106
111
|
const l = new f2(1e3);
|
|
107
112
|
return l.visible = p.value, a == null || a.add(l), l;
|
|
108
|
-
}, L = (l,
|
|
113
|
+
}, L = (l, e) => {
|
|
109
114
|
if (t && o && l) {
|
|
110
115
|
const z = new A2(t, o, {
|
|
111
116
|
container: l,
|
|
@@ -121,40 +126,40 @@ function Q2(c) {
|
|
|
121
126
|
top: { label: "Back" },
|
|
122
127
|
back: { label: "Bottom" }
|
|
123
128
|
});
|
|
124
|
-
return z.attachControls(
|
|
129
|
+
return z.attachControls(e), z;
|
|
125
130
|
}
|
|
126
131
|
return null;
|
|
127
132
|
}, O = () => {
|
|
128
133
|
if (!a) return [];
|
|
129
134
|
const l = new M2(4210752, 0.6);
|
|
130
135
|
a.add(l);
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
const z = new
|
|
136
|
+
const e = new j(16777215, 2);
|
|
137
|
+
e.position.set(10, 10, 8), e.castShadow = !0, e.shadow.mapSize.width = 4096, e.shadow.mapSize.height = 4096, e.shadow.camera.near = 0.5, e.shadow.camera.far = 50, e.shadow.camera.left = -50, e.shadow.camera.right = 50, e.shadow.camera.top = 50, e.shadow.camera.bottom = -50, a.add(e);
|
|
138
|
+
const z = new j(16777215, 0.8);
|
|
134
139
|
z.position.set(-8, -8, 6), a.add(z);
|
|
135
|
-
const w = new
|
|
140
|
+
const w = new j(16777215, 0.6);
|
|
136
141
|
w.position.set(0, -15, 2), a.add(w);
|
|
137
142
|
const b = new m2(16777215, 4473924, 0.8);
|
|
138
143
|
a.add(b);
|
|
139
144
|
const I = new K(16777215, 1, 50);
|
|
140
145
|
I.position.set(15, 15, 15), a.add(I);
|
|
141
146
|
const P = new K(16777215, 0.5, 50);
|
|
142
|
-
return P.position.set(-15, -15, 15), a.add(P), [l,
|
|
147
|
+
return P.position.set(-15, -15, 15), a.add(P), [l, e, z, w, b, I, P];
|
|
143
148
|
}, q = () => {
|
|
144
149
|
f == null || f.forEach((l) => {
|
|
145
|
-
var
|
|
146
|
-
(
|
|
150
|
+
var e;
|
|
151
|
+
(e = l.shadow) != null && e.map && (l.shadow.map.dispose(), l.shadow.map = null);
|
|
147
152
|
}), f = null;
|
|
148
|
-
},
|
|
153
|
+
}, Q = (l, e) => {
|
|
149
154
|
if (!a) return;
|
|
150
155
|
m && (a.remove(m), m.dispose()), v && (a.remove(v), v.geometry.dispose(), v.material.dispose());
|
|
151
156
|
const z = Math.min(Math.max(Math.floor(l / 10), 20), 100);
|
|
152
|
-
m = new o2(l, z, 13421772, 14540253), m.rotateX(Math.PI / 2), m.position.copy(
|
|
157
|
+
m = new o2(l, z, 13421772, 14540253), m.rotateX(Math.PI / 2), m.position.copy(e), m.visible = s.value, a.add(m);
|
|
153
158
|
const w = new N(l, l), b = new h2({ opacity: 0.3, color: 0 });
|
|
154
|
-
v = new E(w, b), v.position.copy(
|
|
159
|
+
v = new E(w, b), v.position.copy(e), v.position.z -= 0.01, v.receiveShadow = !0, a.add(v);
|
|
155
160
|
}, R = () => {
|
|
156
161
|
if (g.value.length === 0) {
|
|
157
|
-
|
|
162
|
+
Q(100, new d(0, 0, 0));
|
|
158
163
|
return;
|
|
159
164
|
}
|
|
160
165
|
const l = new S();
|
|
@@ -164,50 +169,50 @@ function Q2(c) {
|
|
|
164
169
|
console.warn("模型没有有效边界框,网格和阴影平面更新失败");
|
|
165
170
|
return;
|
|
166
171
|
}
|
|
167
|
-
const
|
|
168
|
-
|
|
172
|
+
const e = l.getSize(new d()), z = l.getCenter(new d()), w = Math.max(e.x, e.y), b = Math.max(w * 2, 50), I = new d(z.x, z.y, l.min.z);
|
|
173
|
+
Q(b, I);
|
|
169
174
|
}, U = () => {
|
|
170
175
|
h = requestAnimationFrame(U);
|
|
171
|
-
const l = performance.now(),
|
|
172
|
-
|
|
176
|
+
const l = performance.now(), e = l - C;
|
|
177
|
+
e < A || (C = l - e % A, n == null || n.update(), o && a && t && o.render(a, t), r == null || r.render());
|
|
173
178
|
}, l2 = (l) => {
|
|
174
|
-
l.traverse((
|
|
179
|
+
l.traverse((e) => {
|
|
175
180
|
var z, w;
|
|
176
|
-
|
|
181
|
+
e instanceof E && ((z = e.geometry) == null || z.dispose(), Array.isArray(e.material) ? e.material.forEach((b) => b.dispose()) : (w = e.material) == null || w.dispose());
|
|
177
182
|
});
|
|
178
|
-
},
|
|
183
|
+
}, X = () => {
|
|
179
184
|
a && (g.value.forEach((l) => {
|
|
180
185
|
a == null || a.remove(l), l2(l);
|
|
181
186
|
}), g.value = [], R());
|
|
182
|
-
},
|
|
187
|
+
}, Z = () => {
|
|
183
188
|
if (!t || !n || !a || g.value.length === 0) return;
|
|
184
189
|
const l = new S();
|
|
185
190
|
g.value.forEach((T) => {
|
|
186
191
|
T.userData.boundingBox instanceof S && !T.userData.boundingBox.isEmpty() ? l.union(T.userData.boundingBox) : (T.updateMatrixWorld(!0), l.expandByObject(T));
|
|
187
192
|
});
|
|
188
|
-
const
|
|
189
|
-
if (l.getCenter(new d()), l.isEmpty() ||
|
|
193
|
+
const e = l.getSize(new d());
|
|
194
|
+
if (l.getCenter(new d()), l.isEmpty() || e.length() === 0) {
|
|
190
195
|
console.warn("模型没有有效边界框,相机适配失败"), n.target.set(0, 0, 0), t.position.set(8, -8, 6), n.update();
|
|
191
196
|
return;
|
|
192
197
|
}
|
|
193
198
|
const z = l.getBoundingSphere(new u2()), w = z.center, b = z.radius, I = 1.5, P = t.fov * (Math.PI / 180), k = Math.abs(b / Math.sin(P / 2)) * I, W = new d();
|
|
194
199
|
t.getWorldDirection(W), W.lengthSq() === 0 && W.set(0.5, -0.7, 0.4).normalize();
|
|
195
200
|
const a2 = w.clone().sub(W.multiplyScalar(k));
|
|
196
|
-
t.position.copy(a2), t.near = Math.max(0.1, k - b * 20), t.far = k + b * 20, t.updateProjectionMatrix(), n.target.copy(w), n.update(), M.value.copy(t.position),
|
|
201
|
+
t.position.copy(a2), t.near = Math.max(0.1, k - b * 20), t.far = k + b * 20, t.updateProjectionMatrix(), n.target.copy(w), n.update(), M.value.copy(t.position), i.value.copy(w);
|
|
197
202
|
};
|
|
198
203
|
return {
|
|
199
204
|
// 状态
|
|
200
205
|
currentModels: g,
|
|
201
206
|
initialCameraPosition: M,
|
|
202
|
-
initialTargetPosition:
|
|
207
|
+
initialTargetPosition: i,
|
|
203
208
|
isGridVisible: s,
|
|
204
209
|
axesHelperVisible: p,
|
|
205
210
|
// 方法
|
|
206
211
|
initThreeJS: u,
|
|
207
212
|
handleResize: () => {
|
|
208
213
|
if (!c.value || !t || !o || !r) return;
|
|
209
|
-
const { clientWidth: l, clientHeight:
|
|
210
|
-
t.aspect = l /
|
|
214
|
+
const { clientWidth: l, clientHeight: e } = c.value;
|
|
215
|
+
t.aspect = l / e, t.updateProjectionMatrix(), o.setSize(l, e), r.update();
|
|
211
216
|
},
|
|
212
217
|
getThreeJSObjects: () => ({
|
|
213
218
|
scene: a,
|
|
@@ -217,21 +222,21 @@ function Q2(c) {
|
|
|
217
222
|
gizmo: r
|
|
218
223
|
}),
|
|
219
224
|
cleanup: () => {
|
|
220
|
-
h && cancelAnimationFrame(h),
|
|
225
|
+
h && cancelAnimationFrame(h), X(), v && D2(v), m == null || m.dispose(), F == null || F.dispose(), n == null || n.dispose(), o == null || o.dispose(), r == null || r.dispose(), q(), a == null || a.clear();
|
|
221
226
|
},
|
|
222
227
|
setModels: (l) => {
|
|
223
|
-
a && (
|
|
224
|
-
|
|
228
|
+
a && (X(), l.forEach((e) => {
|
|
229
|
+
e.traverse((z) => {
|
|
225
230
|
z instanceof E && (z.castShadow = !1, z.receiveShadow = !1);
|
|
226
|
-
}), a == null || a.add(
|
|
227
|
-
}), g.value = l, R(),
|
|
231
|
+
}), a == null || a.add(e);
|
|
232
|
+
}), g.value = l, R(), Z());
|
|
228
233
|
},
|
|
229
234
|
addModelAndFit: (l) => {
|
|
230
235
|
if (!a) return;
|
|
231
|
-
const
|
|
232
|
-
|
|
236
|
+
const e = Array.isArray(l) ? l : [l];
|
|
237
|
+
e.forEach((z) => {
|
|
233
238
|
a == null || a.add(z);
|
|
234
|
-
}), g.value = [...g.value, ...
|
|
239
|
+
}), g.value = [...g.value, ...e], R(), Z();
|
|
235
240
|
},
|
|
236
241
|
setGridVisibility: (l) => {
|
|
237
242
|
s.value = l, m && (m.visible = l);
|
|
@@ -239,51 +244,51 @@ function Q2(c) {
|
|
|
239
244
|
toggleAxesVisibility: () => {
|
|
240
245
|
p.value = !p.value, F && (F.visible = p.value);
|
|
241
246
|
},
|
|
242
|
-
fitCameraToAllModels:
|
|
243
|
-
clearAllModels:
|
|
247
|
+
fitCameraToAllModels: Z,
|
|
248
|
+
clearAllModels: X,
|
|
244
249
|
updateGridForModels: R,
|
|
245
250
|
resetView: () => {
|
|
246
251
|
if (console.log("resetView", {
|
|
247
252
|
initialCameraPosition: M.value,
|
|
248
|
-
initialTargetPosition:
|
|
253
|
+
initialTargetPosition: i.value
|
|
249
254
|
}), !t || !n) return;
|
|
250
|
-
const l = n.enabled,
|
|
251
|
-
n.enabled = !1, n.autoRotate = !1, n.enableDamping = !1, n.update(), t.position.copy(M.value), n.target.copy(
|
|
255
|
+
const l = n.enabled, e = n.enableDamping;
|
|
256
|
+
n.enabled = !1, n.autoRotate = !1, n.enableDamping = !1, n.update(), t.position.copy(M.value), n.target.copy(i.value), t.lookAt(n.target), t.updateProjectionMatrix(), n.update(), n.enableDamping = e, n.enabled = l;
|
|
252
257
|
},
|
|
253
258
|
zoomIn: () => {
|
|
254
259
|
if (!t) return;
|
|
255
|
-
const l = t.getWorldDirection(new d()),
|
|
256
|
-
t.position.addScaledVector(l, t.position.length() * (1 -
|
|
260
|
+
const l = t.getWorldDirection(new d()), e = Math.pow(2, -0.2);
|
|
261
|
+
t.position.addScaledVector(l, t.position.length() * (1 - e));
|
|
257
262
|
},
|
|
258
263
|
zoomOut: () => {
|
|
259
264
|
if (!t) return;
|
|
260
|
-
const l = t.getWorldDirection(new d()),
|
|
261
|
-
t.position.addScaledVector(l, -t.position.length() * (1 -
|
|
265
|
+
const l = t.getWorldDirection(new d()), e = Math.pow(2, -0.2);
|
|
266
|
+
t.position.addScaledVector(l, -t.position.length() * (1 - e));
|
|
262
267
|
}
|
|
263
268
|
};
|
|
264
269
|
}
|
|
265
|
-
function
|
|
270
|
+
function j2(c, a) {
|
|
266
271
|
const t = _(!1);
|
|
267
272
|
let o = null, n = 12700, r = new d(), f = new d(), h = new d(), m = 0, v = null;
|
|
268
|
-
const F = (
|
|
273
|
+
const F = (i) => i < 0.5 ? 4 * i * i * i : 1 - Math.pow(-2 * i + 2, 3) / 2, y = (i) => {
|
|
269
274
|
const s = new d(), p = m * 1.2, u = new d(h.x + p, h.y, h.z), V = new d(h.x, h.y + p, h.z), D = new d(h.x, h.y - p, h.z);
|
|
270
|
-
if (
|
|
271
|
-
const H =
|
|
275
|
+
if (i <= 0.567) {
|
|
276
|
+
const H = i / 0.567 * Math.PI * 2;
|
|
272
277
|
s.x = h.x + Math.cos(H) * p, s.z = h.z + Math.sin(H) * p, s.y = h.y;
|
|
273
|
-
} else if (
|
|
274
|
-
const B = (
|
|
278
|
+
} else if (i <= 0.724) {
|
|
279
|
+
const B = (i - 0.567) / 0.157, H = F(B);
|
|
275
280
|
s.lerpVectors(u, V, H);
|
|
276
|
-
} else if (
|
|
277
|
-
const B = (
|
|
281
|
+
} else if (i <= 0.881) {
|
|
282
|
+
const B = (i - 0.724) / 0.157, x = F(B) * Math.PI;
|
|
278
283
|
s.x = h.x + Math.sin(x) * p, s.y = h.y + Math.cos(x) * p, s.z = h.z;
|
|
279
284
|
} else {
|
|
280
|
-
const B = (
|
|
285
|
+
const B = (i - 0.881) / 0.119, H = F(B);
|
|
281
286
|
s.lerpVectors(D, r, H);
|
|
282
287
|
}
|
|
283
288
|
return s;
|
|
284
289
|
}, A = () => {
|
|
285
|
-
const { camera:
|
|
286
|
-
if (!
|
|
290
|
+
const { camera: i, controls: s } = c();
|
|
291
|
+
if (!i || !s) return;
|
|
287
292
|
o || (o = Date.now());
|
|
288
293
|
const p = Date.now() - o, u = Math.min(p / n, 1);
|
|
289
294
|
if (u >= 1) {
|
|
@@ -291,12 +296,12 @@ function X2(c, a) {
|
|
|
291
296
|
return;
|
|
292
297
|
}
|
|
293
298
|
const V = y(u);
|
|
294
|
-
|
|
299
|
+
i.position.copy(V), i.lookAt(h), s.target.copy(h), v = requestAnimationFrame(A);
|
|
295
300
|
}, C = () => {
|
|
296
301
|
if (a.value.length === 0) return;
|
|
297
|
-
const { camera:
|
|
298
|
-
if (!
|
|
299
|
-
r.copy(
|
|
302
|
+
const { camera: i, controls: s } = c();
|
|
303
|
+
if (!i || !s) return;
|
|
304
|
+
r.copy(i.position), f.copy(s.target);
|
|
300
305
|
const p = new S();
|
|
301
306
|
a.value.forEach((L) => {
|
|
302
307
|
p.expandByObject(L);
|
|
@@ -305,27 +310,27 @@ function X2(c, a) {
|
|
|
305
310
|
h = p.getCenter(new d()), m = Math.max(u.x, u.y, u.z) * 1.2;
|
|
306
311
|
const V = new d(h.x + m * 1.2, h.y, h.z);
|
|
307
312
|
s.enabled = !1;
|
|
308
|
-
const D =
|
|
313
|
+
const D = i.position.clone(), B = 1e3, H = Date.now(), x = () => {
|
|
309
314
|
const L = Date.now() - H, O = Math.min(L / B, 1), q = F(O);
|
|
310
|
-
|
|
315
|
+
i.position.lerpVectors(D, V, q), i.lookAt(h), s.target.copy(h), O < 1 ? requestAnimationFrame(x) : (t.value = !0, o = null, A());
|
|
311
316
|
};
|
|
312
317
|
x();
|
|
313
318
|
}, g = () => {
|
|
314
319
|
t.value = !1, o = null, v && (cancelAnimationFrame(v), v = null);
|
|
315
|
-
const { controls:
|
|
316
|
-
|
|
320
|
+
const { controls: i } = c();
|
|
321
|
+
i && (i.enabled = !0, i.target.copy(f));
|
|
317
322
|
};
|
|
318
323
|
return {
|
|
319
324
|
isAnimating: t,
|
|
320
325
|
toggleAnimation: () => {
|
|
321
326
|
if (t.value) {
|
|
322
327
|
t.value = !1, o = null, v && (cancelAnimationFrame(v), v = null);
|
|
323
|
-
const { camera:
|
|
324
|
-
if (!
|
|
328
|
+
const { camera: i, controls: s } = c();
|
|
329
|
+
if (!i || !s) return;
|
|
325
330
|
s.enabled = !0;
|
|
326
|
-
const p =
|
|
331
|
+
const p = i.position.clone(), u = s.target.clone(), V = 1500, D = Date.now(), B = () => {
|
|
327
332
|
const H = Date.now() - D, x = Math.min(H / V, 1), L = F(x);
|
|
328
|
-
|
|
333
|
+
i.position.lerpVectors(p, r, L), s.target.lerpVectors(u, f, L), x < 1 && requestAnimationFrame(B);
|
|
329
334
|
};
|
|
330
335
|
B();
|
|
331
336
|
} else
|
|
@@ -335,7 +340,7 @@ function X2(c, a) {
|
|
|
335
340
|
stopAnimation: g
|
|
336
341
|
};
|
|
337
342
|
}
|
|
338
|
-
function
|
|
343
|
+
function J2(c, a) {
|
|
339
344
|
const t = _(!1), o = _("none");
|
|
340
345
|
let n = [], r = [], f = new S(), h = new d();
|
|
341
346
|
const m = () => {
|
|
@@ -352,9 +357,9 @@ function Z2(c, a) {
|
|
|
352
357
|
f.expandByObject(M);
|
|
353
358
|
}), h = f.getCenter(new d());
|
|
354
359
|
}, F = (M) => {
|
|
355
|
-
const
|
|
360
|
+
const i = f.getSize(new d());
|
|
356
361
|
let s, p, u;
|
|
357
|
-
M === "x" ? (s = new N(
|
|
362
|
+
M === "x" ? (s = new N(i.z * 1.2, i.y * 1.2), p = new d(h.x, h.y, h.z), u = new G(0, Math.PI / 2, 0)) : M === "y" ? (s = new N(i.x * 1.2, i.z * 1.2), p = new d(h.x, h.y, h.z), u = new G(Math.PI / 2, 0, 0)) : M === "z" && (s = new N(i.x * 1.2, i.y * 1.2), p = new d(h.x, h.y, h.z), u = new G(0, 0, 0));
|
|
358
363
|
const V = new F2({
|
|
359
364
|
color: 8900331,
|
|
360
365
|
transparent: !0,
|
|
@@ -376,26 +381,26 @@ function Z2(c, a) {
|
|
|
376
381
|
}) : p.material.clippingPlanes = [M]);
|
|
377
382
|
});
|
|
378
383
|
});
|
|
379
|
-
const { scene:
|
|
380
|
-
if (
|
|
384
|
+
const { scene: i } = c();
|
|
385
|
+
if (i) {
|
|
381
386
|
const s = F(o.value);
|
|
382
|
-
|
|
387
|
+
i.add(s), r.push(s);
|
|
383
388
|
}
|
|
384
389
|
}
|
|
385
390
|
}, A = () => {
|
|
386
391
|
a.value.forEach((M) => {
|
|
387
|
-
M.traverse((
|
|
388
|
-
(
|
|
392
|
+
M.traverse((i) => {
|
|
393
|
+
(i instanceof E && i.isMesh && i.material || i instanceof $ && i.isLine && i.material || i instanceof t2 && i.isPoints && i.material) && (Array.isArray(i.material) ? i.material.forEach((s) => {
|
|
389
394
|
s.clippingPlanes = [];
|
|
390
|
-
}) :
|
|
395
|
+
}) : i.material.clippingPlanes = []);
|
|
391
396
|
});
|
|
392
397
|
});
|
|
393
398
|
}, C = () => {
|
|
394
399
|
const { scene: M } = c();
|
|
395
|
-
M && r.forEach((
|
|
396
|
-
M.remove(
|
|
400
|
+
M && r.forEach((i) => {
|
|
401
|
+
M.remove(i), i.geometry.dispose(), Array.isArray(i.material) ? i.material.forEach((s) => {
|
|
397
402
|
s.dispose();
|
|
398
|
-
}) :
|
|
403
|
+
}) : i.material.dispose();
|
|
399
404
|
}), r = [];
|
|
400
405
|
};
|
|
401
406
|
return {
|
|
@@ -445,12 +450,13 @@ window._iconfont_svg_string_4634042 = '<svg><symbol id="icon-dianyun" viewBox="0
|
|
|
445
450
|
}
|
|
446
451
|
})(window);
|
|
447
452
|
export {
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
453
|
+
j2 as a,
|
|
454
|
+
J2 as b,
|
|
455
|
+
X2 as c,
|
|
451
456
|
D2 as d,
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
457
|
+
q2 as e,
|
|
458
|
+
Q2 as f,
|
|
459
|
+
N2 as g,
|
|
460
|
+
G2 as h,
|
|
461
|
+
Z2 as u
|
|
456
462
|
};
|