@xtctwins/tctwins-bimx-engine 0.3.11 → 0.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.
@@ -1,287 +0,0 @@
1
- import { defineComponent as A, ref as u, onMounted as j, onBeforeUnmount as q, watch as z, openBlock as h, createElementBlock as b, unref as r, createElementVNode as e, toDisplayString as m, createCommentVNode as L } from "vue";
2
- import { G as J, F as K, H as c, S, I as M, P as l, U as V, M as Q } from "./index-BzB8rqmg.mjs";
3
- const W = { class: "roam_container_wrapper" }, Y = {
4
- key: 0,
5
- class: "roam_container"
6
- }, Z = { class: "container_title" }, ee = ["src"], oe = { class: "container_footer" }, te = {
7
- key: 1,
8
- class: "roamToolbar"
9
- }, se = { class: "roamToolbar_wrapper" }, ne = { class: "roamTool_group" }, re = { class: "speed_text" }, ae = ["src"], ie = { class: "speed_num" }, le = ["src"], de = { class: "roamTool_group" }, ue = {
10
- key: 2,
11
- class: "mobile_roam-box"
12
- }, me = { class: "roam-left" }, ce = { class: "roam-left-box" }, ve = {
13
- id: "roamMoveForward",
14
- class: "roam-left-item"
15
- }, _e = ["src"], we = { class: "roam-left-box" }, fe = {
16
- id: "roamMoveBackward",
17
- class: "roam-left-item roam-left-bottom"
18
- }, ge = ["src"], pe = { class: "speed_panel roam-left" }, he = { class: "roam-left-item" }, be = { class: "up_down_img" }, Me = ["src"], Ee = { class: "speed_text" }, Be = { class: "up_down_img" }, Ie = ["src"], Le = { class: "roam-right" }, ye = {
19
- id: "roamMoveUp",
20
- class: "roam-right-up"
21
- }, Re = ["src"], Te = { class: "roam-right-center" }, Ce = {
22
- id: "roamMoveLeft",
23
- class: "center-left"
24
- }, ke = ["src"], De = { class: "center-center" }, Se = ["src"], Ve = {
25
- id: "roamMoveRight",
26
- class: "center-right"
27
- }, Ue = ["src"], Fe = {
28
- id: "roamMoveDown",
29
- class: "roam-right-down"
30
- }, Pe = ["src"], xe = /* @__PURE__ */ A({
31
- __name: "RoamTool",
32
- props: ["componentId"],
33
- emits: ["closePanel", "emitHandler"],
34
- setup(U, { emit: F }) {
35
- const y = J(), v = K(), E = u("speed-up"), B = u("speed-down"), f = u("1"), g = u(!1), w = u(!0), R = U, T = F, a = u(!1), I = (t) => {
36
- T("emitHandler", t);
37
- }, n = u(c("isMobile"));
38
- j(() => {
39
- (c("isMobile") || S.showRoam === !1) && (w.value = !1), setTimeout(() => {
40
- $(), N(), X(), G(), O(), H();
41
- }, 1e3), y.setReadyById(R.componentId);
42
- });
43
- const C = () => {
44
- let t = window.bimViewer.eventTrigger;
45
- t.on("personModeSpeedUp", (o) => {
46
- f.value = o.toString();
47
- }), t.on("personModeSpeedDown", (o) => {
48
- f.value = o.toString();
49
- });
50
- };
51
- M.on("BimViewer", C), q(() => {
52
- M.off("BimViewer", C);
53
- });
54
- const p = (t) => {
55
- t ? window.bimViewer.firstPersonMode.speedUp() : window.bimViewer.firstPersonMode.speedDown();
56
- };
57
- V.BIMX_CONFIGS.RoamTool || (M.on("BIMX_CONFIGS", () => {
58
- S.showRoam == !1 && (w.value = !1);
59
- }), V.BIMX_CONFIGS.RoamTool = !0), z(
60
- () => y.isToolActive(R.componentId),
61
- (t) => {
62
- k(!!t);
63
- }
64
- );
65
- const k = (t) => {
66
- c("isMobile") ? a.value = t : (c("hideTool") || M.emit("hideToolbar", t), t ? w.value && (g.value = !0) : g.value = !1);
67
- }, P = () => {
68
- w.value = !1, I({
69
- isTool: !0,
70
- event_target: "RoamTool",
71
- event_name: "rejectRoamCourse",
72
- content: {
73
- msg: v("roam.dontShowCourseMessage")
74
- }
75
- }), D();
76
- }, D = () => {
77
- g.value = !1;
78
- }, x = () => {
79
- T("closePanel");
80
- }, $ = () => {
81
- var t, o, s;
82
- (t = document.getElementById("roamMoveUp")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
83
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goUp = !0, _("goUp"));
84
- }), (o = document.getElementById("roamMoveUp")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
85
- a.value && i();
86
- }), (s = document.getElementById("roamMoveUp")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
87
- a.value && i();
88
- });
89
- }, N = () => {
90
- var t, o, s;
91
- (t = document.getElementById("roamMoveDown")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
92
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goDown = !0, _("goDown"));
93
- }), (o = document.getElementById("roamMoveDown")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
94
- a.value && i();
95
- }), (s = document.getElementById("roamMoveDown")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
96
- a.value && i();
97
- });
98
- }, X = () => {
99
- var t, o, s;
100
- (t = document.getElementById("roamMoveLeft")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
101
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goLeft = !0, _("goLeft"));
102
- }), (o = document.getElementById("roamMoveLeft")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
103
- a.value && i();
104
- }), (s = document.getElementById("roamMoveLeft")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
105
- a.value && i();
106
- });
107
- }, G = () => {
108
- var t, o, s;
109
- (t = document.getElementById("roamMoveRight")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
110
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goRight = !0, _("goDown"));
111
- }), (o = document.getElementById("roamMoveRight")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
112
- a.value && i();
113
- }), (s = document.getElementById("roamMoveRight")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
114
- a.value && i();
115
- });
116
- }, O = () => {
117
- var t, o, s;
118
- (t = document.getElementById("roamMoveForward")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
119
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goForward = !0, _("goForward"));
120
- }), (o = document.getElementById("roamMoveForward")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
121
- a.value && i();
122
- }), (s = document.getElementById("roamMoveForward")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
123
- a.value && i();
124
- });
125
- }, H = () => {
126
- var t, o, s;
127
- (t = document.getElementById("roamMoveBackward")) == null || t.addEventListener(n.value ? "touchstart" : "mousedown", (d) => {
128
- a.value && (n.value && d.preventDefault(), window.bimViewer.firstPersonMode.goBackward = !0, _("goBackward"));
129
- }), (o = document.getElementById("roamMoveBackward")) == null || o.addEventListener(n.value ? "touchend" : "mouseup", () => {
130
- a.value && i();
131
- }), (s = document.getElementById("roamMoveBackward")) == null || s.addEventListener(n.value ? "touchcancel" : "mouseup", () => {
132
- a.value && i();
133
- });
134
- }, _ = (t) => {
135
- I({
136
- isTool: !0,
137
- event_target: "RoamTool",
138
- event_name: "",
139
- content: {
140
- roam: t
141
- }
142
- });
143
- }, i = () => {
144
- window.bimViewer.firstPersonMode.setdirectionChangeCancel(), I({
145
- isTool: !0,
146
- event_target: "RoamTool",
147
- event_name: "",
148
- content: {
149
- roam: "stop"
150
- }
151
- });
152
- };
153
- return (t, o) => (h(), b("div", W, [
154
- !r(c)("isMobile") && g.value ? (h(), b("div", Y, [
155
- e("div", Z, m(r(v)("roam.courseTitle")), 1),
156
- e("img", {
157
- class: "container_img",
158
- src: r(l) + "/bim-viewer/roam-icon.png",
159
- alt: ""
160
- }, null, 8, ee),
161
- e("div", oe, [
162
- e("div", {
163
- class: "btn1",
164
- onClick: P
165
- }, m(r(v)("roam.dontRemind")), 1),
166
- e("div", {
167
- class: "btn2",
168
- onClick: D
169
- }, m(r(v)("roam.gotIt")), 1)
170
- ])
171
- ])) : L("", !0),
172
- r(c)("isMobile") ? L("", !0) : (h(), b("div", te, [
173
- e("div", se, [
174
- e("div", ne, [
175
- e("div", re, m(r(v)("roam.speedLabel")), 1),
176
- e("div", {
177
- class: "up_down_button",
178
- onClick: o[0] || (o[0] = (s) => p(!1)),
179
- onMouseover: o[1] || (o[1] = (s) => B.value = "speed-down1"),
180
- onMouseleave: o[2] || (o[2] = (s) => B.value = "speed-down")
181
- }, [
182
- e("img", {
183
- src: r(l) + "/bim-viewer/roam-bar/" + B.value + ".png"
184
- }, null, 8, ae)
185
- ], 32),
186
- e("div", ie, m(f.value) + "X", 1),
187
- e("div", {
188
- class: "up_down_button",
189
- onClick: o[3] || (o[3] = (s) => p(!0)),
190
- onMouseover: o[4] || (o[4] = (s) => E.value = "speed-up1"),
191
- onMouseleave: o[5] || (o[5] = (s) => E.value = "speed-up")
192
- }, [
193
- e("img", {
194
- src: r(l) + "/bim-viewer/roam-bar/" + E.value + ".png"
195
- }, null, 8, le)
196
- ], 32)
197
- ]),
198
- o[8] || (o[8] = e("div", { class: "split" }, null, -1)),
199
- e("div", de, [
200
- e("div", {
201
- class: "cancel_button",
202
- onClick: x
203
- }, m(r(v)("common.close")), 1)
204
- ])
205
- ])
206
- ])),
207
- r(c)("isMobile") ? (h(), b("div", ue, [
208
- e("div", me, [
209
- e("div", ce, [
210
- e("div", ve, [
211
- e("img", {
212
- src: r(l) + "/bim-viewer/roam-bar/up.svg",
213
- alt: ""
214
- }, null, 8, _e)
215
- ])
216
- ]),
217
- e("div", we, [
218
- e("div", fe, [
219
- e("img", {
220
- src: r(l) + "/bim-viewer/roam-bar/down.svg",
221
- alt: ""
222
- }, null, 8, ge)
223
- ])
224
- ])
225
- ]),
226
- e("div", pe, [
227
- e("div", he, [
228
- e("div", be, [
229
- e("img", {
230
- src: r(l) + "/bim-viewer/roam-bar/plus.svg",
231
- onClick: o[6] || (o[6] = (s) => p(!0)),
232
- alt: ""
233
- }, null, 8, Me)
234
- ]),
235
- e("div", Ee, [
236
- e("span", null, m(f.value) + "X", 1)
237
- ]),
238
- e("div", Be, [
239
- e("img", {
240
- src: r(l) + "/bim-viewer/roam-bar/minus.svg",
241
- onClick: o[7] || (o[7] = (s) => p(!1)),
242
- alt: ""
243
- }, null, 8, Ie)
244
- ])
245
- ])
246
- ]),
247
- e("div", Le, [
248
- e("div", ye, [
249
- e("img", {
250
- src: r(l) + "/bim-viewer/roam-bar/top.svg",
251
- alt: ""
252
- }, null, 8, Re)
253
- ]),
254
- e("div", Te, [
255
- e("div", Ce, [
256
- e("img", {
257
- src: r(l) + "/bim-viewer/roam-bar/left.svg",
258
- alt: ""
259
- }, null, 8, ke)
260
- ]),
261
- e("div", De, [
262
- e("img", {
263
- src: r(l) + "/bim-viewer/roam-bar/center.svg",
264
- alt: ""
265
- }, null, 8, Se)
266
- ]),
267
- e("div", Ve, [
268
- e("img", {
269
- src: r(l) + "/bim-viewer/roam-bar/right.svg",
270
- alt: ""
271
- }, null, 8, Ue)
272
- ])
273
- ]),
274
- e("div", Fe, [
275
- e("img", {
276
- src: r(l) + "/bim-viewer/roam-bar/bottom.svg",
277
- alt: ""
278
- }, null, 8, Pe)
279
- ])
280
- ])
281
- ])) : L("", !0)
282
- ]));
283
- }
284
- }), Xe = /* @__PURE__ */ Q(xe, [["__scopeId", "data-v-566257e2"]]);
285
- export {
286
- Xe as default
287
- };